xt-sdk 文档 v1.0.3
xt-sdk 嵌入式 SDK API 参考
载入中...
搜索中...
未找到
xt_uart.h
浏览该文件的文档.
1
12
13#ifndef __XT_UART_H__
14#define __XT_UART_H__
15
16/* ==================== [Includes] ========================================== */
17
18#include "xt_task.h"
19#include "xt_sys_event.h"
20#include "xt_hal.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* ==================== [Defines] =========================================== */
27
28/* ==================== [Typedefs] ========================================== */
29
34
35/* ==================== [Global Prototypes] ================================= */
36
40void xt_uart_init(void);
41
48void xt_uart_setup(uint8_t uart_id, xt_uart_cb_t cb);
49
50/* ==================== [Macros] ============================================ */
51
52#ifdef __cplusplus
53} /* extern "C" */
54#endif
55
56#endif /* __XT_UART_H__ */
void(* xt_hal_uart_cb_t)(uint8_t uart_id, uint32_t event_id)
UART 回调函数类型定义
XTINY HAL 总头文件,包含所有 HAL 子模块
XTINY 系统事件 ID 定义
协程式任务调度模块接口(基于 timer2 和 event 的轻量级协程)
void xt_uart_setup(uint8_t uart_id, xt_uart_cb_t cb)
配置 UART 事件监听
xt_hal_uart_cb_t xt_uart_cb_t
UART 事件回调函数类型(复用 HAL 层定义)
void xt_uart_init(void)
初始化 UART 事件模块