From 1c6926c11f2e5efcb166c668b097d64a0321d66e Mon Sep 17 00:00:00 2001 From: Kevin Kirspel Date: Tue, 21 Mar 2017 15:39:48 -0400 Subject: 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. --- c/src/lib/libbsp/m68k/mcf52235/console/console.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libbsp/m68k/mcf52235') diff --git a/c/src/lib/libbsp/m68k/mcf52235/console/console.c b/c/src/lib/libbsp/m68k/mcf52235/console/console.c index 50c642a021..c2b6e36bfa 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/console/console.c +++ b/c/src/lib/libbsp/m68k/mcf52235/console/console.c @@ -152,7 +152,7 @@ static int IntUartSetAttributes(int minor, const struct termios *t) /* check to see if input is valid */ if (t != (const struct termios *) 0) { /* determine baud rate index */ - baud = rtems_termios_baud_to_number(t->c_cflag & CBAUD); + baud = rtems_termios_baud_to_number(t->c_ospeed); /* determine data bits */ switch (t->c_cflag & CSIZE) { @@ -598,8 +598,10 @@ rtems_device_driver console_open(rtems_device_major_number major, struct termios term; if (tcgetattr(STDIN_FILENO, &term) >= 0) { - term.c_cflag &= ~(CBAUD | CSIZE); - term.c_cflag |= CS8 | B19200; + term.c_cflag &= ~(CSIZE); + term.c_cflag |= CS8; + term.c_ispeed = B19200; + term.c_ospeed = B19200; tcsetattr(STDIN_FILENO, TCSANOW, &term); } } -- cgit v1.2.3