feat: 添加HID主机命令和主题颜色功能

- 添加了新的事件类型包括display_theme_event、hid_host_ack_event、
  hid_host_command_error_event和hid_host_command_event用于处理HID主机命令

- 在CMakeLists.txt中添加了新的源文件,包括显示主题事件和HID主机命令相关模块

- 实现了HID主机命令协议定义,包括主题颜色和时间同步命令

- 在BLE HID模块中添加了对供应商命令报告的支持,增加新的报告ID用于主机命令传输

- 扩展了HID传输路由机制,支持USB和BLE双通道传输

- 实现了显示模块的主题颜色存储功能,支持通过settings持久化保存主题颜色

- 添加了完整的BLE时间同步服务PC主机接入文档

- 修改了电池采样逻辑,增加2秒延迟以等待电池电压稳定
This commit is contained in:
2026-03-30 15:57:38 +08:00
parent 277462a8fe
commit 2c7eae4de1
25 changed files with 1157 additions and 94 deletions

View File

@@ -27,7 +27,11 @@ target_sources(app PRIVATE
src/main.c
src/events/battery_status_event.c
src/events/config_event.c
src/events/display_theme_event.c
src/events/hid_boot_event.c
src/events/hid_host_ack_event.c
src/events/hid_host_command_error_event.c
src/events/hid_host_command_event.c
src/events/hid_protocol_event.c
src/events/hid_report_event.c
src/events/hid_tx_done_event.c
@@ -41,9 +45,9 @@ target_sources(app PRIVATE
src/modules/ble_adv_ctrl_module.c
src/modules/ble_battery_module.c
src/modules/ble_bond_module.c
src/modules/ble_time_sync_module.c
src/modules/ble_slot_ctrl_module.c
src/modules/display_module.c
src/modules/hid_host_command_module.c
src/modules/hid_tx_manager_module.c
src/modules/keyboard_module.c
src/modules/led_state_module.c