109 uart->
INTEN &= ~ u32InterruptFlag;
124 uart->
MODEM &= ~UART_MODEM_RTS_Msk;
148 uart->
INTEN |= u32InterruptFlag;
162 uint8_t u8UartClkSrcSel;
165 uint32_t u32Baud_Div;
181 if(u32Baud_Div > 0xFFFF)
203 for(u32Count=0; u32Count < u32ReadBytes; u32Count++)
209 pu8RxBuf[u32Count] = uart->
DAT;
231 uint8_t u8UartClkSrcSel;
234 uint32_t u32Baud_Div = 0;
246 if(u32Baud_Div > 0xFFFF)
252 uart->
LINE = u32data_width | u32parity | u32stop_bits;
266 uart->
TOUT = (uart->
TOUT & ~UART_TOUT_TOIC_Msk)| (u32TOC);
282 uint8_t u8UartClkSrcSel;
294 uart->
IRDA &= ~UART_IRDA_TXINV_Msk;
333 for(u32Count=0; u32Count != u32WriteBytes; u32Count++)
339 uart->
DAT = pu8TxBuf[u32Count];
NUC472/NUC442 peripheral access layer header file. This file contains all the peripheral register's d...
#define UART_FIFOSTS_BIF_Msk
#define UART_FIFOSTS_TXOVIF_Msk
#define UART_FIFOSTS_RXOVIF_Msk
#define UART_INTEN_ATORTSEN_Msk
#define UART_FUNCSEL_FUNCSEL_Pos
#define UART_INTSTS_BUFERRINT_Msk
#define UART_FIFOSTS_TXFULL_Msk
#define UART_ALTCTL_ADDRMV_Pos
#define UART_FIFOSTS_ADDRDETF_Msk
#define CLK_CLKDIV0_UARTDIV_Pos
#define UART_IRDA_RXINV_Msk
#define UART_INTSTS_RXTOINT_Msk
#define UART_INTSTS_MODEMINT_Msk
#define UART_INTEN_ATOCTSEN_Msk
#define UART_INTSTS_RLSINT_Msk
#define UART_MODEM_RTSACTLV_Msk
#define CLK_CLKSEL1_UARTSEL_Msk
#define UART_FIFOSTS_RXEMPTY_Msk
#define UART_FIFOSTS_PEF_Msk
#define CLK_CLKDIV0_UARTDIV_Msk
#define UART_MODEMSTS_CTSDETF_Msk
#define UART_FIFOSTS_FEF_Msk
#define CLK_CLKSEL1_UARTSEL_Pos
#define UART_INTSTS_RXTOIF_Msk
#define UART_IRDA_TXEN_Msk
#define UART_MODEMSTS_CTSACTLV_Msk
#define UART_INTEN_TOCNTEN_Msk
uint32_t CLK_GetPLLClockFreq(void)
This function get PLL frequency. The frequency unit is Hz.
#define UART_FIFO_RTSTRGLV_1BYTE
#define UART_FIFO_RFITL_1BYTE
#define UART_FUNCSEL_RS485
#define UART_FUNCSEL_UART
void UART_SelectRS485Mode(UART_T *uart, uint32_t u32Mode, uint32_t u32Addr)
The function is used to set RS485 relative setting.
void UART_EnableInt(UART_T *uart, uint32_t u32InterruptFlag)
The function is used to enable UART specified interrupt and disable NVIC UART IRQ.
void UART_SetTimeoutCnt(UART_T *uart, uint32_t u32TOC)
This function use to set Rx timeout count.
void UART_Close(UART_T *uart)
The function is used to disable UART.
#define UART_BAUD_MODE0_DIVIDER(u32SrcFreq, u32BaudRate)
Calculate UART baudrate mode0 divider.
void UART_ClearIntFlag(UART_T *uart, uint32_t u32InterruptFlag)
The function is used to clear UART specified interrupt flag.
void UART_DisableFlowCtrl(UART_T *uart)
The function is used to disable UART auto flow control.
void UART_EnableFlowCtrl(UART_T *uart)
The function is used to Enable UART auto flow control.
uint32_t UART_Write(UART_T *uart, uint8_t *pu8TxBuf, uint32_t u32WriteBytes)
The function is to write data into TX buffer to transmit data by UART.
#define UART_BAUD_MODE2_DIVIDER(u32SrcFreq, u32BaudRate)
Calculate UART baudrate mode2 divider.
void UART_SetLine_Config(UART_T *uart, uint32_t u32baudrate, uint32_t u32data_width, uint32_t u32parity, uint32_t u32stop_bits)
This function use to config UART line setting.
void UART_DisableInt(UART_T *uart, uint32_t u32InterruptFlag)
The function is used to disable UART specified interrupt and disable NVIC UART IRQ.
void UART_SelectIrDAMode(UART_T *uart, uint32_t u32Buadrate, uint32_t u32Direction)
The function is used to configure IrDA relative settings. It consists of TX or RX mode and baudrate.
uint32_t UART_Read(UART_T *uart, uint8_t *pu8RxBuf, uint32_t u32ReadBytes)
The function is used to read Rx data from RX FIFO and the data will be stored in pu8RxBuf.
void UART_Open(UART_T *uart, uint32_t u32baudrate)
This function use to enable UART function and set baud-rate.