Home |
RTKernel-32 Programming Manual Function COMEnableFIFO Function COMWaitSendBufferEmpty |
Function COMEnableFIFOCOMEnableFIFO can enable or disable the internal buffer of 16550A or compatible UARTs: void COMEnableFIFO(int Port, int Trigger); If the port uses a 16550A UART, this function can be used to set the interrupt trigger level. ParametersPortThe port to configure. TriggerThe trigger level. It specifies after how many received bytes an interrupt is generated. If no bytes are received during a time span sufficient to transmit four bytes, the UART will generate a time-out interrupt for all trigger levels. Thus, no data will stay in the FIFO buffer forever. By default, RTCom sets the trigger level to 8 if it detects a 16550A. You may change this value to 1, 4, 8, or 14. A value of 0 disables the FIFO buffer. Low values for the trigger level may result in a faster response of tasks waiting for data; however, overall system performance will suffer due to many interrupts. With high values (e.g., 8 or 14), you get less interrupts resulting in a higher system throughput. At 14, overrun errors may occur at very high baud rates. For most applications, trigger level 8 is a good compromise.
|