Changeset 6098
- Timestamp:
- 12/20/11 16:18:10 (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r5928 r6098 336 336 #if defined(LIBUSB) 337 337 case R_SMART: 338 call (SR_Reset(reader, atr)); 338 if ( ! reader->ins7e11_fast_reset) { 339 call (SR_Reset(reader, atr)); 340 } 341 else { 342 cs_log("Doing fast reset"); 343 call (SR_FastReset_With_ATR(reader, atr)); 344 } 339 345 break; 340 346 #endif -
trunk/csctapi/ifd_pcsc.c
r5907 r6098 247 247 { 248 248 cs_debug_mask (D_IFD, "PCSC : Closing device %s", pcsc_reader->device); 249 SCardDisconnect((SCARDHANDLE)(pcsc_reader->hCard),SCARD_ RESET_CARD);249 SCardDisconnect((SCARDHANDLE)(pcsc_reader->hCard),SCARD_LEAVE_CARD); 250 250 SCardReleaseContext(pcsc_reader->hContext); 251 251 pcsc_reader->hCard=0; -
trunk/csctapi/ifd_phoenix.c
r5905 r6098 110 110 int32_t parity[3] = {PARITY_EVEN, PARITY_ODD, PARITY_NONE}; 111 111 112 call (Phoenix_SetBaudrate (reader, DEFAULT_BAUDRATE)); 112 if ( ! reader->ins7e11_fast_reset ) { 113 call (Phoenix_SetBaudrate (reader, DEFAULT_BAUDRATE)); 114 } 115 else { 116 cs_log("Doing fast reset"); 117 } 113 118 114 119 for(i=0; i<3; i++) { -
trunk/csctapi/ifd_smartreader.c
r6047 r6098 500 500 } 501 501 502 int32_t SR_FastReset_With_ATR(struct s_reader *reader, ATR *atr) 503 { 504 unsigned char data[ATR_MAX_SIZE]; 505 int32_t ret; 506 int32_t atr_ok=ERROR; 507 508 smart_fastpoll(reader, TRUE); 509 //Set the DTR HIGH and RTS HIGH 510 smartreader_setdtr_rts(reader, 1, 1); 511 // A card with an active low reset is reset by maintaining RST in state L for at least 40 000 clock cycles 512 // so if we have a base freq of 3.5712MHz : 40000/3690000 = .0112007168458781 seconds, aka 11ms 513 // so if we have a base freq of 6.00MHz : 40000/6000000 = .0066666666666666 seconds, aka 6ms 514 cs_sleepms(20); 515 516 //Set the DTR HIGH and RTS LOW 517 smartreader_setdtr_rts(reader, 1, 0); 518 519 //Read the ATR 520 ret = smart_read(reader,data, ATR_MAX_SIZE,1); 521 522 // parse atr 523 if(ATR_InitFromArray (atr, data, ret) == ATR_OK) { 524 cs_debug_mask (D_DEVICE, "IO:SR: ATR parsing OK"); 525 atr_ok=OK; 526 } 527 528 smart_fastpoll(reader, FALSE); 529 return atr_ok; 530 } 531 502 532 static void EnableSmartReader(S_READER *reader, int32_t clock, uint16_t Fi, unsigned char Di, unsigned char Ni, unsigned char T, unsigned char inv,int32_t parity) { 503 533 -
trunk/csctapi/ifd_smartreader.h
r5784 r6098 27 27 int32_t SR_Close (struct s_reader *reader); 28 28 int32_t SR_FastReset(struct s_reader *reader, int32_t delay); 29 int32_t SR_FastReset_With_ATR(struct s_reader *reader, ATR *atr); 29 30 30 31 #endif // __SMARTREADER__ -
trunk/globals.h
r6092 r6098 421 421 #define ACTION_READER_INIT 8 422 422 #define ACTION_READER_RESTART 9 423 #define ACTION_READER_RESET_FAST 10 423 424 424 425 #define ACTION_CLIENT_TCP_CONNECT 21 … … 1185 1186 uint8_t ins7E[0x1A+1]; 1186 1187 uint8_t ins7E11[0x01+1]; 1188 int8_t ins7e11_fast_reset; 1187 1189 1188 1190 #ifdef MODULE_PANDORA -
trunk/oscam.c
r6093 r6098 3201 3201 return NULL; 3202 3202 break; 3203 case ACTION_READER_RESET_FAST: 3204 reader->ins7e11_fast_reset = 1; 3205 reader->card_status = CARD_NEED_INIT; 3206 reader_reset(reader); 3207 reader->ins7e11_fast_reset = 0; 3208 break; 3203 3209 3204 3210 case ACTION_CLIENT_UDP: -
trunk/reader-videoguard-common.c
r6064 r6098 105 105 0x00, 0x50, 0x31, 0x01, 0x00, 0x11 }, 106 106 22, 2004, 0, NDS2, "VideoGuard Sky Germany"}, 107 {{ 0x3F, 0xFF, 0x15, 0x25, 0x03, 0x10, 0x80, 0x41, 0xB0, 0x07, 0x69, 0xFF, 0x4A, 0x50, 0x70, 0x00, 108 0x00, 0x50, 0x31, 0x01, 0x00, 0x15 }, 109 22, 2004, 0, NDS2, "VideoGuard Sky Germany"}, 107 110 {{ 0x3F, 0xFF, 0x14, 0x25, 0x03, 0x10, 0x80, 0x41, 0xB0, 0x01, 0x69, 0xFF, 0x4A, 0x50, 0x70, 0x00, 108 111 0x00, 0x5A, 0x48, 0x01, 0x00, 0x00 }, -
trunk/reader-videoguard2.c
r6064 r6098 541 541 if (TA1 != reader->ins7E11[0x00]) { 542 542 cs_log("classD0 ins7E11: Scheduling card reset for TA1 change from %02X to %02X", TA1, reader->ins7E11[0x00]); 543 add_job(reader->client, ACTION_READER_RESTART, NULL, 0); 543 if (reader->typ == R_MOUSE || reader->typ == R_SC8in1 || reader->typ == R_SMART ) { 544 add_job(reader->client, ACTION_READER_RESET_FAST, NULL, 0); 545 } 546 else { 547 add_job(reader->client, ACTION_READER_RESTART, NULL, 0); 548 } 544 549 } 545 550 }
Note:
See TracChangeset
for help on using the changeset viewer.