Changeset 7750
- Timestamp:
- 10/17/12 19:40:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/ifd_mp35.c
r7718 r7750 46 46 {0x42, "MP3.6 USB"}}; 47 47 48 static unsigned char current_product;49 50 48 static int32_t mp35_product_info(struct s_reader *reader, unsigned char high, unsigned char low, unsigned char code, MP35_info *info) 51 49 { … … 76 74 rdr_log(reader, "%s: started", __func__); 77 75 78 current_product = 0;79 76 original_mhz = reader->mhz; 80 77 original_cardmhz = reader->cardmhz; 81 78 82 // MP3.5 commands should be always be written using 9600 baud at 3.5 8MHz79 // MP3.5 commands should be always be written using 9600 baud at 3.57MHz 83 80 reader->mhz = 357; 84 81 reader->cardmhz = 357; … … 93 90 IO_Serial_DTR_Set(reader); 94 91 cs_sleepms(200); 92 IO_Serial_RTS_Set(reader); 95 93 IO_Serial_Flush(reader); 96 94 … … 172 170 memcpy(info, rec_buf, info_len); 173 171 info[info_len] = '\0'; 174 rdr_log(reader, "%s: FW Info - %s", info, __func__);172 rdr_log(reader, "%s: FW Info - %s", __func__, info); 175 173 } 176 174 … … 193 191 original_mhz = 357; 194 192 } 193 tcdrain(reader->handle); 195 194 } 196 195 … … 199 198 reader->cardmhz = original_cardmhz; 200 199 201 current_product = reader_info.current_product;202 203 200 /* Default serial port settings */ 204 201 if (reader->atr[0] == 0) { 202 IO_Serial_Flush(reader); 205 203 call(IO_Serial_SetParams (reader, DEFAULT_BAUDRATE, 8, PARITY_EVEN, 2, NULL, NULL)); 206 IO_Serial_Flush(reader);207 204 } 208 205 … … 214 211 rdr_debug_mask (reader, D_IFD, "Closing MP35 device %s", reader->device); 215 212 216 if(current_product != 0x10) // USB Phoenix 217 { 218 IO_Serial_DTR_Clr(reader); 219 } 220 213 IO_Serial_DTR_Clr(reader); 221 214 IO_Serial_Close(reader); 222 215
Note:
See TracChangeset
for help on using the changeset viewer.