- 新增settings_module.c实现设置菜单逻辑,包括蓝牙配对槽位管理和主题颜色选择 - 添加settings_mode_event.h/.c和settings_view_event.h/.c事件定义用于设置模式切换 - 创建settings_ui.h定义设置界面状态结构体和页面枚举 - 修改display_module.c集成设置UI显示逻辑,支持主界面和设置界面切换 - 在keyboard_core_module.c中添加设置活动状态检查,避免设置模式下键盘输入冲突 - 更新CMakeLists.txt包含新的源文件:settings_module.c、ui_settings.c及新事件文件 - 修改prj.conf调整LVGL内存池大小从16KB到32KB以支持更复杂UI渲染 - 移除BLE配对擦除相关配置选项并增加长按检测时间到1500毫秒 - 更新ui_main.c添加可见性控制函数用于界面切换
41 lines
740 B
C
41 lines
740 B
C
#ifndef BLINKY_SETTINGS_VIEW_EVENT_H_
|
|
#define BLINKY_SETTINGS_VIEW_EVENT_H_
|
|
|
|
#include <string.h>
|
|
|
|
#include <app_event_manager.h>
|
|
#include <app_event_manager_profiler_tracer.h>
|
|
|
|
#include "settings_ui.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct settings_view_event {
|
|
struct app_event_header header;
|
|
struct settings_ui_state state;
|
|
};
|
|
|
|
APP_EVENT_TYPE_DECLARE(settings_view_event);
|
|
|
|
static inline void submit_settings_view_event(
|
|
const struct settings_ui_state *state)
|
|
{
|
|
struct settings_view_event *event;
|
|
|
|
if (state == NULL) {
|
|
return;
|
|
}
|
|
|
|
event = new_settings_view_event();
|
|
memcpy(&event->state, state, sizeof(event->state));
|
|
APP_EVENT_SUBMIT(event);
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BLINKY_SETTINGS_VIEW_EVENT_H_ */
|