diff options
author | Kevin Kirspel <kevin-kirspel@idexx.com> | 2017-03-21 15:39:48 -0400 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-22 11:55:04 +0100 |
commit | 1c6926c11f2e5efcb166c668b097d64a0321d66e (patch) | |
tree | 30683dcf11979f51273413aade68a3828d00da10 /cpukit/libcsupport/src/termios_setinitialbaud.c | |
parent | bsp/atsam: Fix DMA support of some drivers (diff) | |
download | rtems-1c6926c11f2e5efcb166c668b097d64a0321d66e.tar.bz2 |
termios: Synchronize with latest FreeBSD headers
Adding modified FreeBSD headers to synchronize RTEMS termios with
FreeBSD. Modify termios to support dedicated input and output baud for
termios structure. Updated BSPs to use dedicated input and output baud
in termios structure. Updated tools to use dedicated input and output
baud in termios structure. Updated termios testsuites to use dedicated
input and output baud in termios structure.
Close #2897.
Diffstat (limited to 'cpukit/libcsupport/src/termios_setinitialbaud.c')
-rw-r--r-- | cpukit/libcsupport/src/termios_setinitialbaud.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/termios_setinitialbaud.c b/cpukit/libcsupport/src/termios_setinitialbaud.c index c3e8e579a5..3b8853f6a8 100644 --- a/cpukit/libcsupport/src/termios_setinitialbaud.c +++ b/cpukit/libcsupport/src/termios_setinitialbaud.c @@ -26,12 +26,11 @@ int rtems_termios_set_initial_baud( ) { int rv = 0; - tcflag_t c_cflag_baud = rtems_termios_number_to_baud(baud); + speed_t spd = rtems_termios_number_to_baud(baud); - if ( c_cflag_baud != 0 ) { - tcflag_t cbaud = CBAUD; - - tty->termios.c_cflag = (tty->termios.c_cflag & ~cbaud) | c_cflag_baud; + if ( spd != 0 ) { + tty->termios.c_ispeed = spd; + tty->termios.c_ospeed = spd; } else { rv = -1; } |