Changeset 2021
- Timestamp:
- 04/08/10 19:54:08 (14 years ago)
- Location:
- trunk/csctapi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r1978 r2021 142 142 } 143 143 144 if (reader->typ == R_SC8in1) {145 int i = -1; //Flag for GetStatus init146 Sc8in1_GetStatus(reader, &i); //Initialize cardstatus147 }148 149 144 if (reader->typ <= R_MOUSE) 150 145 if (Phoenix_Init(reader)) { -
trunk/csctapi/ifd_sc8in1.c
r1969 r2021 36 36 static int sc8in1_command(struct s_reader * reader, unsigned char * buff, unsigned short lenwrite, unsigned short lenread) 37 37 { 38 int init_phase = (buff[0] == 0x63); //FIXME UGLY 38 39 struct termios termio, termiobackup; 39 40 … … 65 66 } 66 67 67 // switch SC8in1 to normal mode68 //cs_sleepms(10); FIXME do I need this?69 IO_Serial_DTR_Clr(reader);70 71 68 // restore data 72 69 memcpy(&termio,&termiobackup,sizeof(termio)); … … 75 72 return ERROR; 76 73 } 77 return OK; 74 75 // switch SC8in1 to normal mode 76 IO_Serial_DTR_Clr(reader); 77 return OK; 78 78 } 79 79 … … 135 135 current_slot = slot; 136 136 tcdrain(reader->handle); 137 // restore rs232 data 138 memcpy(&termio, &stored_termio[reader->slot-1], sizeof(termio)); 139 if (tcsetattr(reader->handle,TCSANOW,&termio) < 0) { 140 cs_log("ERROR: SC8in1 selectslot restore RS232 attributes\n"); 141 return ERROR; 142 } 137 143 // switch SC8in1 to normal mode 138 144 IO_Serial_DTR_Clr(reader); 139 // restore rs232 data140 memcpy(&termio, &stored_termio[reader->slot-1], sizeof(termio));141 if (tcsetattr(reader->handle,TCSANOW,&termio) < 0) {142 cs_log("ERROR: SC8in1 selectslot restore RS232 attributes\n");143 return ERROR;144 }145 145 //cs_sleepms(10); //FIXME do I need this? 146 146 return OK; … … 207 207 } 208 208 209 //IO_Serial_Flush(reader); //FIXME somehow ATR is generated and must be flushed 210 i = -1; //Flag for GetStatus init 211 Sc8in1_GetStatus(reader, &i); //Initialize cardstatus 212 209 213 return OK; 210 214 } … … 234 238 cardstatus = i; 235 239 } 236 //cs_log("Status: %02X, reader[ridx].slot=%i, 1<<slot-1=%02X bool=%i",result,reader[ridx].slot,1<<(reader[ridx].slot-1), result & 1<<(reader[ridx].slot-1));237 240 *in = (cardstatus & 1<<(reader->slot-1)); 238 241 return OK; -
trunk/csctapi/io_serial.c
r1951 r2021 150 150 if (ioctl(reader->handle, TIOCMSET, &msr)<0) 151 151 return ERROR; 152 return OK; 153 #endif 152 #endif 153 cs_debug("IO: Setting %s=%i",dtr?"DTR":"RTS", set); 154 return OK; 154 155 } 155 156
Note:
See TracChangeset
for help on using the changeset viewer.