diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 18:08:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 18:08:58 +0000 |
commit | a2a6187aedc1ebf640cb43d1d4caf9d50d5386ea (patch) | |
tree | c0e47c9dd3c52a2bd787f74e64de504a25cea820 /c/src/lib/libbsp/sparc/erc32/console/debugputs.c | |
parent | 2007-03-28 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-a2a6187aedc1ebf640cb43d1d4caf9d50d5386ea.tar.bz2 |
2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1233/bsps
* Makefile.am, console/console.c, console/debugputs.c: Move printk
support code into debug IO file so you do not get the entire console
driver when you do not want it.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/sparc/erc32/console/debugputs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sparc/erc32/console/debugputs.c b/c/src/lib/libbsp/sparc/erc32/console/debugputs.c index 9332e9f957..5f4a5a8f76 100644 --- a/c/src/lib/libbsp/sparc/erc32/console/debugputs.c +++ b/c/src/lib/libbsp/sparc/erc32/console/debugputs.c @@ -16,7 +16,6 @@ #include <bsp.h> #include <rtems/libio.h> #include <stdlib.h> -#include <assert.h> /* * console_outbyte_polled @@ -74,7 +73,7 @@ int console_inbyte_nonblocking( int port ) return (int) ERC32_MEC.UART_Channel_B; default: - assert( 0 ); + rtems_fatal_error_occurred( 'D' << 8 | (port & 0xffffff) ); } return -1; @@ -110,3 +109,14 @@ void DEBUG_puts( console_outbyte_polled( 0, '\n' ); ERC32_Restore_interrupt( ERC32_INTERRUPT_UART_A_RX_TX, old_level ); } + +/* + * To support printk + */ + +#include <rtems/bspIo.h> + +void BSP_output_char_f(char c) { console_outbyte_polled( 0, c ); } + +BSP_output_char_function_type BSP_output_char = BSP_output_char_f; +BSP_polling_getchar_function_type BSP_poll_char = NULL; |