Changeset c68b990 in rtems


Ignore:
Timestamp:
Jul 25, 1998, 2:51:57 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
da8ac60a
Parents:
a3c9f0d
Message:

Changed to utilize return status from rtems_termios_dequeue_characters()
and to correctly set the TX active indicator.

Location:
c/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libchip/serial/mc68681.c

    ra3c9f0d rc68b990  
    487487   */
    488488  rtems_interrupt_disable(Irql);
    489     Console_Port_Data[minor].bActive = TRUE;
     489    if ( Console_Port_Data[minor].bActive == FALSE ) {
     490      Console_Port_Data[minor].bActive = TRUE;
     491      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
     492    }
    490493    (*setReg)(pMC68681_port, MC68681_TX_BUFFER, *buf);
    491     mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
    492494  rtems_interrupt_enable(Irql);
    493495  return 1;
     
    674676
    675677  if(ucLineStatus & MC68681_IR_TX_READY) {
    676     mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
    677     rtems_termios_dequeue_characters(Console_Port_Data[minor].termios_data, 1);
     678    if (!rtems_termios_dequeue_characters(
     679                Console_Port_Data[minor].termios_data, 1)) {
     680      Console_Port_Data[minor].bActive = FALSE;
     681      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
     682    }
    678683  }
    679684
  • c/src/libchip/serial/mc68681.c

    ra3c9f0d rc68b990  
    487487   */
    488488  rtems_interrupt_disable(Irql);
    489     Console_Port_Data[minor].bActive = TRUE;
     489    if ( Console_Port_Data[minor].bActive == FALSE ) {
     490      Console_Port_Data[minor].bActive = TRUE;
     491      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
     492    }
    490493    (*setReg)(pMC68681_port, MC68681_TX_BUFFER, *buf);
    491     mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL);
    492494  rtems_interrupt_enable(Irql);
    493495  return 1;
     
    674676
    675677  if(ucLineStatus & MC68681_IR_TX_READY) {
    676     mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
    677     rtems_termios_dequeue_characters(Console_Port_Data[minor].termios_data, 1);
     678    if (!rtems_termios_dequeue_characters(
     679                Console_Port_Data[minor].termios_data, 1)) {
     680      Console_Port_Data[minor].bActive = FALSE;
     681      mc68681_enable_interrupts(minor, MC68681_IMR_ENABLE_ALL_EXCEPT_TX);
     682    }
    678683  }
    679684
Note: See TracChangeset for help on using the changeset viewer.