RTEMS
5.1
|
Typedefs | |
typedef enum ALT_16550_INT_STATUS_e | ALT_16550_INT_STATUS_t |
Enumerations | |
enum | ALT_16550_INT_STATUS_e { ALT_16550_INT_STATUS_LINE = 0x6, ALT_16550_INT_STATUS_RX_DATA = 0x4, ALT_16550_INT_STATUS_RX_TIMEOUT = 0xC, ALT_16550_INT_STATUS_TX_IDLE = 0x2, ALT_16550_INT_STATUS_MODEM = 0x0, ALT_16550_INT_STATUS_NONE = 0x1 } |
This group of APIs provides access, configuration, and control of the UART interrupts.
typedef enum ALT_16550_INT_STATUS_e ALT_16550_INT_STATUS_t |
This type definition enumerates the different interrupt conditions that can be generated by the UART controller.
Interrupts are listed in highest to lowest priority order.
This type definition enumerates the different interrupt conditions that can be generated by the UART controller.
Interrupts are listed in highest to lowest priority order.
Enumerator | |
---|---|
ALT_16550_INT_STATUS_LINE | This interrupt signals that a overrun, parity, or framing error occurred, or a break event occured. The interrupt is cleared by reading the line status by calling alt_16550_line_status_get() or by disabling line status interrupts by calling alt_16550_int_disable_line(). |
ALT_16550_INT_STATUS_RX_DATA | This interrupt signals that some data is available to be read from the UART. The definition of some depends on whether FIFOs are enabled or not. If FIFOs are disabled, this interrupt signals that the receiver contains data. In this case, the interrupt is cleared by reading the data from the UART by calling alt_16550_read(). If FIFOs are enabled, this interrupt signals that the receiver FIFO level is above the receiver trigger level specified. In this case, the interrupt is cleared by reading a sufficiently large buffer from the receiver FIFO such that the FIFO is filled below the receiver trigger level specified by calling alt_16550_fifo_read() or by adjusting the receiver trigger level appropriately by calling alt_16550_fifo_trigger_set_rx(). In either case, this interrupt can also be cleared by disabling receiver interrupts by calling alt_16550_int_disable_rx(). |
ALT_16550_INT_STATUS_RX_TIMEOUT | This interrupt signals that data is available in the receiver FIFO and that there has been no activity with the receiver FIFO for the last 4 character frames. In essence, the receiver FIFO has temporarily settled thus it may be a good time to empty the receiver FIFO. This interrupt is only available if FIFOs are enabled. The interrupt is cleared by reading from the receiver FIFO by calling alt_16550_fifo_read() or by disabling receiver interrupts by calling alt_16550_int_disable_rx(). |
ALT_16550_INT_STATUS_TX_IDLE | This interrupt signals that the transmitter is idling. The definition of idling depends on whether FIFOs are enabled or not. If FIFOs are disabled, this interrupt signals that the transmitter shift register is empty. In this case, the interrupt is cleared by writing data to the UART by calling alt_16550_write(). If FIFO are enabled, this interrupt signals that the transmitter FIFO level is below the transmitter trigger level specified. In this case, the interrupt is cleared by writing a sufficiently large buffer to the transmitter FIFO such that the FIFO is filled above the transmitter trigger level specified by calling alt_16550_fifo_write() or by adjusting the transmitter trigger level appropriately by calling alt_16550_fifo_trigger_set_tx(). In either case, this interrupt can also be cleared by disabling transmitter interrupts by calling alt_16550_int_disable_tx(). |
ALT_16550_INT_STATUS_MODEM | Modem status interrupt pending. The interrupt is cleared by reading the modem status by calling alt_16550_modem_status_get() or by disabling modem status interrupts by calling alt_16550_int_disable_modem(). |
ALT_16550_INT_STATUS_NONE | No interrupts pending. |
ALT_STATUS_CODE alt_16550_int_disable_all | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables all interrupts on the UART.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_disable_line | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables the receiver from generating line status interrupts.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_disable_modem | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables the UART from generate modem status interrupts.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_disable_rx | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables the receiver FIFO from generating interrupts.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_disable_tx | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables the transmitter FIFO from generating interrupts.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_enable_line | ( | ALT_16550_HANDLE_t * | handle | ) |
Enables the receiver to generate line status interrupts. Enabling this interrupt allows for the following interrupt signal(s):
This interrupt is disabled by default.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_enable_modem | ( | ALT_16550_HANDLE_t * | handle | ) |
Enables the UART to generate modem status interrupts. Enabling this interrupt allows for the following interrupt signal(s):
This interrupt is disabled by default.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_enable_rx | ( | ALT_16550_HANDLE_t * | handle | ) |
Enables the receiver FIFO to generate interrupts. Enabling this interrupt allows for the following interrupt signal(s):
This interrupt is disabled by default.
The FIFOs must also be enabled for this interrupt to actually be generated.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_enable_tx | ( | ALT_16550_HANDLE_t * | handle | ) |
Enables the transmitter FIFO to generate interrupts. Enabling this interrupt allows for the following interrupt signal(s):
This interrupt is disabled by default.
The FIFOs must also be enabled for this interrupt to actually be generated.
handle | The UART device handle. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |
ALT_STATUS_CODE alt_16550_int_status_get | ( | ALT_16550_HANDLE_t * | handle, |
ALT_16550_INT_STATUS_t * | status | ||
) |
Queries the interrupt status of the UART. This returns the highest priority interrupt pending. The appropriate interrupts must be enabled for them be generated in the UART.
handle | The UART device handle. |
status | [out] Pointer to an output parameter that contains the current interrupt status of the UART. |
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | The given UART device handle is invalid. |