diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2012-04-05 10:23:19 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-04-05 14:47:41 -0500 |
commit | e60e862c64ee0c90cc8ddb51315694a4fa893f5d (patch) | |
tree | 7294171a8d5898d1ee9cc1a6468cb33a33c50e03 /c/src/lib/libbsp/sparc/leon3/console/console.c | |
parent | LEON3: cleanup console UART indexing handling (diff) | |
download | rtems-e60e862c64ee0c90cc8ddb51315694a4fa893f5d.tar.bz2 |
LEON3: console use register pointers instead of UART indexes
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/console/console.c')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/console/console.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/console/console.c b/c/src/lib/libbsp/sparc/leon3/console/console.c index a07fb154b9..320aa373a5 100644 --- a/c/src/lib/libbsp/sparc/leon3/console/console.c +++ b/c/src/lib/libbsp/sparc/leon3/console/console.c @@ -40,13 +40,13 @@ int syscon_uart_index __attribute__((weak)) = 0; */ /* - * console_outbyte_polled + * apbuart_outbyte_polled * * This routine transmits a character using polling. */ -void console_outbyte_polled( - int port, +extern void apbuart_outbyte_polled( + ambapp_apb_uart *regs, char ch ); @@ -58,7 +58,7 @@ void console_outbyte_polled( * This routine polls for a character. */ -int apbuart_inbyte_nonblocking(int port); +extern int apbuart_inbyte_nonblocking(ambapp_apb_uart *regs); /* body is in debugputs.c */ @@ -78,13 +78,13 @@ ssize_t console_write_support (int minor, const char *buf, size_t len) port = minor - 1; while (nwrite < len) { - console_outbyte_polled(port, *buf++); + apbuart_outbyte_polled((ambapp_apb_uart*)LEON3_Console_Uart[port], *buf++); nwrite++; } return nwrite; } -int console_inbyte_nonblocking(int minor) +int console_pollRead(int minor) { int port; @@ -93,7 +93,7 @@ int console_inbyte_nonblocking(int minor) else port = minor - 1; - return apbuart_inbyte_nonblocking(port); + return apbuart_inbyte_nonblocking((ambapp_apb_uart*)LEON3_Console_Uart[port]); } /* @@ -168,7 +168,7 @@ rtems_device_driver console_open( static const rtems_termios_callbacks pollCallbacks = { NULL, /* firstOpen */ NULL, /* lastClose */ - console_inbyte_nonblocking, /* pollRead */ + console_pollRead, /* pollRead */ console_write_support, /* write */ NULL, /* setAttributes */ NULL, /* stopRemoteTx */ |