|
| errcode_t | uapi_uart_init (uart_bus_t bus, const uart_pin_config_t *pins, const uart_attr_t *attr, const uart_extra_attr_t *extra_attr, uart_buffer_config_t *uart_buffer_config) |
| | 初始化指定的串口。
|
| |
| errcode_t | uapi_uart_deinit (uart_bus_t bus) |
| | 去初始化指定的串口。
|
| |
| errcode_t | uapi_uart_set_attr (uart_bus_t bus, const uart_attr_t *attr) |
| | 设置串口的基础配置参数。
|
| |
| errcode_t | uapi_uart_get_attr (uart_bus_t bus, const uart_attr_t *attr) |
| | 获取串口的基础配置参数。
|
| |
| bool | uapi_uart_has_pending_transmissions (uart_bus_t bus) |
| | 判断是否存在正在等待的传输。
|
| |
| bool | uapi_uart_rx_fifo_is_empty (uart_bus_t bus) |
| | 判断RX FIFO是否为空。
|
| |
| bool | uapi_uart_tx_fifo_is_empty (uart_bus_t bus) |
| | 判断TX FIFO是否为空。
|
| |
| errcode_t | uapi_uart_register_rx_callback (uart_bus_t bus, uart_rx_condition_t condition, uint32_t size, uart_rx_callback_t callback) |
| | 注册接收回调函数,这个回调函数会根据触发条件和Size触发。
|
| |
| void | uapi_uart_unregister_rx_callback (uart_bus_t bus) |
| | 去注册接收回调函数。
|
| |
| errcode_t | uapi_uart_register_parity_error_callback (uart_bus_t bus, uart_error_callback_t callback) |
| | 注册奇偶校验错误处理的回调函数。
|
| |
| errcode_t | uapi_uart_register_frame_error_callback (uart_bus_t bus, uart_error_callback_t callback) |
| | 注册帧错误处理回调函数。
|
| |
| errcode_t | uapi_uart_register_overrun_error_callback (uart_bus_t bus, uart_error_callback_t callback) |
| | 注册溢出错误处理回调函数。
|
| |
| int32_t | uapi_uart_write (uart_bus_t bus, const uint8_t *buffer, uint32_t length, uint32_t timeout) |
| | 将数据发送到已经打开的UART上,使用直接发送的方式。
|
| |
| errcode_t | uapi_uart_write_int (uart_bus_t bus, const uint8_t *buffer, uint32_t length, void *params, uart_tx_callback_t finished_with_buffer_func) |
| | 使用中断模式将数据发送到已经打开的UART上,当数据发送完成,会调用回调函数。
|
| |
| int32_t | uapi_uart_write_by_dma (uart_bus_t bus, const void *buffer, uint32_t length, uart_write_dma_config_t *dma_cfg) |
| | 通过DMA发送数据。
|
| |
| int32_t | uapi_uart_read_by_dma (uart_bus_t bus, const void *buffer, uint32_t length, uart_write_dma_config_t *dma_cfg) |
| | 通过DMA读取数据。
|
| |
| int32_t | uapi_uart_read (uart_bus_t bus, const uint8_t *buffer, uint32_t length, uint32_t timeout) |
| | 从UART读取数据。
|
| |
| errcode_t | uapi_uart_flush_rx_data (uart_bus_t bus) |
| | 刷新UART接收Buffer中的数据。
|
| |
| errcode_t | uapi_uart_update_rx_buff (uart_bus_t bus, uint8_t *rx_buffer, uint16_t rx_buffer_size) |
| | 更新UART接收Buffer的地址和长度。
|
| |
| errcode_t | uapi_uart_suspend (uintptr_t arg) |
| | 挂起所有的UART通道。
|
| |
| errcode_t | uapi_uart_resume (uintptr_t arg) |
| | 恢复所有的UART通道。
|
| |