Changeset 11474
- Timestamp:
- 01/18/19 21:39:30 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/atr.c
r11472 r11474 25 25 #include "atr.h" 26 26 #define ERROR 1 27 /*28 * Not exported variables definition29 */30 27 31 28 const uint32_t atr_fs_table[16] = {5000000L, 5000000L, 6000000L, 8000000L, 12000000L, 16000000L, 20000000L, 0, 0, 5000000L, 7500000L, 10000000L, 15000000L, 20000000L, 0, 0}; 32 33 static const uint32_t atr_num_ib_table[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};34 35 /*36 * Exported variables definition37 */38 39 29 const uint32_t atr_f_table[16] = {372, 372, 558, 744, 1116, 1488, 1860, 0, 0, 512, 768, 1024, 1536, 2048, 0, 0}; 40 41 30 const double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 32, 64, 12, 20, 0, 0, 0, 0, 0, 0}; 42 //const double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 32, 64, 12, 20, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625}; 43 //old table has 0 for RFU: 44 //double atr_d_table[16] = {0, 1, 2, 4, 8, 16, 0, 0, 0, 0, 0.5, 0.25, 125, 0.0625, 0.03125, 0.015625}; 45 46 static const uint32_t atr_i_table[4] = {25, 50, 100, 0}; 47 48 /* 49 * Exported funcions definition 50 */ 31 51 32 #ifdef WITH_CARDREADER 52 33 int32_t ATR_InitFromArray(ATR *atr, const unsigned char atr_buffer[ATR_MAX_SIZE], uint32_t length) … … 55 36 unsigned char buffer[ATR_MAX_SIZE]; 56 37 uint32_t pointer = 0, pn = 0; 38 static const uint32_t atr_num_ib_table[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; 57 39 58 40 /* Check size of buffer */ … … 355 337 { 356 338 unsigned char FI, DI, II, PI1, PI2, N; 357 339 static const uint32_t atr_i_table[4] = {25, 50, 100, 0}; 358 340 if(name == ATR_PARAMETER_F) 359 341 {
Note:
See TracChangeset
for help on using the changeset viewer.