diff options
author | Chris Johns <chrisj@rtems.org> | 2007-12-03 02:16:25 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2007-12-03 02:16:25 +0000 |
commit | 7ace3828e58768a131ee494f80dc5b9465a62248 (patch) | |
tree | c0e3e44e6ac6277b9c8eb4cdfb14811ff71426b9 /c/src/lib/libbsp/m68k/mcf5235/console/console.c | |
parent | 2007-11-29 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-7ace3828e58768a131ee494f80dc5b9465a62248.tar.bz2 |
2007-12-03 Chris Johns <chrisj@rtems.org>
* console/console.c: Set the baud rate for stdin to 19200 when
opening the console. This is the default rate for the dbug
monitor.
* gdb-init: New.
Diffstat (limited to 'c/src/lib/libbsp/m68k/mcf5235/console/console.c')
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/console/console.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5235/console/console.c b/c/src/lib/libbsp/m68k/mcf5235/console/console.c index dc81a0c574..5a8725310d 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/console/console.c +++ b/c/src/lib/libbsp/m68k/mcf5235/console/console.c @@ -722,6 +722,20 @@ rtems_device_driver console_open( } } + if (status == RTEMS_SUCCESSFUL) + { + /* + * Reset the default baudrate. + */ + struct termios term; + if (tcgetattr (STDIN_FILENO, &term) >= 0) + { + term.c_cflag &= ~(CBAUD | CSIZE); + term.c_cflag |= CS8 | B19200; + tcsetattr (STDIN_FILENO, TCSANOW, &term); + } + } + return( status ); } |