diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:49:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:49:17 +0000 |
commit | 1dad9e780ad4ed4603a0b36bd82bf260273341e5 (patch) | |
tree | 0877d330f9a18b1bd4d409cf647103182c70fcad /c/src/lib/libbsp/arm/edb7312/console/uart.c | |
parent | 2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-1dad9e780ad4ed4603a0b36bd82bf260273341e5.tar.bz2 |
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/uart.c: Use standardized
bsp_cleanup() which can optionally print a message, poll for user to
press key, and call bsp_reset(). Using this eliminates the various
bsp_cleanup() implementations which had their own implementation and
variety of string constants.
* startup/bspclean.c: Removed.
Diffstat (limited to 'c/src/lib/libbsp/arm/edb7312/console/uart.c')
-rw-r--r-- | c/src/lib/libbsp/arm/edb7312/console/uart.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/arm/edb7312/console/uart.c b/c/src/lib/libbsp/arm/edb7312/console/uart.c index 381eae680b..17a6d4caa1 100644 --- a/c/src/lib/libbsp/arm/edb7312/console/uart.c +++ b/c/src/lib/libbsp/arm/edb7312/console/uart.c @@ -5,12 +5,12 @@ * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at - * * http://www.rtems.com/license/LICENSE. * * * $Id$ -*/ + */ + #include <bsp.h> /* Must be before libio.h */ #include <rtems/libio.h> #include <termios.h> @@ -107,9 +107,6 @@ int uart_poll_read(int minor) return c; } -static void _BSP_null_char( char c ) {uart_write_polled(0, c);} -BSP_output_char_function_type BSP_output_char = _BSP_null_char; - static int uart_write(int minor, const char *buf, int len) { volatile uint32_t *data_reg; @@ -156,3 +153,20 @@ static void uart_init(int minor) 0x17); /* 9600 baud */ } + +/* + * Debug IO support + */ +static void _BSP_null_char(char c) +{ + uart_write_polled(0, c); +} + +static int _BSP_get_char(void) +{ + return uart_poll_read(0); +} + +BSP_output_char_function_type BSP_output_char = _BSP_null_char; + +BSP_polling_getchar_function_type BSP_poll_char = _BSP_get_char; |