Allow custom baud rates for FTDI serial ports
- Termios: cf{get,set}{i,o}speed can handle arbitrary speed values.
- The value is stored in the appropriate fields of the termios structure
in this case. The old constants (stored in the flags) are preserved
for BeOS binary compatibility.
- Adjust the FTDI FT232* driver to accept custom rates, by replacing the
hardcoded regster values with a function that will compute it
according to FTDI documentation (confirmed giving the same values for
the existing baudrates).
This commit is contained in:
@@ -21,8 +21,8 @@ struct termios {
|
||||
tcflag_t c_cflag; /* control modes */
|
||||
tcflag_t c_lflag; /* local modes */
|
||||
char c_line; /* line discipline */
|
||||
speed_t c_ispeed; /* (unused) */
|
||||
speed_t c_ospeed; /* (unused) */
|
||||
speed_t c_ispeed; /* custom input baudrate */
|
||||
speed_t c_ospeed; /* custom output baudrate */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user