Changeset 1278
- Timestamp:
- 01/18/10 11:14:45 (14 years ago)
- Location:
- trunk/csctapi
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/config.h
r1161 r1278 91 91 /* #undef ICC_TYPE_SYNC */ 92 92 93 /* Smartcard with direct convention */94 /* #undef IFD_TOWITOKO_CONVENTION_DIRECT */95 96 /* Smartcard with inverse convention */97 /* #undef IFD_TOWITOKO_CONVENTION_INVERSE */98 99 93 /* ATR for asynchronous cards is cheked */ 100 94 #define IFD_TOWITOKO_STRICT_ATR_CHECK 1 -
trunk/csctapi/config.h.dbg
r497 r1278 91 91 /* #undef ICC_TYPE_SYNC */ 92 92 93 /* Smartcard with direct convention */94 /* #undef IFD_TOWITOKO_CONVENTION_DIRECT */95 96 /* Smartcard with inverse convention */97 /* #undef IFD_TOWITOKO_CONVENTION_INVERSE */98 99 93 /* ATR for asynchronous cards is cheked */ 100 94 #define IFD_TOWITOKO_STRICT_ATR_CHECK 1 -
trunk/csctapi/config.h.std
r497 r1278 91 91 /* #undef ICC_TYPE_SYNC */ 92 92 93 /* Smartcard with direct convention */94 /* #undef IFD_TOWITOKO_CONVENTION_DIRECT */95 96 /* Smartcard with inverse convention */97 /* #undef IFD_TOWITOKO_CONVENTION_INVERSE */98 99 93 /* ATR for asynchronous cards is cheked */ 100 94 #define IFD_TOWITOKO_STRICT_ATR_CHECK 1 -
trunk/csctapi/ct_slot.c
r1266 r1278 290 290 { 291 291 if (slot->icc_type == CT_SLOT_ICC_ASYNC) 292 return ((void *) ICC_Async_GetAtr((ICC_Async *) slot->icc)); 292 return ((void *) atr ); 293 //return ((void *) ICC_Async_GetAtr((ICC_Async *) slot->icc)); 293 294 294 295 return NULL; -
trunk/csctapi/icc_async.c
r1266 r1278 211 211 /* Reset ICC */ 212 212 if (reader[ridx].typ == R_INTERNAL) { 213 if (!Sci_Reset(&( icc->atr)))214 { 215 icc->atr = NULL;213 if (!Sci_Reset(&(atr))) 214 { 215 atr = NULL; 216 216 return ICC_ASYNC_IFD_ERROR; 217 217 } … … 221 221 #ifdef COOL 222 222 if (reader[ridx].typ == R_INTERNAL) { 223 if (!Cool_Reset(&( icc->atr)))224 { 225 icc->atr = NULL;226 return ICC_ASYNC_IFD_ERROR; 227 } 228 } 229 else 230 #endif 231 if (!Phoenix_Reset(&( icc->atr)))232 { 233 icc->atr = NULL;223 if (!Cool_Reset(&(atr))) 224 { 225 atr = NULL; 226 return ICC_ASYNC_IFD_ERROR; 227 } 228 } 229 else 230 #endif 231 if (!Phoenix_Reset(&(atr))) 232 { 233 atr = NULL; 234 234 return ICC_ASYNC_IFD_ERROR; 235 235 } 236 236 /* Get ICC convention */ 237 if (ATR_GetConvention ( icc->atr, &(icc->convention)) != ATR_OK)238 { 239 ATR_Delete ( icc->atr);240 icc->atr = NULL;241 icc->convention = 0;237 if (ATR_GetConvention (atr, &(convention)) != ATR_OK) 238 { 239 ATR_Delete (atr); 240 atr = NULL; 241 convention = 0; 242 242 243 243 return ICC_ASYNC_ATR_ERROR; 244 244 } 245 245 246 icc->protocol_type = ATR_PROTOCOL_TYPE_T0;247 248 ATR_GetNumberOfProtocols ( icc->atr, &np);246 protocol_type = ATR_PROTOCOL_TYPE_T0; 247 248 ATR_GetNumberOfProtocols (atr, &np); 249 249 250 250 /* … … 253 253 */ 254 254 /* if (np>1) 255 ATR_GetProtocolType ( icc->atr, 1, &(icc->protocol_type));255 ATR_GetProtocolType (atr, 1, &(protocol_type)); 256 256 257 257 #ifdef DEBUG_ICC 258 printf("ICC: Detected %s convention processor card T=%d\n",( icc->convention == ATR_CONVENTION_DIRECT ? "direct" : "inverse"), icc->protocol_type);258 printf("ICC: Detected %s convention processor card T=%d\n",(convention == ATR_CONVENTION_DIRECT ? "direct" : "inverse"), protocol_type); 259 259 #endif 260 260 *///really should let PPS handle this 261 261 262 262 /* Initialize member variables */ 263 icc->baudrate = ICC_ASYNC_BAUDRATE; 264 265 if (icc->convention == ATR_CONVENTION_INVERSE) 263 if (convention == ATR_CONVENTION_INVERSE) 266 264 { 267 265 if (!IO_Serial_SetParity (PARITY_ODD)) 268 266 return ICC_ASYNC_IFD_ERROR; 269 267 } 270 else if( icc->protocol_type == ATR_PROTOCOL_TYPE_T14)268 else if(protocol_type == ATR_PROTOCOL_TYPE_T14) 271 269 { 272 270 if (!IO_Serial_SetParity (PARITY_NONE)) … … 288 286 } 289 287 290 int ICC_Async_SetTimings (ICC_Async * icc, ICC_Async_Timings * timings) 291 { 292 icc->timings.block_delay = timings->block_delay; 293 icc->timings.char_delay = timings->char_delay; 294 icc->timings.block_timeout = timings->block_timeout; 295 icc->timings.char_timeout = timings->char_timeout; 296 /* if (icc->protocol_type == ATR_PROTOCOL_TYPE_T1) 288 int ICC_Async_SetTimings () 289 { 290 /* if (protocol_type == ATR_PROTOCOL_TYPE_T1) 297 291 cs_debug("SetTimings: T1: chardelay %d, chartimeout CWT %d, blockdelay BGT??? %d, blocktimeout BWT %d",timings->char_delay,timings->char_timeout, timings->block_delay, timings->block_timeout); 298 292 else … … 307 301 if (ioctl(reader[ridx].handle, IOCTL_GET_PARAMETERS, ¶ms) < 0 ) 308 302 return ICC_ASYNC_IFD_ERROR; 309 switch ( icc->protocol_type) {303 switch (protocol_type) { 310 304 case ATR_PROTOCOL_TYPE_T1: 311 params.BWT = icc ->timings.block_timeout;312 params.CWT = icc ->timings.char_timeout;313 //params.BGT = icc ->timings.block_delay; load into params.EGT??305 params.BWT = icc_timings.block_timeout; 306 params.CWT = icc_timings.char_timeout; 307 //params.BGT = icc_timings.block_delay; load into params.EGT?? 314 308 break; 315 309 case ATR_PROTOCOL_TYPE_T0: 316 310 case ATR_PROTOCOL_TYPE_T14: 317 311 default: 318 params.WWT = icc ->timings.char_timeout;312 params.WWT = icc_timings.char_timeout; 319 313 break; 320 314 } … … 328 322 } 329 323 330 int ICC_Async_GetTimings (ICC_Async * icc, ICC_Async_Timings * timings)331 {332 timings->block_delay = icc->timings.block_delay;333 timings->char_delay = icc->timings.char_delay;334 timings->block_timeout = icc->timings.block_timeout;335 timings->char_timeout = icc->timings.char_timeout;336 337 return ICC_ASYNC_OK;338 }339 340 324 int ICC_Async_SetBaudrate (ICC_Async * icc, unsigned long baudrate) 341 325 { 342 icc->baudrate = baudrate;343 326 if (!Phoenix_SetBaudrate (baudrate)) 344 327 return ICC_ASYNC_IFD_ERROR; … … 349 332 int ICC_Async_GetBaudrate (ICC_Async * icc, unsigned long * baudrate) 350 333 { 351 (*baudrate) = icc->baudrate;334 (*baudrate) = reader[ridx].baudrate; 352 335 return ICC_ASYNC_OK; 353 336 } 354 337 355 int ICC_Async_Transmit ( ICC_Async * icc,unsigned size, BYTE * data)338 int ICC_Async_Transmit (unsigned size, BYTE * data) 356 339 { 357 340 BYTE *buffer = NULL, *sent; 358 341 IFD_Timings timings; 359 342 360 if ( icc->convention == ATR_CONVENTION_INVERSE && reader[ridx].typ != R_INTERNAL)343 if (convention == ATR_CONVENTION_INVERSE && reader[ridx].typ != R_INTERNAL) 361 344 { 362 345 buffer = (BYTE *) calloc(sizeof (BYTE), size); … … 370 353 } 371 354 372 timings.block_delay = icc ->timings.block_delay;373 timings.char_delay = icc ->timings.char_delay;355 timings.block_delay = icc_timings.block_delay; 356 timings.char_delay = icc_timings.char_delay; 374 357 375 358 #ifdef COOL … … 383 366 return ICC_ASYNC_IFD_ERROR; 384 367 385 if ( icc->convention == ATR_CONVENTION_INVERSE)368 if (convention == ATR_CONVENTION_INVERSE) 386 369 free (buffer); 387 370 … … 389 372 } 390 373 391 int ICC_Async_Receive ( ICC_Async * icc,unsigned size, BYTE * data)374 int ICC_Async_Receive (unsigned size, BYTE * data) 392 375 { 393 376 IFD_Timings timings; 394 377 395 timings.block_timeout = icc ->timings.block_timeout;396 timings.char_timeout = icc ->timings.char_timeout;378 timings.block_timeout = icc_timings.block_timeout; 379 timings.char_timeout = icc_timings.char_timeout; 397 380 398 381 #ifdef COOL … … 407 390 #endif 408 391 409 if ( icc->convention == ATR_CONVENTION_INVERSE && reader[ridx].typ != R_INTERNAL)392 if (convention == ATR_CONVENTION_INVERSE && reader[ridx].typ != R_INTERNAL) 410 393 ICC_Async_InvertBuffer (size, data); 411 394 412 395 return ICC_ASYNC_OK; 413 }414 415 ATR * ICC_Async_GetAtr (ICC_Async * icc)416 {417 return icc->atr;418 396 } 419 397 … … 427 405 428 406 /* Delete atr */ 429 ATR_Delete ( icc->atr);407 ATR_Delete (atr); 430 408 431 409 ICC_Async_Clear (icc); … … 466 444 static void ICC_Async_Clear (ICC_Async * icc) 467 445 { 468 icc->atr = NULL; 469 icc->baudrate = 0L; 470 icc->convention = 0; 471 icc->protocol_type = -1; 472 icc->timings.block_delay = 0; 473 icc->timings.char_delay = 0; 474 icc->timings.block_timeout = 0; 475 icc->timings.char_timeout = 0; 476 } 446 atr = NULL; 447 convention = 0; 448 protocol_type = -1; 449 icc_timings.block_delay = 0; 450 icc_timings.char_delay = 0; 451 icc_timings.block_timeout = 0; 452 icc_timings.char_timeout = 0; 453 } -
trunk/csctapi/icc_async.h
r1266 r1278 61 61 typedef struct 62 62 { 63 ATR *atr; /* Answer to reset of this ICC */64 int convention; /* Convention of this ICC */65 unsigned long baudrate; /* Current baudrate (bps) for transmiting to this ICC */66 ICC_Async_Timings timings; /* Current timings for transmiting to this ICC */67 BYTE protocol_type; /* Type of protocol */68 63 } 69 64 ICC_Async; 65 66 ATR *atr; /* Answer to reset of this ICC */ 67 int convention; /* Convention of this ICC */ 68 BYTE protocol_type; /* Type of protocol */ 69 ICC_Async_Timings icc_timings; /* Current timings for transmiting to this ICC */ 70 70 71 71 /* … … 82 82 83 83 /* Attributes */ 84 extern int ICC_Async_SetTimings (ICC_Async * icc, ICC_Async_Timings * timings); 85 extern int ICC_Async_GetTimings (ICC_Async * icc, ICC_Async_Timings * timings); 84 extern int ICC_Async_SetTimings (); 86 85 extern int ICC_Async_SetBaudrate (ICC_Async * icc, unsigned long baudrate); 87 86 extern int ICC_Async_GetBaudrate (ICC_Async * icc, unsigned long * baudrate); 88 extern ATR *ICC_Async_GetAtr (ICC_Async * icc);89 87 extern unsigned long ICC_Async_GetClockRate (); 90 88 91 89 /* Operations */ 92 extern int ICC_Async_Transmit ( ICC_Async * icc,unsigned size, BYTE * buffer);93 extern int ICC_Async_Receive ( ICC_Async * icc,unsigned size, BYTE * buffer);90 extern int ICC_Async_Transmit (unsigned size, BYTE * buffer); 91 extern int ICC_Async_Receive (unsigned size, BYTE * buffer); 94 92 95 93 #endif /* _ICC_ASYNC_ */ -
trunk/csctapi/ifd_phoenix.c
r1266 r1278 283 283 int Phoenix_SetBaudrate (unsigned long baudrate) 284 284 { 285 if(reader[ridx].typ == R_INTERNAL)286 return OK;287 288 285 #ifdef DEBUG_IFD 289 286 printf ("IFD: Setting baudrate to %lu\n", baudrate); 290 287 #endif 291 if (reader[ridx].baudrate == baudrate) 292 return OK; 293 294 /* Get current settings */ 295 struct termios tio; 296 if (tcgetattr (reader[ridx].handle, &tio) != 0) 297 return ERROR; 298 299 //write baudrate here! 300 if (!IO_Serial_SetBitrate (baudrate, &tio)) 301 return ERROR; 302 303 if (!IO_Serial_SetProperties(tio)) 304 return ERROR; 305 288 if ((reader[ridx].typ != R_INTERNAL) && (reader[ridx].baudrate != baudrate)) 289 { 290 /* Get current settings */ 291 struct termios tio; 292 if (tcgetattr (reader[ridx].handle, &tio) != 0) 293 return ERROR; 294 295 //write baudrate here! 296 if (!IO_Serial_SetBitrate (baudrate, &tio)) 297 return ERROR; 298 299 if (!IO_Serial_SetProperties(tio)) 300 return ERROR; 301 } 306 302 reader[ridx].baudrate = baudrate; 307 308 303 return OK; 309 304 } -
trunk/csctapi/pps.c
r1235 r1278 100 100 //also from FI -> F is easy, other way around not 101 101 102 ATR *atr;103 102 int ret; 104 103 bool PPS_success; … … 136 135 PPS_success = PPS_OK; 137 136 int protocol_selected = 0; //stores which TAi,TBi etc. bytes must be used 0 means not set 138 atr = ICC_Async_GetAtr (pps->icc);139 137 if ((*length) <= 0 || !PPS_success) // If not by command, or PPS Exchange by command failed: Try PPS Exchange by ATR or Get parameters from ATR 140 138 { … … 275 273 } 276 274 277 p ps->icc->protocol_type = pps->parameters.t;275 protocol_type = pps->parameters.t; 278 276 279 277 #ifdef DEBUG_PROTOCOL … … 363 361 return PPS_HANDSAKE_ERROR; 364 362 #else 365 if (ICC_Async_Transmit ( pps->icc,len_request, params) != ICC_ASYNC_OK)363 if (ICC_Async_Transmit (len_request, params) != ICC_ASYNC_OK) 366 364 return PPS_ICC_ERROR; 367 365 368 366 /* Get PPS confirm */ 369 if (ICC_Async_Receive ( pps->icc,2, confirm) != ICC_ASYNC_OK)367 if (ICC_Async_Receive (2, confirm) != ICC_ASYNC_OK) 370 368 return PPS_ICC_ERROR; 371 369 372 370 len_confirm = PPS_GetLength (confirm); 373 371 374 if (ICC_Async_Receive ( pps->icc,len_confirm - 2, confirm + 2) != ICC_ASYNC_OK)372 if (ICC_Async_Receive (len_confirm - 2, confirm + 2) != ICC_ASYNC_OK) 375 373 return PPS_ICC_ERROR; 376 374 … … 439 437 if (ioctl(reader[ridx].handle, IOCTL_GET_PARAMETERS, ¶ms) < 0 ) 440 438 return PPS_ICC_ERROR; 441 442 ATR *atr = ICC_Async_GetAtr (pps->icc);443 439 444 440 params.T = pps->parameters.t; -
trunk/csctapi/protocol_t0.c
r1235 r1278 104 104 int Protocol_T0_Init (Protocol_T0 * t0, ICC_Async * icc, PPS_ProtocolParameters * params, int selected_protocol) 105 105 { 106 ICC_Async_Timings timings;107 106 BYTE wi; 108 #ifndef PROTOCOL_T0_USE_DEFAULT_TIMINGS109 ATR *atr = ICC_Async_GetAtr (icc);110 #endif111 107 112 108 /* Set ICC */ … … 124 120 125 121 /* Set timings */ 126 ICC_Async_GetTimings (t0->icc, &timings); 127 128 timings.block_timeout = t0->wwt; 129 timings.char_timeout = t0->wwt; 130 131 ICC_Async_SetTimings (t0->icc, &timings); 122 icc_timings.block_timeout = t0->wwt; 123 icc_timings.char_timeout = t0->wwt; 124 ICC_Async_SetTimings (); 132 125 133 126 #ifdef DEBUG_PROTOCOL … … 140 133 int Protocol_T14_Init (Protocol_T14 * t14, ICC_Async * icc, PPS_ProtocolParameters * params, int selected_protocol) 141 134 { 142 ICC_Async_Timings timings;143 135 BYTE wi; 144 #ifndef PROTOCOL_T14_USE_DEFAULT_TIMINGS145 ATR *atr = ICC_Async_GetAtr (icc);146 #endif147 136 148 137 /* Set ICC */ … … 161 150 162 151 /* Set timings */ 163 ICC_Async_GetTimings (t14->icc, &timings); 164 165 timings.block_timeout = t14->wwt; 166 timings.char_timeout = t14->wwt; 167 168 ICC_Async_SetTimings (t14->icc, &timings); 169 152 icc_timings.block_timeout = t14->wwt; 153 icc_timings.char_timeout = t14->wwt; 154 ICC_Async_SetTimings (); 155 170 156 #ifdef DEBUG_PROTOCOL 171 157 printf ("Protocol: T=14: WWT=%d\n", (int)(t14->wwt)); … … 828 814 829 815 /* Send header bytes */ 830 if (ICC_Async_Transmit ( t0->icc,5, APDU_Cmd_Header (cmd)) != ICC_ASYNC_OK)816 if (ICC_Async_Transmit (5, APDU_Cmd_Header (cmd)) != ICC_ASYNC_OK) 831 817 { 832 818 (*rsp) = NULL; … … 848 834 { 849 835 /* Read one procedure byte */ 850 if (ICC_Async_Receive ( t0->icc,1, buffer + recv) != ICC_ASYNC_OK)836 if (ICC_Async_Receive (1, buffer + recv) != ICC_ASYNC_OK) 851 837 { 852 838 ret = PROTOCOL_T0_ICC_ERROR; … … 876 862 877 863 /* Read SW2 byte */ 878 if (ICC_Async_Receive ( t0->icc,1, buffer + recv) != ICC_ASYNC_OK)864 if (ICC_Async_Receive (1, buffer + recv) != ICC_ASYNC_OK) 879 865 { 880 866 ret = PROTOCOL_T0_ICC_ERROR; … … 898 884 return PROTOCOL_T0_ERROR; 899 885 900 if (ICC_Async_Transmit( t0->icc,MAX (Lc - sent, 0), data + sent) != ICC_ASYNC_OK) /* Send remaining data bytes */886 if (ICC_Async_Transmit(MAX (Lc - sent, 0), data + sent) != ICC_ASYNC_OK) /* Send remaining data bytes */ 901 887 { 902 888 ret = PROTOCOL_T0_ICC_ERROR; … … 917 903 918 904 /* Read remaining data bytes */ 919 if (ICC_Async_Receive( t0->icc,MAX (Le - recv, 0), buffer + recv) != ICC_ASYNC_OK)905 if (ICC_Async_Receive(MAX (Le - recv, 0), buffer + recv) != ICC_ASYNC_OK) 920 906 {//printf("error %d\n", (int)Le); 921 907 ret = PROTOCOL_T0_ICC_ERROR; … … 939 925 940 926 /* Send next data byte */ 941 if (ICC_Async_Transmit ( t0->icc,1, data + sent) !=ICC_ASYNC_OK)927 if (ICC_Async_Transmit (1, data + sent) !=ICC_ASYNC_OK) 942 928 { 943 929 ret = PROTOCOL_T0_ICC_ERROR; … … 954 940 955 941 /* Read next data byte */ 956 if (ICC_Async_Receive ( t0->icc,1, buffer + recv) != ICC_ASYNC_OK)942 if (ICC_Async_Receive (1, buffer + recv) != ICC_ASYNC_OK) 957 943 { 958 944 ret = PROTOCOL_T0_ICC_ERROR; … … 1004 990 { 1005 991 /* Send 0x01 byte */ 1006 if (ICC_Async_Transmit ( t14->icc,1, &b1) != ICC_ASYNC_OK)992 if (ICC_Async_Transmit (1, &b1) != ICC_ASYNC_OK) 1007 993 { 1008 994 (*rsp) = NULL; … … 1011 997 1012 998 /* Send apdu */ 1013 if (ICC_Async_Transmit ( t14->icc,cmd_len, cmd_raw) != ICC_ASYNC_OK)999 if (ICC_Async_Transmit (cmd_len, cmd_raw) != ICC_ASYNC_OK) 1014 1000 { 1015 1001 (*rsp) = NULL; … … 1018 1004 1019 1005 /* Send xor byte */ 1020 if (ICC_Async_Transmit ( t14->icc,1, &ixor) != ICC_ASYNC_OK)1006 if (ICC_Async_Transmit (1, &ixor) != ICC_ASYNC_OK) 1021 1007 { 1022 1008 (*rsp) = NULL; … … 1031 1017 1032 1018 /* Send apdu */ 1033 if (ICC_Async_Transmit ( t14->icc,cmd_len+2, buffer) != ICC_ASYNC_OK)1019 if (ICC_Async_Transmit (cmd_len+2, buffer) != ICC_ASYNC_OK) 1034 1020 { 1035 1021 (*rsp) = NULL; … … 1068 1054 } 1069 1055 /* Read one procedure byte */ 1070 if (ICC_Async_Receive ( t14->icc,8, buffer) != ICC_ASYNC_OK)1056 if (ICC_Async_Receive (8, buffer) != ICC_ASYNC_OK) 1071 1057 { 1072 1058 ret = PROTOCOL_T14_ICC_ERROR; … … 1079 1065 if(recv) 1080 1066 { 1081 if (ICC_Async_Receive ( t14->icc,recv, buffer + 8) != ICC_ASYNC_OK)1067 if (ICC_Async_Receive (recv, buffer + 8) != ICC_ASYNC_OK) 1082 1068 { 1083 1069 ret = PROTOCOL_T14_ICC_ERROR; … … 1086 1072 } 1087 1073 1088 if (ICC_Async_Receive ( t14->icc,1, &ixor) != ICC_ASYNC_OK)1074 if (ICC_Async_Receive (1, &ixor) != ICC_ASYNC_OK) 1089 1075 { 1090 1076 ret = PROTOCOL_T14_ICC_ERROR; -
trunk/csctapi/protocol_t1.c
r1219 r1278 77 77 Protocol_T1_Init (Protocol_T1 * t1, ICC_Async * icc, int selected_protocol) 78 78 { 79 ICC_Async_Timings timings;80 79 BYTE ta, tb, tc, cwi, bwi; 81 80 unsigned long baudrate; 82 81 double work_etu; 83 ATR *atr;84 82 int i; 85 83 86 84 /* Set ICC */ 87 85 t1->icc = icc; 88 89 /* Get ATR of the card */90 atr = ICC_Async_GetAtr (t1->icc);91 86 92 87 /* Set IFSC */ … … 152 147 153 148 /* Set timings */ 154 ICC_Async_GetTimings (t1->icc, &timings); 155 156 timings.block_timeout = t1->bwt; 157 timings.char_timeout = t1->cwt; 158 timings.block_delay = t1->bgt; 159 160 ICC_Async_SetTimings (t1->icc, &timings); 149 icc_timings.block_timeout = t1->bwt; 150 icc_timings.char_timeout = t1->cwt; 151 icc_timings.block_delay = t1->bgt; 152 ICC_Async_SetTimings (); 161 153 162 154 #ifdef DEBUG_PROTOCOL … … 423 415 length = T1_Block_RawLen (block); 424 416 425 if (ICC_Async_Transmit ( t1->icc,length, buffer) != ICC_ASYNC_OK)417 if (ICC_Async_Transmit (length, buffer) != ICC_ASYNC_OK) 426 418 { 427 419 ret = PROTOCOL_T1_ICC_ERROR; … … 442 434 443 435 /* Receive four mandatory bytes */ 444 if (ICC_Async_Receive ( t1->icc,4, buffer) != ICC_ASYNC_OK)436 if (ICC_Async_Receive (4, buffer) != ICC_ASYNC_OK) 445 437 { 446 438 ret = PROTOCOL_T1_ICC_ERROR; … … 456 448 457 449 /* Receive remaining bytes */ 458 if (ICC_Async_Receive ( t1->icc,buffer[2], buffer + 4) !=450 if (ICC_Async_Receive (buffer[2], buffer + 4) != 459 451 ICC_ASYNC_OK) 460 452 { … … 498 490 Protocol_T1_UpdateBWT (Protocol_T1 * t1, unsigned short bwt) 499 491 { 500 ICC_Async_Timings timings; 501 502 ICC_Async_GetTimings (t1->icc, &timings); 503 504 timings.block_timeout = bwt; 505 506 ICC_Async_SetTimings (t1->icc, &timings); 492 icc_timings.block_timeout = bwt; 493 ICC_Async_SetTimings (); 507 494 508 495 return PROTOCOL_T1_OK;
Note:
See TracChangeset
for help on using the changeset viewer.