diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-05-30 11:46:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-05-30 11:46:21 +0000 |
commit | dc104a4039397056fc276d4f9a14d28b1405ae95 (patch) | |
tree | 8bea1c7c5d678b78190211d263c069aa5fdb66c4 /c/src/lib/libbsp/powerpc/dmv177/console | |
parent | Used shared sbrk.c. (diff) | |
download | rtems-dc104a4039397056fc276d4f9a14d28b1405ae95.tar.bz2 |
Updated to current source and removed warnings.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/dmv177/console')
-rw-r--r-- | c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/dmv177/console/console.c | 29 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/dmv177/console/duart.c | 12 |
3 files changed, 21 insertions, 28 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in index eb8b914e91..cf4d17a5be 100644 --- a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in +++ b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in @@ -4,11 +4,9 @@ @SET_MAKE@ srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ -RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_ROOT = @top_srcdir@ PROJECT_ROOT = @PROJECT_ROOT@ -RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg PGM=${ARCH}/console.rel @@ -22,8 +20,8 @@ H_FILES= SRCS=$(C_FILES) $(H_FILES) OBJS=$(C_O_FILES) -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg +include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg +include $(RTEMS_ROOT)/make/leaf.cfg # # (OPTIONAL) Add local stuff here using += diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/console.c b/c/src/lib/libbsp/powerpc/dmv177/console/console.c index b1fc6f19e9..df38e346b4 100644 --- a/c/src/lib/libbsp/powerpc/dmv177/console/console.c +++ b/c/src/lib/libbsp/powerpc/dmv177/console/console.c @@ -38,7 +38,7 @@ /* Proto-types for Duart.C */ void console_initialize_interrupts( void ); -char console_inbyte_polled( int port ); +int console_inbyte_nonblocking( int port ); void console_outbyte_polled(int port, char ch); rtems_isr console_isr (rtems_vector_number vector); volatile void init_mc88681(); @@ -201,9 +201,16 @@ rtems_device_driver console_open( { rtems_status_code sc; int port = minor; -#if defined(CONSOLE_USE_INTERRUPTS) - rtems_libio_open_close_args_t *args = arg; -#endif + static const rtems_termios_callbacks pollCallbacks = { + NULL, /* firstOpen */ + NULL, /* lastClose */ + console_inbyte_nonblocking, /* pollRead */ + console_write_support, /* write */ + NULL, /* setAttributes */ + NULL, /* stopRemoteTx */ + NULL, /* startRemoteTx */ + 0 /* outputUsesInterrupts */ + }; /* * Verify the minor number is valid. @@ -217,16 +224,7 @@ rtems_device_driver console_open( /* * open the port as a termios console driver. */ -#if defined(CONSOLE_USE_INTERRUPTS) - sc = rtems_termios_open (major, minor, arg, - NULL, NULL, NULL, - console_write_support, 0); -#else - sc = rtems_termios_open (major, minor, arg, NULL, NULL, - console_inbyte_nonblocking, - console_write_support, - 0); -#endif + sc = rtems_termios_open (major, minor, arg, &pollCallbacks); return sc; } @@ -474,6 +472,3 @@ void console_exit() while (!(*_addr & MC68681_TX_EMPTY)); } #endif /* CONSOLE_USE_INTERRUPTS */ - - - diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/duart.c b/c/src/lib/libbsp/powerpc/dmv177/console/duart.c index f72b37a832..e74ef7c378 100644 --- a/c/src/lib/libbsp/powerpc/dmv177/console/duart.c +++ b/c/src/lib/libbsp/powerpc/dmv177/console/duart.c @@ -38,7 +38,7 @@ rtems_isr console_isr (rtems_vector_number vector); Ring_buffer_t TX_Buffer[2]; Ring_buffer_t RX_Buffer[2]; -/* PAGE +/*PAGE * * init_mc88681 * @@ -63,7 +63,7 @@ volatile void init_mc88681() Ring_buffer_Initialize( &TX_Buffer[ 1 ] ); } -/* PAGE +/*PAGE * * console_isr * @@ -86,7 +86,7 @@ rtems_isr console_isr (rtems_vector_number vector) } -/* PAGE +/*PAGE * * console_outbyte_polled * @@ -130,9 +130,9 @@ void console_outbyte_polled( } -/* PAGE +/*PAGE * - * console_inbyte_polled + * console_inbyte_nonblocking * * This routine reads a character from the UART. * @@ -148,7 +148,7 @@ void console_outbyte_polled( #define MC68681_RECEIVE_ERRORS \ (MC68681_OVERRUN_ERROR | MC68681_PARITY_ERROR | MC68681_FRAMING_ERROR) -char console_inbyte_polled( int port ) +int console_inbyte_nonblocking( int port ) { char status; char data; |