WB32F10x Standard Peripherals Firmware Library

Data Structures | Macros | Functions
wb32f10x_uart.h File Reference

This file contains all the functions prototypes for the UART firmware library. More...

`#include "wb32f10x.h"`

Go to the source code of this file.

## Data Structures
struct | UART_InitTypeDef
| UART Init Structure definition. More...

## Macros
#define | UART_WordLength_5b UART_LCR_WLS_5BIT
#define | UART_WordLength_6b UART_LCR_WLS_6BIT
#define | UART_WordLength_7b UART_LCR_WLS_7BIT
#define | UART_WordLength_8b UART_LCR_WLS_8BIT
#define | UART_StopBits_One UART_LCR_SBS_1BIT
#define | UART_StopBits_Two UART_LCR_SBS_2BIT
#define | UART_StopBits_OnePointFive UART_LCR_SBS_2BIT
#define | UART_Parity_None (0x00U)
#define | UART_Parity_Odd (UART_LCR_PARITY_ODD)
#define | UART_Parity_Even (UART_LCR_PARITY_EVEN)
#define | UART_Parity_Mark (UART_LCR_PARITY_MARK)
#define | UART_Parity_Space (UART_LCR_PARITY_SPACE)
#define | UART_AutoFlowControl_None (0x00)
#define | UART_AutoFlowControl_CTS (UART_MCR_AFCE)
#define | UART_AutoFlowControl_RTS_CTS (UART_MCR_AFCE | UART_MCR_RTS)
#define | UART_RxFIFOThreshold_1 0x00
#define | UART_RxFIFOThreshold_4 0x01
#define | UART_RxFIFOThreshold_8 0x02
#define | UART_RxFIFOThreshold_14 0x03
#define | UART_TxFIFOThreshold_0 0x00
#define | UART_TxFIFOThreshold_2 0x01
#define | UART_TxFIFOThreshold_4 0x02
#define | UART_TxFIFOThreshold_8 0x03
#define | UART_IT_RDA UART_IER_RDAIE
#define | UART_IT_THRE UART_IER_THREIE
#define | UART_IT_RLS UART_IER_RLSIE
#define | UART_IT_MSI UART_IER_MSIE
#define | UART_INTID_MSI UART_IIR_INTID_MSI
#define | UART_INTID_NONE UART_IIR_INTID_NONE
#define | UART_INTID_THRE UART_IIR_INTID_THRE
#define | UART_INTID_RDA UART_IIR_INTID_RDA
#define | UART_INTID_RLS UART_IIR_INTID_RLS
#define | UART_INTID_BUSY UART_IIR_INTID_BUSY
#define | UART_INTID_CTI UART_IIR_INTID_CTI
#define | UART_FLAG_BUSY UART_USR_BUSY
#define | UART_FLAG_TFNF UART_USR_TFNF
#define | UART_FLAG_TFE UART_USR_TFE
#define | UART_FLAG_RFNE UART_USR_RFNE
#define | UART_FLAG_RFF UART_USR_RFF
#define | UART_LINE_STATUS_DR UART_LSR_DR
#define | UART_LINE_STATUS_OE UART_LSR_OE
#define | UART_LINE_STATUS_PE UART_LSR_PE
#define | UART_LINE_STATUS_FE UART_LSR_FE
#define | UART_LINE_STATUS_BI UART_LSR_BI
#define | UART_LINE_STATUS_THRE UART_LSR_THRE
#define | UART_LINE_STATUS_TEMT UART_LSR_TEMT
#define | UART_LINE_STATUS_RFE UART_LSR_RFE
#define | UART_LINE_STATUS_ADDR_RCVD UART_LSR_ADDR_RCVD
#define | UART_MODEM_STATUS_DCTS UART_MSR_DCTS
#define | UART_MODEM_STATUS_CTS UART_MSR_CTS

## Functions
void | UART_DeInit (UART_TypeDef *UARTx)
| Deinitializes the UARTx peripheral registers to their default reset values. More...
void | UART_Init (UART_TypeDef *UARTx, UART_InitTypeDef *UART_InitStruct)
| Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct. More...
void | UART_StructInit (UART_InitTypeDef *UART_InitStruct)
| Fills each UART_InitStruct member with its default value. More...
void | UART_WriteData (UART_TypeDef *UARTx, uint16_t Data)
| Write data to THR register or Tx FIFO. More...
uint16_t | UART_ReadData (UART_TypeDef *UARTx)
| Read data from RBR register or Rx FIFO. More...
void | UART_RxFIFOThresholdConfig (UART_TypeDef *UARTx, uint8_t Threshold)
| Configure UARTx's Rx FIFO trigger threshold. More...
void | UART_TxFIFOThresholdConfig (UART_TypeDef *UARTx, uint8_t Threshold)
| Configure UARTx's Tx FIFO trigger threshold. More...
void | UART_FIFOCmd (UART_TypeDef *UARTx, FunctionalState NewState)
| Enables or disables the UARTx's FIFO. More...
void | UART_ResetRxFIFO (UART_TypeDef *UARTx)
| Reset the UART's Rx FIFO. More...
void | UART_ResetTxFIFO (UART_TypeDef *UARTx)
| Reset the UART's Tx FIFO. More...
void | UART_ForceBreakCmd (UART_TypeDef *UARTx, FunctionalState NewState)
| Force the serial out to spacing state or not. More...
void | UART_IrDACmd (UART_TypeDef *UARTx, FunctionalState NewState)
| Enables or disables the UARTx's IrDA SIR Mode. More...
void | UART_ProgrammableTHREModeCmd (UART_TypeDef *UARTx, FunctionalState NewState)
| Enables or disables the UARTx's Programmable THRE Interrupt Mode. More...
void | UART_LineStatusClearModeConfig (UART_TypeDef *UARTx, uint8_t Mode)
| Select the method for clearing the status in the LSR register. More...
void | UART_ITConfig (UART_TypeDef *UARTx, uint8_t UART_IT, FunctionalState NewState)
| Enables or disables the UARTx's interrupts. More...
uint8_t | UART_GetIntID (UART_TypeDef *UARTx)
| Get UARTx's Interrupt ID. More...
FlagStatus | UART_GetFlagStatus (UART_TypeDef *UARTx, uint32_t UART_FLAG)
| Checks whether the specified UART flag is set or not. More...
uint32_t | UART_GetLineStatus (UART_TypeDef *UARTx)
| Get UARTx's Line status. More...
uint32_t | UART_GetModemStatus (UART_TypeDef *UARTx)
| Get UARTx's Modem Status. More...
void | UART_LoopBackModeCmd (UART_TypeDef *UARTx, FunctionalState NewState)
| Enables or disables the UARTx's LoopBack Mode. More...
void | UART_ModemForceRtsPinState (UART_TypeDef *UARTx, SignalState NewState)
| Control RTS Pin State. More...

## Detailed Description

This file contains all the functions prototypes for the UART firmware library.

Author
  Westberry Application Team

Version
  V0.1.10

Date
  05-January-2023