libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
usart_common_fifos.h File Reference
Include dependency graph for usart_common_fifos.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define USART_PRESC(usart_base)   MMIO32((usart_base) + 0x2C)
 
#define USART_CR1_RXFFIE   BIT31
 RX FIFO Full Interrupt Enable. More...
 
#define USART_CR1_TXFEIE   BIT30
 TX FIFO Empty Interrupt Enable. More...
 
#define USART_CR1_FIFOEN   BIT29
 FIFO Enable bit. More...
 
#define USART_CR3_TXFTCFG_SHIFT   29
 TX FIFO Threshold Configuration bits. More...
 
#define USART_CR3_RXFTIE   BIT28
 RX FIFO THreshold Interrupt Enable. More...
 
#define USART_CR3_RXFTCFG_SHIFT   25
 RX FIFO Threshold Configuration bits. More...
 
#define USART_CR3_TCBGTIE   BIT24
 Transmission Complete Before Guard Time Enable bit. More...
 
#define USART_CR3_TXFTIE   BIT23
 TX FIFO THreshold Interrupt Enable. More...
 
#define USART_ISR_TXFT   BIT27
 TX FIFO Threshold Interrupt Flag. More...
 
#define USART_ISR_RXFT   BIT26
 RX FIFO Threshold Interrupt Flag. More...
 
#define USART_ISR_TCBGT   BIT25
 Transmission Complete before Guard Time Interrupt Flag. More...
 
#define USART_ISR_RXFF   BIT24
 RX FIFO Full Flag. More...
 
#define USART_ISR_TXFE   BIT23
 TX FIFO Empty Flag. More...
 
#define USART_ISR_UDR   BIT13
 SPI Slave Underrun Flag. More...
 
#define USART_ICR_UDR   BIT13
 SPI Slave Underrun Clear Flag. More...
 
#define USART_ICR_TXFECF   BIT5
 TX FIFO Empty Clear Flag. More...
 

Enumerations

enum  usart_fifo_threshold_t {
  USART_FIFO_THRESH_EIGTH = 0x0 , USART_FIFO_THRESH_QUARTER = 0x1 , USART_FIFO_THRESH_HALF = 0x2 , USART_FIFO_THRESH_THREEQTR = 0x3 ,
  USART_FIFO_THRESH_SEVENEIGTH = 0x4 , USART_FIFO_THRESH_TX_EMPTY = 0x5 , USART_FIFO_THRESH_RX_FULL = 0x5 , USART_FIFO_THRESH_MASK = 0x7
}
 FIFO Threshold definitions. More...
 

Functions

void usart_enable_fifos (uint32_t usart)
 Enable FIFOs on the specified USART. More...
 
void usart_disable_fifos (uint32_t usart)
 Disable FIFOs on the specified USART. More...
 
void usart_enable_tx_fifo_empty_interrupt (uint32_t usart)
 Enable TX FIFO empty interrupt on the specified USART. More...
 
void usart_disable_tx_fifo_empty_interrupt (uint32_t usart)
 Disable TX FIFO empty interrupt on the specified USART. More...
 
void usart_enable_tx_fifo_threshold_interrupt (uint32_t usart)
 Enable TX FIFO empty interrupt on the specified USART. More...
 
void usart_disable_tx_fifo_threshold_interrupt (uint32_t usart)
 Disable TX FIFO empty interrupt on the specified USART. More...
 
void usart_set_tx_fifo_threshold (uint32_t usart, usart_fifo_threshold_t threshold)
 Configure TX FIFO threshold on specified UART. More...
 
void usart_enable_rx_fifo_full_interrupt (uint32_t usart)
 Enable RX FIFO full interrupt on the specified USART. More...
 
void usart_disable_rx_fifo_full_interrupt (uint32_t usart)
 Disable RX FIFO full interrupt on the specified USART. More...
 
void usart_enable_rx_fifo_threshold_interrupt (uint32_t usart)
 Enable RX FIFO threshold interrupt on the specified USART. More...
 
void usart_disable_rx_fifo_threshold_interrupt (uint32_t usart)
 Disable RX FIFO threshold interrupt on the specified USART. More...
 
void usart_set_rx_fifo_threshold (uint32_t usart, usart_fifo_threshold_t threshold)
 Configure RX FIFO threshold on specified UART. More...