- Timestamp:
- 01/22/12 18:19:55 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc8in1/csctapi/ifd_sc8in1.c
r6271 r6272 555 555 memcpy(&termio_new, &reader->sc8in1_config->stored_termio[slot - 1], 556 556 sizeof(termio_new)); 557 if (Sc8in1_SetTioAttr(reader->handle, &termio_current, &termio_new) < 0) { 558 cs_log("ERROR: SC8in1 selectslot restore RS232 attributes\n"); 559 return ERROR; 560 } 561 if (Sc8in1_RestoreBaudrate(reader, &termio_current, &termio_new)) { 562 cs_log("ERROR: SC8in1 selectslot restore Bitrate attributes\n"); 563 return ERROR; 564 } 557 558 if (Sc8in1_NeedBaudrateChange(reader, reader->current_baudrate, &termio_current, &termio_new, 0)) { 559 cs_debug_mask(D_TRACE, "Sc8in1_SetTermioForSlot for select slot"); 560 // save current baudrate for later restore 561 if (Sc8in1_SetBaudrate(reader, reader->current_baudrate, &termio_new, 0)) { 562 cs_log("ERROR: SC8in1 Command Sc8in1_SetBaudrate\n"); 563 return ERROR; 564 } 565 } 566 else { 567 if (tcsetattr(reader->handle, TCSANOW, &termio_new) < 0) { 568 cs_log("ERROR: SC8in1 Command error in set RS232 attributes\n"); 569 return ERROR; 570 } 571 } 572 565 573 return OK; 566 574 }
Note:
See TracChangeset
for help on using the changeset viewer.