M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros | Functions
uart.h File Reference

M480 series UART driver header file. More...

Go to the source code of this file.

Macros

#define UART0_FIFO_SIZE
 
#define UART1_FIFO_SIZE
 
#define UART2_FIFO_SIZE
 
#define UART3_FIFO_SIZE
 
#define UART4_FIFO_SIZE
 
#define UART5_FIFO_SIZE
 
#define UART_FIFO_RFITL_1BYTE
 
#define UART_FIFO_RFITL_4BYTES
 
#define UART_FIFO_RFITL_8BYTES
 
#define UART_FIFO_RFITL_14BYTES
 
#define UART_FIFO_RTSTRGLV_1BYTE
 
#define UART_FIFO_RTSTRGLV_4BYTES
 
#define UART_FIFO_RTSTRGLV_8BYTES
 
#define UART_FIFO_RTSTRGLV_14BYTES
 
#define UART_WORD_LEN_5
 
#define UART_WORD_LEN_6
 
#define UART_WORD_LEN_7
 
#define UART_WORD_LEN_8
 
#define UART_PARITY_NONE
 
#define UART_PARITY_ODD
 
#define UART_PARITY_EVEN
 
#define UART_PARITY_MARK
 
#define UART_PARITY_SPACE
 
#define UART_STOP_BIT_1
 
#define UART_STOP_BIT_1_5
 
#define UART_STOP_BIT_2
 
#define UART_RTS_IS_LOW_LEV_ACTIVE
 
#define UART_RTS_IS_HIGH_LEV_ACTIVE
 
#define UART_IRDA_TXEN
 
#define UART_IRDA_RXEN
 
#define UART_FUNCSEL_UART
 
#define UART_FUNCSEL_LIN
 
#define UART_FUNCSEL_IrDA
 
#define UART_FUNCSEL_RS485
 
#define UART_LINCTL_BRKFL(x)
 
#define UART_LINCTL_BSL(x)
 
#define UART_LINCTL_HSEL_BREAK
 
#define UART_LINCTL_HSEL_BREAK_SYNC
 
#define UART_LINCTL_HSEL_BREAK_SYNC_ID
 
#define UART_LINCTL_PID(x)
 
#define UART_BAUD_MODE0
 
#define UART_BAUD_MODE2
 
#define UART_BAUD_MODE0_DIVIDER(u32SrcFreq, u32BaudRate)
 Calculate UART baudrate mode0 divider. More...
 
#define UART_BAUD_MODE2_DIVIDER(u32SrcFreq, u32BaudRate)
 Calculate UART baudrate mode2 divider. More...
 
#define UART_WRITE(uart, u8Data)
 Write UART data. More...
 
#define UART_READ(uart)
 Read UART data. More...
 
#define UART_GET_TX_EMPTY(uart)
 Get Tx empty. More...
 
#define UART_GET_RX_EMPTY(uart)
 Get Rx empty. More...
 
#define UART_IS_TX_EMPTY(uart)
 Check specified UART port transmission is over. More...
 
#define UART_WAIT_TX_EMPTY(uart)
 Wait specified UART port transmission is over. More...
 
#define UART_IS_RX_READY(uart)
 Check RX is ready or not. More...
 
#define UART_IS_TX_FULL(uart)
 Check TX FIFO is full or not. More...
 
#define UART_IS_RX_FULL(uart)
 Check RX FIFO is full or not. More...
 
#define UART_GET_TX_FULL(uart)
 Get Tx full register value. More...
 
#define UART_GET_RX_FULL(uart)
 Get Rx full register value. More...
 
#define UART_ENABLE_INT(uart, u32eIntSel)
 Enable specified UART interrupt. More...
 
#define UART_DISABLE_INT(uart, u32eIntSel)
 Disable specified UART interrupt. More...
 
#define UART_GET_INT_FLAG(uart, u32eIntTypeFlag)
 Get specified interrupt flag/status. More...
 
#define UART_RS485_CLEAR_ADDR_FLAG(uart)
 Clear RS-485 Address Byte Detection Flag. More...
 
#define UART_RS485_GET_ADDR_FLAG(uart)
 Get RS-485 Address Byte Detection Flag. More...
 
#define UART_PDMA_ENABLE(uart, u32FuncSel)
 Enable specified UART PDMA function. More...
 
#define UART_PDMA_DISABLE(uart, u32FuncSel)
 Disable specified UART PDMA function. More...
 

Functions

__STATIC_INLINE void UART_CLEAR_RTS (UART_T *uart)
 Set RTS pin to low. More...
 
__STATIC_INLINE void UART_SET_RTS (UART_T *uart)
 Set RTS pin to high. More...
 
void UART_ClearIntFlag (UART_T *uart, uint32_t u32InterruptFlag)
 Clear UART specified interrupt flag. More...
 
void UART_Close (UART_T *uart)
 Disable UART interrupt. More...
 
void UART_DisableFlowCtrl (UART_T *uart)
 Disable UART auto flow control function. More...
 
void UART_DisableInt (UART_T *uart, uint32_t u32InterruptFlag)
 Disable UART specified interrupt. More...
 
void UART_EnableFlowCtrl (UART_T *uart)
 Enable UART auto flow control function. More...
 
void UART_EnableInt (UART_T *uart, uint32_t u32InterruptFlag)
 The function is used to enable UART specified interrupt and enable NVIC UART IRQ. More...
 
void UART_Open (UART_T *uart, uint32_t u32baudrate)
 Open and set UART function. More...
 
uint32_t UART_Read (UART_T *uart, uint8_t pu8RxBuf[], uint32_t u32ReadBytes)
 Read UART data. More...
 
void UART_SetLineConfig (UART_T *uart, uint32_t u32baudrate, uint32_t u32data_width, uint32_t u32parity, uint32_t u32stop_bits)
 Set UART line configuration. More...
 
void UART_SetTimeoutCnt (UART_T *uart, uint32_t u32TOC)
 Set Rx timeout count. More...
 
void UART_SelectIrDAMode (UART_T *uart, uint32_t u32Buadrate, uint32_t u32Direction)
 Select and configure IrDA function. More...
 
void UART_SelectRS485Mode (UART_T *uart, uint32_t u32Mode, uint32_t u32Addr)
 Select and configure RS485 function. More...
 
void UART_SelectLINMode (UART_T *uart, uint32_t u32Mode, uint32_t u32BreakLength)
 Select and configure LIN function. More...
 
uint32_t UART_Write (UART_T *uart, uint8_t pu8TxBuf[], uint32_t u32WriteBytes)
 Write UART data. More...
 

Detailed Description

M480 series UART driver header file.

Version
V3.00

SPDX-License-Identifier: Apache-2.0

Definition in file uart.h.