feat(protocol): 添加传输状态事件管理协议会话状态

添加了新的 proto_transport_state_event 事件类型来跟踪协议传输连接状态,
包括链接断开和就绪状态。为 BLE NUS 和 USB CDC 模块实现了状态机管理,
替换原有的简单布尔标志,提供更精确的连接状态跟踪。

- 添加 proto_transport_state_event 事件定义和实现
- 为 BLE NUS 模块引入业务状态机管理
- 为 USB CDC 模块引入业务状态机管理
- 实现协议模块中的会话状态管理
- 移除 protocol_module_reset_transport_state 函数
- 更新 CMakeLists.txt 包含新事件源文件
This commit is contained in:
2026-04-17 11:13:11 +08:00
parent 2ca02325c1
commit 0cbb16052d
11 changed files with 723 additions and 209 deletions

View File

@@ -11,6 +11,11 @@ enum proto_transport {
PROTO_TRANSPORT_COUNT,
};
enum proto_transport_link_state {
PROTO_TRANSPORT_LINK_DOWN = 0,
PROTO_TRANSPORT_LINK_READY,
};
#ifdef __cplusplus
}
#endif