summaryrefslogtreecommitdiffstats
path: root/c/src/libchip
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-25 14:51:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-25 14:51:57 +0000
commitc68b990b995d213c552eafe5e4fd6e49145567c5 (patch)
tree2691b67091f70d7f7c7f1cbe2d59ee6fe01e9c87 /c/src/libchip
parentMoved console.c to libbsp/shared. (diff)
downloadrtems-c68b990b995d213c552eafe5e4fd6e49145567c5.tar.bz2
Changed to utilize return status from rtems_termios_dequeue_characters()
and to correctly set the TX active indicator.
Diffstat (limited to 'c/src/libchip')
-rw-r--r--c/src/libchip/serial/mc68681.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/c/src/libchip/serial/mc68681.c b/c/src/libchip/serial/mc68681.c
index d84a2a707c..6bdb93a88e 100644
--- a/c/src/libchip/serial/mc68681.c
+++ b/c/src/libchip/serial/mc68681.c
@@ -486,9 +486,11 @@ MC68681_STATIC int mc68681_write_support_int(
* Wake up the device
*/
rtems_interrupt_disable(Irql);
- Console_Port_Data[minor].bActive = TRUE;
+ if ( Console_Port_Data[minor].bActive == FALSE ) {
+ Console_Port_Data[minor].bActive = TRUE;
+ mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
+ }
(*setReg)(pMC68681_port, MC68681_TX_BUFFER, *buf);
- mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
rtems_interrupt_enable(Irql);
return 1;
}
@@ -673,8 +675,11 @@ MC68681_STATIC void mc68681_process(
ucLineStatus >>= 4;
if(ucLineStatus & MC68681_IR_TX_READY) {
- mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
- rtems_termios_dequeue_characters(Console_Port_Data[minor].termios_data, 1);
+ if (!rtems_termios_dequeue_characters(
+ Console_Port_Data[minor].termios_data, 1)) {
+ Console_Port_Data[minor].bActive = FALSE;
+ mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
+ }
}
}