Build: Fix incorrect build target for Ubuntu CI builds.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Common / CCIDClassCommon.h
index 61239ec..3f4031a 100644 (file)
@@ -1,14 +1,14 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2018.
+     Copyright (C) Dean Camera, 2019.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2018  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-  Copyright 2018  Filipe Rodrigues (filipepazrodrigues [at] gmail [dot] com)
+  Copyright 2019  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2019  Filipe Rodrigues (filipepazrodrigues [at] gmail [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
                #endif
 
        /* Macros: */
                #endif
 
        /* Macros: */
-               #define CCID_CURRENT_SPEC_RELEASE_NUMBER            0x0110
-               #define CCID_VOLTAGESUPPORT_5V                      0
-               #define CCID_VOLTAGESUPPORT_3V                      (1 << 0)
-               #define CCID_VOLTAGESUPPORT_1V8                     (1 << 1)
+               #define CCID_CURRENT_SPEC_RELEASE_NUMBER              0x0110
+               #define CCID_VOLTAGESUPPORT_5V                        0
+               #define CCID_VOLTAGESUPPORT_3V                        (1 << 0)
+               #define CCID_VOLTAGESUPPORT_1V8                       (1 << 1)
 
 
-               #define CCID_PROTOCOLS_T0                           (1 << 0)
-               #define CCID_PROTOCOLS_T1                           (1 << 1)
+               #define CCID_PROTOCOLS_T0                             (1 << 0)
+               #define CCID_PROTOCOLS_T1                             (1 << 1)
 
 
-               #define CCID_PROTOCOLNUM_T0                         0
-               #define CCID_PROTOCOLNUM_T1                         (1 << 0)
+               #define CCID_PROTOCOLNUM_T0                           0
+               #define CCID_PROTOCOLNUM_T1                           (1 << 0)
 
 
-               #define CCID_ICCSTATUS_PRESENTANDACTIVE             0
-               #define CCID_ICCSTATUS_PRESENTANDINACTIVE           (1 << 0)
-               #define CCID_ICCSTATUS_NOICCPRESENT                 (1 << 1)
+               #define CCID_ICCSTATUS_PRESENTANDACTIVE               0
+               #define CCID_ICCSTATUS_PRESENTANDINACTIVE             (1 << 0)
+               #define CCID_ICCSTATUS_NOICCPRESENT                   (1 << 1)
 
 
-               #define CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR    0
-               #define CCID_COMMANDSTATUS_FAILED                   (1 << 6)
-               #define CCID_COMMANDSTATUS_TIMEEXTENSIONREQUESTED   (2 << 6)
-               #define CCID_COMMANDSTATUS_RFU                      (3 << 6)
+               #define CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR      0
+               #define CCID_COMMANDSTATUS_ERROR                      1
+               #define CCID_COMMANDSTATUS_FAILED                     (1 << 6)
+               #define CCID_COMMANDSTATUS_TIMEEXTENSIONREQUESTED     (2 << 6)
+               #define CCID_COMMANDSTATUS_RFU                        (3 << 6)
 
 
-               #define CCID_ERROR_RFU_START                        0x80
-               #define CCID_ERROR_NO_ERROR                         0x80
-               #define CCID_ERROR_NOT_SUPPORTED                    0
-               #define CCID_ERROR_CMD_ABORTED                      0xFF
-               #define CCID_ERROR_CMD_NOT_ABORTED                  0xFF
+               #define CCID_ERROR_RFU_START                          0x80
+               #define CCID_ERROR_NO_ERROR                           0x80
+               #define CCID_ERROR_NOT_SUPPORTED                      0
+               #define CCID_ERROR_CMD_ABORTED                        0xFF
+               #define CCID_ERROR_CMD_NOT_ABORTED                    0xFF
 
 
-               #define CCID_ERROR_SLOT_NOT_FOUND                   5
+               #define CCID_ERROR_PARAMETERS_PROTOCOL_NOT_SUPPORTED  0x7
 
 
-               #define CCID_DESCRIPTOR_CLOCK_KHZ(khz)              (khz)
-               #define CCID_DESCRIPTOR_CLOCK_MHZ(mhz)              ((mhz) * 1000)
+               #define CCID_ERROR_SLOT_NOT_FOUND                     5
+
+               #define CCID_DESCRIPTOR_CLOCK_KHZ(khz)                (khz)
+               #define CCID_DESCRIPTOR_CLOCK_MHZ(mhz)                ((mhz) * 1000)
 
 
        /* Enums: */
 
 
        /* Enums: */
                        CCID_DTYPE_Functional                       = 0x21, /**< CCID class specific Interface functional descriptor. */
                };
 
                        CCID_DTYPE_Functional                       = 0x21, /**< CCID class specific Interface functional descriptor. */
                };
 
+               enum CCID_Features_Auto_t
+               {
+                       CCID_Features_Auto_None                                         = 0x0,
+                       CCID_Features_Auto_ParameterConfiguration       = 0x2,
+                       CCID_Features_Auto_ICCActivation                        = 0x4,
+                       CCID_Features_Auto_VoltageSelection                     = 0x8,
+
+                       CCID_Features_Auto_ICCClockFrequencyChange      = 0x10,
+                       CCID_Features_Auto_ICCBaudRateChange            = 0x20,
+                       CCID_Features_Auto_ParameterNegotiation         = 0x40,
+                       CCID_Features_Auto_PPS                                          = 0x80,
+               };
+
+               enum CCID_Features_ExchangeLevel_t
+               {
+                       CCID_Features_ExchangeLevel_TPDU                                = 0x00010000,
+                       CCID_Features_ExchangeLevel_ShortAPDU                   = 0x00020000,
+                       CCID_Features_ExchangeLevel_ShortExtendedAPDU   = 0x00040000
+               };
+
        /* Type Defines: */
                typedef struct
                {
        /* Type Defines: */
                typedef struct
                {
                        uint8_t Status;
                        uint8_t Error;
                        uint8_t ProtocolNum;
                        uint8_t Status;
                        uint8_t Error;
                        uint8_t ProtocolNum;
-                       union {
+                       union
+                       {
                                USB_CCID_ProtocolData_T0_t T0;
                                USB_CCID_ProtocolData_T1_t T1;
                        } ProtocolData;
                                USB_CCID_ProtocolData_T0_t T0;
                                USB_CCID_ProtocolData_T1_t T1;
                        } ProtocolData;