Changeset 708
- Timestamp:
- 12/05/09 19:56:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/csctapi/io_serial.c
r707 r708 334 334 cfsetospeed(&newtio, IO_Serial_Bitrate_to_Speed(io->output_bitrate)); 335 335 cfsetispeed(&newtio, IO_Serial_Bitrate_to_Speed(io->input_bitrate)); 336 cs_debug("standard baudrate: cardmhz=%d mhz=%d -> effective baudrate %lu", io->cardmhz, io->mhz, io->output_bitrate); 336 337 } 337 338 #ifdef OS_LINUX … … 341 342 struct serial_struct nuts; 342 343 ioctl(io->fd, TIOCGSERIAL, &nuts); 343 int custom_baud = 9600* io->mhz / io->cardmhz;344 int custom_baud = io->output_bitrate * io->mhz / io->cardmhz; 344 345 nuts.custom_divisor = (nuts.baud_base + (custom_baud/2))/ custom_baud; 345 346 cs_debug("custom baudrate: cardmhz=%d mhz=%d custom_baud=%d baud_base=%d divisor=%d -> effective baudrate %d",
Note:
See TracChangeset
for help on using the changeset viewer.