summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/gen68340
diff options
context:
space:
mode:
authorKevin Kirspel <kevin-kirspel@idexx.com>2017-03-21 15:39:48 -0400
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-22 11:55:04 +0100
commit1c6926c11f2e5efcb166c668b097d64a0321d66e (patch)
tree30683dcf11979f51273413aade68a3828d00da10 /c/src/lib/libbsp/m68k/gen68340
parentbsp/atsam: Fix DMA support of some drivers (diff)
downloadrtems-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 'c/src/lib/libbsp/m68k/gen68340')
-rw-r--r--c/src/lib/libbsp/m68k/gen68340/console/console.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68340/console/console.c b/c/src/lib/libbsp/m68k/gen68340/console/console.c
index dd38559fb1..d6634b1079 100644
--- a/c/src/lib/libbsp/m68k/gen68340/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68340/console/console.c
@@ -474,20 +474,10 @@ SetAttributes (int minor, const struct termios *t)
{
rtems_interrupt_level level;
float ispeed, ospeed;
- int isp, osp;
-
- /* output speed */
- if (t->c_cflag & CBAUDEX)
- osp = (t->c_cflag & CBAUD) + CBAUD + 1;
- else
- osp = t->c_cflag & CBAUD;
-
- /* input speed */
- isp = (t->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
/* convert it */
- ispeed = rtems_termios_baud_to_number(isp);
- ospeed = rtems_termios_baud_to_number(osp);
+ ispeed = rtems_termios_baud_to_number(t->c_ispeed);
+ ospeed = rtems_termios_baud_to_number(t->c_ospeed);
if (ispeed || ospeed) {
/* update config table */
@@ -515,7 +505,7 @@ SetAttributes (int minor, const struct termios *t)
}
/* if serial module configuration has been changed */
- if (t->c_cflag & (CBAUD | CIBAUD | CSIZE | PARENB)) {
+ if (t->c_cflag & (CSIZE | PARENB)) {
rtems_interrupt_disable(level);
/* reinit the UART */
dbugInitialise();
@@ -693,7 +683,7 @@ rtems_device_driver console_control(
{
rtems_libio_ioctl_args_t *args = arg;
- if (args->command == RTEMS_IO_SET_ATTRIBUTES)
+ if (args->command == TIOCSETA)
SetAttributes (minor, (struct termios *)args->buffer);
return rtems_termios_ioctl (arg);