| 26 |
/* |
/* |
| 27 |
* CCID Sequence number |
* CCID Sequence number |
| 28 |
*/ |
*/ |
| 29 |
unsigned char bSeq; |
unsigned char *pbSeq; |
| 30 |
|
unsigned char real_bSeq; |
| 31 |
|
|
| 32 |
/* |
/* |
| 33 |
* VendorID << 16 + ProductID |
* VendorID << 16 + ProductID |
| 82 |
#define CCID_CLASS_AUTO_BAUD 0x00000020 |
#define CCID_CLASS_AUTO_BAUD 0x00000020 |
| 83 |
#define CCID_CLASS_AUTO_PPS_CUR 0x00000080 |
#define CCID_CLASS_AUTO_PPS_CUR 0x00000080 |
| 84 |
#define CCID_CLASS_AUTO_IFSD 0x00000400 |
#define CCID_CLASS_AUTO_IFSD 0x00000400 |
| 85 |
|
#define CCID_CLASS_CHARACTER 0x00000000 |
| 86 |
#define CCID_CLASS_TPDU 0x00010000 |
#define CCID_CLASS_TPDU 0x00010000 |
| 87 |
#define CCID_CLASS_SHORT_APDU 0x00020000 |
#define CCID_CLASS_SHORT_APDU 0x00020000 |
| 88 |
#define CCID_CLASS_EXTENDED_APDU 0x00040000 |
#define CCID_CLASS_EXTENDED_APDU 0x00040000 |
| 93 |
#define CCID_CLASS_PIN_MODIFY 0x02 |
#define CCID_CLASS_PIN_MODIFY 0x02 |
| 94 |
|
|
| 95 |
/* See CCID specs ch. 4.2.1 */ |
/* See CCID specs ch. 4.2.1 */ |
| 96 |
|
#define CCID_ICC_PRESENT_ACTIVE 0x00 /* 00 0000 00 */ |
| 97 |
|
#define CCID_ICC_PRESENT_INACTIVE 0x01 /* 00 0000 01 */ |
| 98 |
|
#define CCID_ICC_ABSENT 0x02 /* 00 0000 20 */ |
| 99 |
|
#define CCID_ICC_STATUS_MASK 0x03 /* 00 0000 11 */ |
| 100 |
|
|
| 101 |
#define CCID_COMMAND_FAILED 0x40 /* 01 0000 00 */ |
#define CCID_COMMAND_FAILED 0x40 /* 01 0000 00 */ |
| 102 |
#define CCID_TIME_EXTENSION 0x80 /* 10 0000 00 */ |
#define CCID_TIME_EXTENSION 0x80 /* 10 0000 00 */ |
| 103 |
|
|
| 108 |
#define CARDMAN3121 0x076B3021 |
#define CARDMAN3121 0x076B3021 |
| 109 |
#define LTC31 0x07830003 |
#define LTC31 0x07830003 |
| 110 |
#define SCR331DI 0x04E65111 |
#define SCR331DI 0x04E65111 |
| 111 |
|
#define CHERRYXX33 0x046A0005 |
| 112 |
|
#define OZ776 0x0B977762 |
| 113 |
|
|
| 114 |
/* Escape sequence codes */ |
/* Escape sequence codes */ |
| 115 |
#define ESC_GEMPC_SET_ISO_MODE 1 |
#define ESC_GEMPC_SET_ISO_MODE 1 |
| 116 |
#define ESC_GEMPC_SET_APDU_MODE 2 |
#define ESC_GEMPC_SET_APDU_MODE 2 |
| 117 |
|
|
| 118 |
|
|
| 119 |
int ccid_open_hack(unsigned int lun); |
int ccid_open_hack(unsigned int reader_index); |
| 120 |
void ccid_error(int error, char *file, int line, char *function); |
void ccid_error(int error, char *file, int line, char *function); |
| 121 |
_ccid_descriptor *get_ccid_descriptor(unsigned int lun); |
_ccid_descriptor *get_ccid_descriptor(unsigned int reader_index); |
| 122 |
|
|
| 123 |
/* convert a 4 byte integer in USB format into an int */ |
/* convert a 4 byte integer in USB format into an int */ |
| 124 |
#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]) |