- Timestamp:
- 02/21/12 21:34:49 (12 years ago)
- Location:
- branches/sc8in1
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc8in1/csctapi/ifd_sc8in1.c
r6436 r6438 973 973 if ( ! latest_request ) { 974 974 // there are no requests --> good to go 975 if (reader->sc8in1_interrupt == SC8IN1_LOCK_ECM) {976 cs_log("SC8in1: lock safe 1 ");975 if (reader->sc8in1_interrupt & SC8IN1_LOCK_MODE_ECM) { 976 cs_log("SC8in1: lock safe 1 slot%i", reader->slot); 977 977 } 978 978 return 1; … … 982 982 // and we are the the latest request 983 983 sc8in1_request_pop(reader); 984 if (reader->sc8in1_interrupt == SC8IN1_LOCK_ECM) {985 cs_log("SC8in1: lock safe 2 ");984 if (reader->sc8in1_interrupt & SC8IN1_LOCK_MODE_ECM) { 985 cs_log("SC8in1: lock safe 2 slot%i", reader->slot); 986 986 } 987 987 return 1; … … 991 991 // but there is some other reader waiting for a response 992 992 // since we are not the latest request (this shouldn't happen) 993 if (reader->sc8in1_interrupt == SC8IN1_LOCK_ECM) { 994 cs_log("SC8in1: lock safe 3"); 995 } 993 if (reader->sc8in1_interrupt & SC8IN1_LOCK_MODE_ECM) { 994 cs_log("SC8in1: lock safe 3 slot%i", reader->slot); 995 } 996 return 0; 997 } 998 else if (reader->sc8in1_interrupt & SC8IN1_LOCK_MODE_ECM != SC8IN1_LOCK_MODE_ECM) { 999 // this is some other lock request, i.e. getStatus 1000 // Not ok to go, since we are in interrupt mode 996 1001 return 0; 997 1002 } … … 1008 1013 else { 1009 1014 // we don't fit into the request 1010 cs_log("SC8in1: Fastmode request not possible (not interrupting slot%i with slot%i, slotchangetime=%ims)", latest_request->reader->slot, reader->slot, reader->sc8in1_config->slot_max_change_time);1015 // cs_log("SC8in1: Fastmode request not possible (not interrupting slot%i with slot%i, slotchangetime=%ims)", latest_request->reader->slot, reader->slot, reader->sc8in1_config->slot_max_change_time); 1011 1016 return 0; 1012 1017 } -
branches/sc8in1/global-functions.h
r6436 r6438 544 544 #define INTERRUPT_SC8IN1_ECM \ 545 545 { \ 546 if (reader->typ == R_SC8in1 && reader->sc8in1_interrupt == SC8IN1_LOCK_ECM) { \546 if (reader->typ == R_SC8in1 && (reader->sc8in1_interrupt & SC8IN1_LOCK_ECM == SC8IN1_LOCK_ECM)) { \ 547 547 if (reader->sc8in1_time_ecm.min - reader->sc8in1_config->slot_max_change_time * 2 > 0) { \ 548 548 sc8in1_rwunlock_int(&reader->sc8in1_config->sc8in1_lock, reader, SC8IN1_LOCK_ECM); \ … … 558 558 } \ 559 559 } 560 #define SC8IN1_INTERRUPT_MODE_ECM_START \ 561 { \ 562 if (reader->typ == R_SC8in1) { \ 563 reader->sc8in1_interrupt |= SC8IN1_LOCK_MODE_ECM; \ 564 } \ 565 } 566 #define SC8IN1_INTERRUPT_MODE_ECM_STOP \ 567 { \ 568 if (reader->typ == R_SC8in1) { \ 569 reader->sc8in1_interrupt &= ~SC8IN1_LOCK_MODE_ECM; \ 570 } \ 571 } 560 572 #define SC8IN1_INTERRUPT_PRE_ECM \ 561 573 { \ 562 574 if (reader->typ == R_SC8in1) { \ 563 reader->sc8in1_interrupt = SC8IN1_LOCK_ECM; \575 reader->sc8in1_interrupt |= SC8IN1_LOCK_ECM; \ 564 576 } \ 565 577 } … … 567 579 { \ 568 580 if (reader->typ == R_SC8in1) { \ 569 reader->sc8in1_interrupt = SC8IN1_LOCK_DEFAULT; \581 reader->sc8in1_interrupt &= ~SC8IN1_LOCK_ECM; \ 570 582 } \ 571 583 } -
branches/sc8in1/globals.h
r6430 r6438 1025 1025 1026 1026 #define SC8IN1_LOCK_DEFAULT 0 1027 #define SC8IN1_LOCK_ECM 1 1027 #define SC8IN1_LOCK_MODE_ECM 1 1028 #define SC8IN1_LOCK_ECM 2 1028 1029 1029 1030 struct s_sc8in1_display { -
branches/sc8in1/reader-common.c
r6332 r6438 383 383 { 384 384 int32_t rc=-1; 385 SC8IN1_INTERRUPT_MODE_ECM_START 385 386 if( (rc=reader_checkhealth(reader)) ) { 386 387 struct s_client *cl = reader->client; … … 391 392 } 392 393 393 if (reader->csystem.active && reader->csystem.do_ecm) 394 if (reader->csystem.active && reader->csystem.do_ecm) 394 395 rc=reader->csystem.do_ecm(reader, er, ea); 395 396 else 396 397 rc=0; 397 398 } 399 SC8IN1_INTERRUPT_MODE_ECM_STOP 398 400 return(rc); 399 401 }
Note:
See TracChangeset
for help on using the changeset viewer.