#include "luat_base.h"
#include "luat_uart_legacy.h"
浏览该文件的源代码.
|
struct | luat_uart |
| luat_uart 更多...
|
|
struct | luat_uart_ctrl_param |
| 串口控制参数 更多...
|
|
#define | LUAT_PARITY_NONE 0 |
| 校验位
|
|
#define | LUAT_PARITY_ODD 1 |
|
#define | LUAT_PARITY_EVEN 2 |
|
#define | LUAT_BIT_ORDER_LSB 0 |
| 高低位顺序
|
|
#define | LUAT_BIT_ORDER_MSB 1 |
|
#define | LUAT_0_5_STOP_BITS 0xf0 |
| 停止位
|
|
#define | LUAT_1_5_STOP_BITS 0xf1 |
|
#define | LUAT_VUART_ID_0 0x20 |
|
enum | LUAT_UART_CTRL_CMD { LUAT_UART_SET_RECV_CALLBACK
, LUAT_UART_SET_SENT_CALLBACK
} |
| 串口控制参数 更多...
|
|
typedef struct luat_uart | luat_uart_t |
| luat_uart
|
|
typedef enum LUAT_UART_CTRL_CMD | LUAT_UART_CTRL_CMD_E |
| 串口控制参数
|
|
typedef void(* | luat_uart_recv_callback_t) (int uart_id, uint32_t data_len) |
| 接收回调函数
|
|
typedef void(* | luat_uart_sent_callback_t) (int uart_id, void *param) |
| 发送回调函数
|
|
typedef struct luat_uart_ctrl_param | luat_uart_ctrl_param_t |
| 串口控制参数
|
|
int | luat_uart_setup (luat_uart_t *uart) |
| uart初始化
|
|
int | luat_uart_write (int uart_id, void *data, size_t length) |
| 串口写数据
|
|
int | luat_uart_read (int uart_id, void *buffer, size_t length) |
| 串口读数据
|
|
void | luat_uart_clear_rx_cache (int uart_id) |
| 清除uart的接收缓存数据
|
|
int | luat_uart_close (int uart_id) |
| 关闭串口
|
|
int | luat_uart_exist (int uart_id) |
| 检测串口是否存在
|
|
int | luat_uart_ctrl (int uart_id, LUAT_UART_CTRL_CMD_E cmd, void *param) |
| 串口控制
|
|
int | luat_uart_pre_setup (int uart_id, uint8_t use_alt_type) |
| 串口复用函数,目前支持UART0,UART2
|
|