From b9ff276c358906706798417185a88f59facb8293 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 16 Aug 2001 20:52:05 +0000 Subject: 2001-08-16 Mike Siers * comm/tty_drv.c, comm/uart.c: Correct some minor cut and paste bugs. --- c/src/lib/libbsp/i386/shared/ChangeLog | 4 ++++ c/src/lib/libbsp/i386/shared/comm/tty_drv.c | 16 ++++++++++++++-- c/src/lib/libbsp/i386/shared/comm/uart.c | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'c/src/lib') diff --git a/c/src/lib/libbsp/i386/shared/ChangeLog b/c/src/lib/libbsp/i386/shared/ChangeLog index 74b499cd49..2aa06bdd4b 100644 --- a/c/src/lib/libbsp/i386/shared/ChangeLog +++ b/c/src/lib/libbsp/i386/shared/ChangeLog @@ -1,4 +1,8 @@ + * comm/tty_drv.c, comm/uart.c: Correct some minor cut and paste bugs. + +2001-07-03 Mike Seirs + * 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, 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 + * + * * 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 * @@ -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 */ -- cgit v1.2.3