Changeset 4083 for trunk/csctapi
- Timestamp:
- 12/11/10 13:24:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/ifd_sc8in1.c
r3181 r4083 189 189 tcflush(reader->handle, TCIOFLUSH); // a non MCR reader might give longer answer 190 190 191 for (i=0; i<CS_MAXREADER; i++) //copy handle to other slots, FIXME change this if multiple sc8in1 readers 192 if (reader[i].typ == R_SC8in1) { 193 if (reader[i].slot == 0) {//not initialized yet 194 pos = strlen(reader[i].device)-2; //this is where : should be located; is also valid length of physical device name 195 if (reader[i].device[pos] != 0x3a) //0x3a = ":" 196 cs_log("ERROR: '%c' detected instead of slot separator `:` at second to last position of device %s", reader[i].device[pos], reader[i].device); 197 reader[i].slot=(int)reader[i].device[pos+1] - 0x30;//FIXME test boundaries 198 reader[i].device[pos]= 0; //slot 1 reader now gets correct physicalname 191 struct s_reader *rdr; 192 for (rdr=first_reader; rdr ; rdr=rdr->next) //copy handle to other slots, FIXME change this if multiple sc8in1 readers 193 if (rdr->typ == R_SC8in1) { 194 if (rdr->slot == 0) {//not initialized yet 195 pos = strlen(rdr->device)-2; //this is where : should be located; is also valid length of physical device name 196 if (rdr->device[pos] != 0x3a) //0x3a = ":" 197 cs_log("ERROR: '%c' detected instead of slot separator `:` at second to last position of device %s", rdr->device[pos], rdr->device); 198 rdr->slot=(int)rdr->device[pos+1] - 0x30;//FIXME test boundaries 199 rdr->device[pos]= 0; //slot 1 reader now gets correct physicalname 199 200 } 200 r eader[i].handle = fd;201 rdr->handle = fd; 201 202 } 202 203 … … 223 224 break; 224 225 } 225 sc8in1_clock |= (speed << (reader [i].slot - 1) * 2);226 sc8in1_clock |= (speed << (reader->slot - 1) * 2); 226 227 buff[0] = 0x63; //MCR set clock 227 228 buff[1] = (sc8in1_clock >> 8) & 0xFF;
Note:
See TracChangeset
for help on using the changeset viewer.