Files
blinky/src/events/function_bitmap_state_event.c
skiinder 79af0eb025 feat(events): 添加功能位图状态事件并移除旧的按键功能事件
- 添加新的 function_bitmap_state_event 事件类型用于跟踪功能键位图状态
- 移除已废弃的 key_function_event 事件及其相关文件
- 更新 CMakeLists.txt 中的源文件列表以包含新事件文件
- 修改协议定义文件 device_comm.options 和 device_comm.proto
  以使用位图方式传输功能键状态而不是单独的按键事件
- 更新键盘核心模块中的位图处理逻辑,添加 usage_to_bitmap_pos
 辅助函数来正确定位修饰键和普通按键的位置
- 修改报告构建逻辑以正确处理新的位图布局
- 更新协议模块以处理新的功能位图状态事件和 LED 状态事件
- 实现协议模块中的 ACK、错误响应和 LED 状态编码功能
2026-04-15 10:52:01 +08:00

28 lines
798 B
C

#include "function_bitmap_state_event.h"
static void log_function_bitmap_state_event(const struct app_event_header *aeh)
{
const struct function_bitmap_state_event *event =
cast_function_bitmap_state_event(aeh);
APP_EVENT_MANAGER_LOG(aeh, "bitmap_len:%zu", sizeof(event->bitmap));
}
static void profile_function_bitmap_state_event(struct log_event_buf *buf,
const struct app_event_header *aeh)
{
ARG_UNUSED(buf);
ARG_UNUSED(aeh);
}
APP_EVENT_INFO_DEFINE(function_bitmap_state_event,
ENCODE(),
ENCODE(),
profile_function_bitmap_state_event);
APP_EVENT_TYPE_DEFINE(function_bitmap_state_event,
log_function_bitmap_state_event,
&function_bitmap_state_event_info,
APP_EVENT_FLAGS_CREATE(
APP_EVENT_TYPE_FLAGS_INIT_LOG_ENABLE));