# UART ## **Overview** Defines standard APIs of universal asynchronous receiver/transmitter \(UART\) capabilities. You can use this module to access the UART and enable the driver to operate a UART-compliant device. The functions in this module help you to obtain and release the UART device handle, read and write data, obtain and set the baud rate and device attributes. **Since:** 1.0 ## **Summary** ## Files
UartTransMode { UART_MODE_RD_BLOCK = 0, UART_MODE_RD_NONBLOCK, UART_MODE_DMA_RX_EN, UART_MODE_DMA_RX_DIS, UART_MODE_DMA_TX_EN, UART_MODE_DMA_TX_DIS } |
UartOpen (uint32_t port) |
struct DevHandle * |
UartRead (struct DevHandle *handle, uint8_t *data, uint32_t size) |
|
UartWrite (struct DevHandle *handle, uint8_t *data, uint32_t size) |
|
UartGetBaud (struct DevHandle *handle, uint32_t *baudRate) |
|
UartSetBaud (struct DevHandle *handle, uint32_t baudRate) |
|
UartGetAttribute (struct DevHandle *handle, struct UartAttribute *attribute) |
|
UartSetAttribute (struct DevHandle *handle, struct UartAttribute *attribute) |
|
UartSetTransMode (struct DevHandle *handle, enum UartTransMode mode) |
UART_MODE_RD_BLOCK | |
UART_MODE_RD_NONBLOCK | |
UART_MODE_DMA_RX_EN | |
UART_MODE_DMA_RX_DIS | |
UART_MODE_DMA_TX_EN | |
UART_MODE_DMA_TX_DIS |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
attribute | Indicates the pointer to the obtained UART attribute. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
baudRate | Indicates the pointer to the obtained baud rate. |
port | Indicates the UART port. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
data | Indicates the pointer to the buffer for receiving the data. |
size | Indicates the size of the data to read. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
attribute | Indicates the pointer to the UART attribute to set. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
baudRate | Indicates the baud rate to set. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
mode | Indicates a transmission mode enumerated in {@linkUartTransMode}. |
handle | Indicates the pointer to the UART device handle, which is obtained via UartOpen. |
data | Indicates the pointer to the data to write. |
size | Indicates the size of the data to write. |