Changeset 6377
- Timestamp:
- 02/11/12 15:25:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc8in1/csctapi/ifd_sc8in1.c
r6375 r6377 256 256 return (-1); 257 257 } 258 if (buff[ 1] != 0x90) {258 if (buff[0] != 0x90) { 259 259 return (-1); 260 260 } 261 261 tcflush(reader->handle, TCIOFLUSH); 262 return buff[ 2];262 return buff[1]; 263 263 } 264 264 } … … 275 275 276 276 static int32_t sc8in1ReadStatus(struct s_reader *reader, unsigned char *status) { 277 unsigned char buff[ 8];277 unsigned char buff[9]; // read 1 echo byte + 8 status bytes 278 278 buff[0] = 0x47; 279 if (sc8in1_command(reader, buff, 1, 8, 0, 1, 0) < 0)280 return ERROR; 281 memcpy(&status[0], &buff[ 0], 8);279 if (sc8in1_command(reader, buff, 1, 9, 0, 1, 0) < 0) 280 return ERROR; 281 memcpy(&status[0], &buff[1], 8); 282 282 return OK; 283 283 }
Note:
See TracChangeset
for help on using the changeset viewer.