This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Terminal interface and non-standard baudrates


Hello,

A question/feature request related to the terminal interface / serial port:
On Linux, there are two possibilities to select non-standrad baudrates.
The old/deprecated solution is to set the baudrate to B38400 and do an
additional ioctl(... TIOCSSERIAL, struct serial_struct ) with a custom
divisor and the ASYNC_SPD_CUST-flag selected in the serial_struct.
The new solution (introduced in 2007 ?) is to ORe the c_cflag of struct
termios with BOTHER (= CBAUDEX | B0). In this case, the
c_ispeed/c_ospeed-fields contain the baudrate directly.
I noticed that BOTHER is not defined/available when I include
<termios.h> and that c_ispeed/c_ospeed always contain (c_cflag & CBAUD),
so I assume that this is currently not supported by the C-library, right ?
Would it be possible to add this feature to the C-library ?

Regards,

Frank


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]