添加了完整的键盘协议功能,包括: - 新增多个事件类型:cdc_proto_tx_event、function_bitmap_update_event、key_function_event - 在CMakeLists.txt中注册新的事件源文件 - 扩展keyboard_core.h定义键盘协议相关宏 - 增强protocol_module.h定义协议消息类型常量 - 更新protobuf定义device_comm.proto添加Bitmap、FunctionKeyEvent、Ack、Error消息 - 实现CDC协议包装器模块处理协议消息传输 - 改进键盘核心模块实现按键功能映射和位图管理 - 添加协议模块处理Hello、Bitmap、FunctionKeyEvent等协议消息 - 实现USB设备状态管理和错误响应机制
24 lines
429 B
C
24 lines
429 B
C
#ifndef BLINKY_CDC_PROTO_TX_EVENT_H_
|
|
#define BLINKY_CDC_PROTO_TX_EVENT_H_
|
|
|
|
#include <app_event_manager.h>
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct cdc_proto_tx_event {
|
|
struct app_event_header header;
|
|
uint8_t type;
|
|
struct event_dyndata dyndata;
|
|
};
|
|
|
|
APP_EVENT_TYPE_DYNDATA_DECLARE(cdc_proto_tx_event);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BLINKY_CDC_PROTO_TX_EVENT_H_ */
|