typedef struct
{
unsigned char *pbSeq;
unsigned char real_bSeq;
int readerID;
unsigned int dwMaxCCIDMessageLength;
int dwMaxIFSD;
int dwFeatures;
char bPINSupport;
unsigned int wLcdLayout;
int dwDefaultClock;
unsigned int dwMaxDataRate;
char bMaxSlotIndex;
char bCurrentSlotIndex;
unsigned int *arrayOfSupportedDataRates;
unsigned int readTimeout;
int cardProtocol;
int bInterfaceProtocol;
int bNumEndpoints;
int dwSlotStatus;
int bVoltageSupport;
} _ccid_descriptor;
#define CCID_CLASS_AUTO_CONF_ATR 0x00000002
#define CCID_CLASS_AUTO_VOLTAGE 0x00000008
#define CCID_CLASS_AUTO_BAUD 0x00000020
#define CCID_CLASS_AUTO_PPS_PROP 0x00000040
#define CCID_CLASS_AUTO_PPS_CUR 0x00000080
#define CCID_CLASS_AUTO_IFSD 0x00000400
#define CCID_CLASS_CHARACTER 0x00000000
#define CCID_CLASS_TPDU 0x00010000
#define CCID_CLASS_SHORT_APDU 0x00020000
#define CCID_CLASS_EXTENDED_APDU 0x00040000
#define CCID_CLASS_EXCHANGE_MASK 0x00070000
#define CCID_CLASS_PIN_VERIFY 0x01
#define CCID_CLASS_PIN_MODIFY 0x02
#define CCID_ICC_PRESENT_ACTIVE 0x00
#define CCID_ICC_PRESENT_INACTIVE 0x01
#define CCID_ICC_ABSENT 0x02
#define CCID_ICC_STATUS_MASK 0x03
#define CCID_COMMAND_FAILED 0x40
#define CCID_TIME_EXTENSION 0x80
#define ICCD_A 1
#define ICCD_B 2
#define GEMPC433 0x08E64433
#define GEMPCKEY 0x08E63438
#define GEMPCTWIN 0x08E63437
#define GEMPCPINPAD 0x08E63478
#define GEMCORESIMPRO 0x08E63480
#define GEMCOREPOSPRO 0x08E63479
#define GEMALTOPROXDU 0x08E65503
#define GEMALTOPROXSU 0x08E65504
#define CARDMAN3121 0x076B3021
#define LTC31 0x07830003
#define SCR331DI 0x04E65111
#define SCR331DINTTCOM 0x04E65120
#define SDI010 0x04E65121
#define CHERRYXX33 0x046A0005
#define CHERRYST2000 0x046A003E
#define OZ776 0x0B977762
#define OZ776_7772 0x0B977772
#define SPR532 0x04E6E003
#define MYSMARTPAD 0x09BE0002
#define CHERRYXX44 0x046a0010
#define CL1356D 0x0B810200
#define REINER_SCT 0x0C4B0300
#define SEG 0x08E68000
#define BLUDRIVEII_CCID 0x1B0E1078
#define DELLSCRK 0x413C2101
#define KOBIL_TRIBANK 0x0D463010
#define O2MICRO_OZ776_PATCH
#define ESC_GEMPC_SET_ISO_MODE 1
#define ESC_GEMPC_SET_APDU_MODE 2
#define VOLTAGE_AUTO 0
#define VOLTAGE_5V 1
#define VOLTAGE_3V 2
#define VOLTAGE_1_8V 3
int ccid_open_hack_pre(unsigned int reader_index);
int ccid_open_hack_post(unsigned int reader_index);
void ccid_error(int error, const char *file, int line, const char *function);
_ccid_descriptor *get_ccid_descriptor(unsigned int reader_index);
#define dw2i(a, x) (unsigned int)((((((a[x+3] << 8) + a[x+2]) << 8) + a[x+1]) << 8) + a[x])
#define ISO_DATA_RATES 10753, 14337, 15625, 17204, \
20833, 21505, 23438, 25806, 28674, \
31250, 32258, 34409, 39063, 41667, \
43011, 46875, 52083, 53763, 57348, \
62500, 64516, 68817, 71685, 78125, \
83333, 86022, 93750, 104167, 107527, \
114695, 125000, 129032, 143369, 156250, \
166667, 172043, 215054, 229391, 250000, \
344086
#define GEMPLUS_CUSTOM_DATA_RATES 10753, 21505, 43011, 125000