| 37 |
/* |
/* |
| 38 |
* Maximum message length |
* Maximum message length |
| 39 |
*/ |
*/ |
| 40 |
int dwMaxCCIDMessageLength; |
unsigned int dwMaxCCIDMessageLength; |
| 41 |
|
|
| 42 |
/* |
/* |
| 43 |
* Maximum IFSD |
* Maximum IFSD |
| 62 |
/* |
/* |
| 63 |
* Max Data Rate |
* Max Data Rate |
| 64 |
*/ |
*/ |
| 65 |
int dwMaxDataRate; |
unsigned int dwMaxDataRate; |
| 66 |
|
|
| 67 |
/* |
/* |
| 68 |
* Number of available slots |
* Number of available slots |
| 74 |
*/ |
*/ |
| 75 |
char bCurrentSlotIndex; |
char bCurrentSlotIndex; |
| 76 |
|
|
| 77 |
|
/* |
| 78 |
|
* The array of data rates supported by the reader |
| 79 |
|
*/ |
| 80 |
|
unsigned int *arrayOfSupportedDataRates; |
| 81 |
|
|
| 82 |
|
/* |
| 83 |
|
* Read communication port timeout |
| 84 |
|
* value is seconds |
| 85 |
|
* this value can evolve dynamically if card request it (time processing). |
| 86 |
|
*/ |
| 87 |
|
unsigned int readTimeout; |
| 88 |
|
|
| 89 |
|
/* |
| 90 |
|
* Card protocol |
| 91 |
|
*/ |
| 92 |
|
int cardProtocol; |
| 93 |
} _ccid_descriptor; |
} _ccid_descriptor; |
| 94 |
|
|
| 95 |
/* Features from dwFeatures */ |
/* Features from dwFeatures */ |
| 122 |
#define GEMPC433 0x08E64433 |
#define GEMPC433 0x08E64433 |
| 123 |
#define GEMPCKEY 0x08E63438 |
#define GEMPCKEY 0x08E63438 |
| 124 |
#define GEMPCTWIN 0x08E63437 |
#define GEMPCTWIN 0x08E63437 |
| 125 |
|
#define GEMPCPINPAD 0x08E63478 |
| 126 |
|
#define GEMCORESIMPRO 0x08E63480 |
| 127 |
|
#define GEMCOREPOSPRO 0x08E63479 |
| 128 |
#define CARDMAN3121 0x076B3021 |
#define CARDMAN3121 0x076B3021 |
| 129 |
#define LTC31 0x07830003 |
#define LTC31 0x07830003 |
| 130 |
#define SCR331DI 0x04E65111 |
#define SCR331DI 0x04E65111 |
| 131 |
|
#define SCR331DINTTCOM 0x04E65120 |
| 132 |
#define CHERRYXX33 0x046A0005 |
#define CHERRYXX33 0x046A0005 |
| 133 |
|
#define CHERRYST2000 0x046A003E |
| 134 |
#define OZ776 0x0B977762 |
#define OZ776 0x0B977762 |
| 135 |
#define SPR532 0x04E6E003 |
#define SPR532 0x04E6E003 |
| 136 |
|
#define MYSMARTPAD 0x09BE0002 |
| 137 |
|
|
| 138 |
/* Escape sequence codes */ |
/* Escape sequence codes */ |
| 139 |
#define ESC_GEMPC_SET_ISO_MODE 1 |
#define ESC_GEMPC_SET_ISO_MODE 1 |
| 140 |
#define ESC_GEMPC_SET_APDU_MODE 2 |
#define ESC_GEMPC_SET_APDU_MODE 2 |
| 141 |
|
|
| 142 |
|
/* |
| 143 |
|
* Possible values : |
| 144 |
|
* 3 -> 1.8V, 3V, 5V |
| 145 |
|
* 2 -> 3V, 5V |
| 146 |
|
* 1 -> 5V only |
| 147 |
|
* 0 -> automatic (selection made by the reader) |
| 148 |
|
*/ |
| 149 |
|
/* |
| 150 |
|
* To be safe we default to 5V |
| 151 |
|
* otherwise we would have to parse the ATR and get the value of TAi (i>2) when |
| 152 |
|
* in T=15 |
| 153 |
|
*/ |
| 154 |
|
#define VOLTAGE_AUTO 0 |
| 155 |
|
#define VOLTAGE_5V 1 |
| 156 |
|
#define VOLTAGE_3V 2 |
| 157 |
|
#define VOLTAGE_1_8V 3 |
| 158 |
|
|
| 159 |
int ccid_open_hack(unsigned int reader_index); |
int ccid_open_hack(unsigned int reader_index); |
| 160 |
void ccid_error(int error, char *file, int line, char *function); |
void ccid_error(int error, char *file, int line, const char *function); |
| 161 |
_ccid_descriptor *get_ccid_descriptor(unsigned int reader_index); |
_ccid_descriptor *get_ccid_descriptor(unsigned int reader_index); |
| 162 |
|
|
| 163 |
/* convert a 4 byte integer in USB format into an int */ |
/* convert a 4 byte integer in USB format into an int */ |
| 164 |
#define dw2i(a, x) ((((((a[x+3] << 8) + a[x+2]) << 8) + a[x+1]) << 8) + a[x]) |
#define dw2i(a, x) ((((((a[x+3] << 8) + a[x+2]) << 8) + a[x+1]) << 8) + a[x]) |
| 165 |
|
|
| 166 |
|
/* all the data rates specified by ISO 7816-3 Fi/Di tables */ |
| 167 |
|
#define ISO_DATA_RATES 10753, 14337, 15625, 17204, \ |
| 168 |
|
20833, 21505, 23438, 25806, 28674, \ |
| 169 |
|
31250, 32258, 34409, 39063, 41667, \ |
| 170 |
|
43011, 46875, 52083, 53763, 57348, \ |
| 171 |
|
62500, 64516, 68817, 71685, 78125, \ |
| 172 |
|
83333, 86022, 93750, 104167, 107527, \ |
| 173 |
|
114695, 125000, 129032, 143369, 156250, \ |
| 174 |
|
166667, 172043, 215054, 229391, 250000, \ |
| 175 |
|
344086 |
| 176 |
|
|
| 177 |
|
/* data rates supported by the secondary slots on the GemCore Pos Pro & SIM Pro */ |
| 178 |
|
#define GEMPLUS_CUSTOM_DATA_RATES 10753, 21505, 43011, 125000 |
| 179 |
|
|