Changeset 669
- Timestamp:
- 12/04/09 00:15:47 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/csctapi/io_serial.c
r663 r669 591 591 } 592 592 unsigned int u = write (io->fd, data_w, (1+io_serial_need_dummy_char)*to_send); 593 _in_echo_read = 1; 593 // once the smargo is in native smartreader mode we don't get the echo of the sent data. 594 if(io->reader_type==RTYP_SMART) 595 _in_echo_read = 0; 596 else 597 _in_echo_read = 1; 594 598 if (u != (1+io_serial_need_dummy_char)*to_send) 595 599 { … … 966 970 return FALSE; 967 971 972 fs/=1000; // convert to kHz. 973 968 974 # ifdef DEBUG_IO 969 printf("IO: Setting SmartReader+ config : F=%d; D=%f; fs=%d; N=%d; T=%d; inv=%d \n", 970 sr_config->F, 971 sr_config->D, 972 sr_config->fs, 973 sr_config->N, 974 sr_config->T, 975 sr_config->inv); 976 # endif 977 fs/=1000; // convert to kHz. 978 # ifdef DEBUG_IO 979 printf("IO: Smartreader+ on %s: SR+ options F=%d D=%f fs=%dKHz N=%d T=%d inv=%d\n", 975 printf("IO: Smartreader+ on %s: F=%d D=%f fs=%dKHz N=%d T=%d inv=%d\n", 980 976 io->filename, 981 977 sr_config->F, … … 1007 1003 // Write SmartReader+ configuration commands. 1008 1004 1009 // XXXhow is (BYTE)D supposed to work for fractional values e.g. 0.125 ??1005 // how is (BYTE)D supposed to work for fractional values e.g. 0.125 ?? 1010 1006 cmd[0]=1; 1011 1007 cmd[1]=(BYTE)(((sr_config->F)>>8) & 0xFF); … … 1045 1041 } 1046 1042 1047 IO_Serial_Flush(io);1048 1049 1043 // We're entering SmartReader+ mode; speed up serial communication. 1050 // B230400 is the highest setting that sticks.1051 1044 cfsetispeed(&term,B115200); 1052 1045 cfsetospeed(&term,B115200);
Note:
See TracChangeset
for help on using the changeset viewer.