Changeset 706
- Timestamp:
- 12/05/09 19:29:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/io_serial.c
r700 r706 537 537 cfsetospeed(&newtio, IO_Serial_Bitrate(io->output_bitrate)); 538 538 cfsetispeed(&newtio, IO_Serial_Bitrate(io->input_bitrate)); 539 cs_debug("standard baudrate: cardmhz=%d mhz=%d -> effective baudrate %lu", io->cardmhz, io->mhz, io->output_bitrate); 539 540 } 540 541 #ifdef OS_LINUX … … 543 544 struct serial_struct nuts; 544 545 ioctl(io->fd, TIOCGSERIAL, &nuts); 545 int custom_baud = 9600* io->mhz / io->cardmhz;546 int custom_baud = io->output_bitrate * io->mhz / io->cardmhz; 546 547 nuts.custom_divisor = (nuts.baud_base + (custom_baud/2))/ custom_baud; 547 548 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.