diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-16 20:52:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-16 20:52:05 +0000 |
commit | b9ff276c358906706798417185a88f59facb8293 (patch) | |
tree | 44b65b0af42ff390259e7f4d82f67af03baafa6d /c/src/lib/libbsp/i386/shared/comm | |
parent | 2001-08-16 Mike Siers <mikes@poliac.com> (diff) | |
download | rtems-b9ff276c358906706798417185a88f59facb8293.tar.bz2 |
2001-08-16 Mike Siers <mikes@poliac.com>
* comm/tty_drv.c, comm/uart.c: Correct some minor cut and paste bugs.
Diffstat (limited to 'c/src/lib/libbsp/i386/shared/comm')
-rw-r--r-- | c/src/lib/libbsp/i386/shared/comm/tty_drv.c | 16 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/shared/comm/uart.c | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/i386/shared/comm/tty_drv.c b/c/src/lib/libbsp/i386/shared/comm/tty_drv.c index 502ab6c4f9..fd096fe9a6 100644 --- a/c/src/lib/libbsp/i386/shared/comm/tty_drv.c +++ b/c/src/lib/libbsp/i386/shared/comm/tty_drv.c @@ -18,6 +18,18 @@ * MODIFICATION/HISTORY: * * $Log$ + * Revision 1.4 2001/07/03 17:56:32 joel + * 2001-07-03 Mike Seirs <mike@poliac.com> + * + * * comm/tty_drv.c, comm/uart.c, comm/uart.h: Adds the capability + * to use task driven serial I/O to ti386 BSPs. This patch leaves thex + * default I/O mode to be IRQ. If you want to use task I/O mode, + * then the tty_drv.c file needs to be modified. Basically, all + * you need to change is the data values of the termios callbacks + * structure. This callback structure is used in the tty1_open + * and tty2_open functions. The values you need to set are commented + * out in the source code. + * * Revision 1.3 2000/12/05 16:37:38 joel * 2000-12-01 Joel Sherrill <joel@OARcorp.com> * @@ -198,7 +210,7 @@ tty1_open(rtems_device_major_number major, static rtems_termios_callbacks cb = { NULL, /* firstOpen */ - tty1_last_close, /* lastClose */ + NULL, /* lastClose */ BSP_uart_termios_read_com1, /* poll read */ BSP_uart_termios_write_com1, /* write */ tty1_conSetAttr, /* setAttributes */ @@ -488,7 +500,7 @@ tty2_open(rtems_device_major_number major, static rtems_termios_callbacks cb = { NULL, /* firstOpen */ - tty2_last_close, /* lastClose */ + NULL, /* lastClose */ BSP_uart_termios_read_com2, /* poll read */ BSP_uart_termios_write_com2, /* write */ tty2_conSetAttr, /* setAttributes */ diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c b/c/src/lib/libbsp/i386/shared/comm/uart.c index 50554cc142..3d0718cbe7 100644 --- a/c/src/lib/libbsp/i386/shared/comm/uart.c +++ b/c/src/lib/libbsp/i386/shared/comm/uart.c @@ -543,8 +543,8 @@ BSP_uart_termios_read_com2(int uart) char buf[40]; /* read current byte */ - while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM1, LSR) & DR )) { - buf[off++] = uread(BSP_UART_COM1, RBR); + while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM2, LSR) & DR )) { + buf[off++] = uread(BSP_UART_COM2, RBR); } /* write out data */ |