- 添加keyboard_core_module.c实现键盘核心功能,包括按键映射、 报告构建和状态管理 - 添加keyboard_hid_report_event相关文件,实现键盘HID报告事件 的定义和处理 - 在CMakeLists.txt中注册新的源文件 - 定义键盘协议模式(BOOT/REPORT)和报告类型枚举 - 实现按键事件处理、模式切换响应和电源管理功能 - 支持多媒体控制键和标准键盘按键的不同处理逻辑
29 lines
621 B
C
29 lines
621 B
C
#ifndef BLINKY_KEYBOARD_HID_REPORT_EVENT_H_
|
|
#define BLINKY_KEYBOARD_HID_REPORT_EVENT_H_
|
|
|
|
#include <app_event_manager.h>
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
#include "keyboard_core.h"
|
|
#include "mode_switch_event.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct keyboard_hid_report_event {
|
|
struct app_event_header header;
|
|
enum mode_switch_mode mode;
|
|
enum keyboard_report_type report_type;
|
|
enum keyboard_protocol_mode protocol_mode;
|
|
struct event_dyndata dyndata;
|
|
};
|
|
|
|
APP_EVENT_TYPE_DYNDATA_DECLARE(keyboard_hid_report_event);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BLINKY_KEYBOARD_HID_REPORT_EVENT_H_ */
|