feat: 添加第三屏幕及其音量控制功能

- 在 CMakeLists.txt 中添加 ui_Screen3.c 源文件以支持新屏幕
- 新增 ui_events.c 和 ui_events.h,定义音量控制按钮的点击事件处理函数
- 实现 ui_Screen3.c,构建第三屏幕的 UI 组件和事件回调
- 更新 ui.c 以初始化和加载第三屏幕
- 修改 ble_hid.c 和 ble_hid.h,添加消费者控制功能以支持音量调节
- 更新相关头文件,确保新屏幕与现有结构兼容
This commit is contained in:
2026-07-02 22:23:20 +08:00
parent e056a113a2
commit 8254bc7d50
10 changed files with 513 additions and 33 deletions
+8
View File
@@ -13,6 +13,13 @@
#define HID_KEY_X 0x1B
#define HID_KEY_F5 0x3E
#define HID_CONSUMER_VOLUME_UP 0x00E9
#define HID_CONSUMER_VOLUME_DOWN 0x00EA
#define HID_CONSUMER_MUTE 0x00E2
#define HID_CONSUMER_PLAY_PAUSE 0x00CD
#define HID_CONSUMER_SCAN_NEXT 0x00B5
#define HID_CONSUMER_SCAN_PREVIOUS 0x00B6
typedef void (*ble_hid_status_cb_t)(bool connected);
int ble_hid_init(ble_hid_status_cb_t status_cb);
@@ -21,6 +28,7 @@ bool ble_hid_ready(void);
int ble_hid_key_press(uint8_t modifier, uint8_t keycode);
int ble_hid_key_release(void);
int ble_hid_send_combo(uint8_t modifier, uint8_t keycode);
int ble_hid_send_consumer(uint16_t usage);
#if defined(BOARD_BLE_ENABLED) && BOARD_BLE_ENABLED
void ble_hid_on_input_notify(bool enabled);