21#ifndef LIBOPENCM3_STM32_COMMON_USART_COMMON_FIFOS_H_
22#define LIBOPENCM3_STM32_COMMON_USART_COMMON_FIFOS_H_
30#define USART_PRESC(usart_base) MMIO32((usart_base) + 0x2C)
36#define USART_CR1_RXFFIE BIT31
38#define USART_CR1_TXFEIE BIT30
40#define USART_CR1_FIFOEN BIT29
58#define USART_CR3_TXFTCFG_SHIFT 29
60#define USART_CR3_RXFTIE BIT28
62#define USART_CR3_RXFTCFG_SHIFT 25
64#define USART_CR3_TCBGTIE BIT24
66#define USART_CR3_TXFTIE BIT23
72#define USART_ISR_TXFT BIT27
74#define USART_ISR_RXFT BIT26
76#define USART_ISR_TCBGT BIT25
78#define USART_ISR_RXFF BIT24
80#define USART_ISR_TXFE BIT23
82#define USART_ISR_UDR BIT13
88#define USART_ICR_UDR BIT13
90#define USART_ICR_TXFECF BIT5
usart_fifo_threshold_t
FIFO Threshold definitions.
@ USART_FIFO_THRESH_QUARTER
@ USART_FIFO_THRESH_SEVENEIGTH
@ USART_FIFO_THRESH_RX_FULL
@ USART_FIFO_THRESH_TX_EMPTY
@ USART_FIFO_THRESH_EIGTH
@ USART_FIFO_THRESH_THREEQTR
void usart_disable_tx_fifo_empty_interrupt(uint32_t usart)
Disable TX FIFO empty interrupt on the specified USART.
void usart_enable_rx_fifo_full_interrupt(uint32_t usart)
Enable RX FIFO full interrupt on the specified USART.
void usart_disable_rx_fifo_threshold_interrupt(uint32_t usart)
Disable RX FIFO threshold interrupt on the specified USART.
void usart_set_tx_fifo_threshold(uint32_t usart, usart_fifo_threshold_t threshold)
Configure TX FIFO threshold on specified UART.
void usart_enable_fifos(uint32_t usart)
Enable FIFOs on the specified USART.
void usart_enable_tx_fifo_empty_interrupt(uint32_t usart)
Enable TX FIFO empty interrupt on the specified USART.
void usart_disable_fifos(uint32_t usart)
Disable FIFOs on the specified USART.
void usart_disable_tx_fifo_threshold_interrupt(uint32_t usart)
Disable TX FIFO empty interrupt on the specified USART.
void usart_disable_rx_fifo_full_interrupt(uint32_t usart)
Disable RX FIFO full interrupt on the specified USART.
void usart_set_rx_fifo_threshold(uint32_t usart, usart_fifo_threshold_t threshold)
Configure RX FIFO threshold on specified UART.
void usart_enable_tx_fifo_threshold_interrupt(uint32_t usart)
Enable TX FIFO empty interrupt on the specified USART.
void usart_enable_rx_fifo_threshold_interrupt(uint32_t usart)
Enable RX FIFO threshold interrupt on the specified USART.