- Timestamp:
- 02/21/12 18:05:02 (12 years ago)
- Location:
- branches/sc8in1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc8in1/csctapi/ifd_sc8in1.c
r6435 r6436 41 41 void sc8in1_request_pop(struct s_reader *reader); 42 42 void sc8in1_request_push(struct s_reader *reader, struct s_sc8in1_time time); 43 void sc8in1_get_last_request(struct s_reader *reader, struct s_sc8in1_request*request);43 void sc8in1_get_last_request(struct s_reader *reader, void *request); 44 44 uint32_t sc8in1_request_pending(struct s_reader *reader); 45 45 … … 970 970 // check if there are any requests currently running 971 971 struct s_sc8in1_request *latest_request = NULL; 972 sc8in1_get_last_request(reader, latest_request);972 sc8in1_get_last_request(reader, &latest_request); 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"); 977 } 975 978 return 1; 976 979 } … … 979 982 // and we are the the latest request 980 983 sc8in1_request_pop(reader); 984 if (reader->sc8in1_interrupt == SC8IN1_LOCK_ECM) { 985 cs_log("SC8in1: lock safe 2"); 986 } 981 987 return 1; 982 988 } … … 985 991 // but there is some other reader waiting for a response 986 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 } 987 996 return 0; 988 997 } … … 1064 1073 } 1065 1074 1066 void sc8in1_get_last_request(struct s_reader *reader, struct s_sc8in1_request*request) {1075 void sc8in1_get_last_request(struct s_reader *reader, void *request) { 1067 1076 // returns in request the last active request 1068 struct s_sc8in1_request *req;1069 req = reader->sc8in1_config->request;1070 req uest = NULL;1071 while (req ) {1072 request = req;1073 req = req->next;1077 void **req = (void *)request; 1078 struct s_sc8in1_request *req2 = NULL; 1079 req2 = reader->sc8in1_config->request; 1080 while (req2) { 1081 *req = (void *)req2; 1082 req2 = req2->next; 1074 1083 } 1075 1084 } -
branches/sc8in1/global-functions.h
r6435 r6436 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); \ 549 cs_ debug_mask(D_ATR,"SC8in1: unlocked for interrupting access (slot %i)", reader->slot); \549 cs_log("SC8in1: unlocked for interrupting access (slot %i)", reader->slot); \ 550 550 cs_sleepms(reader->sc8in1_time_ecm.min - reader->sc8in1_config->slot_max_change_time * 2); \ 551 551 sc8in1_rwlock_int(&reader->sc8in1_config->sc8in1_lock, reader, SC8IN1_LOCK_ECM); \ 552 cs_ debug_mask(D_ATR,"SC8in1: locked after interrupting access (slot %i)", reader->slot); \552 cs_log("SC8in1: locked after interrupting access (slot %i)", reader->slot); \ 553 553 Sc8in1_Selectslot(reader, reader->slot); \ 554 554 } \
Note:
See TracChangeset
for help on using the changeset viewer.