feat: 更新键盘固件的事件系统和模块配置

- 在CMakeLists.txt中添加hid_boot_event.c、keyboard_led_event.c和ble_slot_ctrl_module.c源文件
- 新增Kconfig配置项NEW_KBD_BLE_BOND_ENABLE用于启用应用特定的BLE绑定支持
- 修改prj.conf配置,禁用配对模式下的设备名称广播功能
- 重构电池状态事件结构,将charging和full布尔字段改为flags位域,并提供相应的访问函数
- 添加hid_boot_event事件类型,用于处理HID Boot协议输入报告
- 重命名keyboard_led_state_event为keyboard_led_event并改进LED状态处理逻辑
- 移除hid_protocol_event中的transport字段,简化协议事件处理
- 分离hid_report_event和hid_boot_event,明确区分Report和Boot协议报文处理
- 重构battery_module.c代码结构,改用上下文结构体管理电池模块状态
- 更新ble_battery_module.c使用新的电池状态事件访问接口
This commit is contained in:
2026-03-18 13:41:36 +08:00
parent 2a8b44d058
commit 2a389ef19b
25 changed files with 1237 additions and 484 deletions

View File

@@ -19,14 +19,16 @@ target_sources(app PRIVATE
src/main.c
src/events/battery_status_event.c
src/events/config_event.c
src/events/hid_boot_event.c
src/events/hid_protocol_event.c
src/events/hid_report_event.c
src/events/keyboard_led_state_event.c
src/events/keyboard_led_event.c
src/events/mode_event.c
src/modules/battery_module.c
src/modules/ble_adv_ctrl_module.c
src/modules/ble_battery_module.c
src/modules/ble_bond_module.c
src/modules/ble_slot_ctrl_module.c
src/modules/keyboard_module.c
src/modules/led_state_module.c
src/modules/mode_switch_module.c