summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mcf5235/console/console.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2007-12-03 02:16:25 +0000
committerChris Johns <chrisj@rtems.org>2007-12-03 02:16:25 +0000
commit7ace3828e58768a131ee494f80dc5b9465a62248 (patch)
treec0e3e44e6ac6277b9c8eb4cdfb14811ff71426b9 /c/src/lib/libbsp/m68k/mcf5235/console/console.c
parent2007-11-29 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-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.c14
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 );
}