feat(display): 添加完整的LVGL显示界面和电源管理功能

- 集成自定义字体ui_font_keyboard_small_18和ui_font_keyboard_time_48
- 配置LVGL编译选项,启用flex布局和压缩字体支持
- 实现完整的显示UI界面,包括日期时间、电池状态、连接状态等组件
- 添加显示模块的电源管理功能,支持自动休眠和唤醒
- 实现与电池状态、键盘LED、模式切换等事件的交互响应
- 添加1分钟空闲超时自动熄屏功能
- 使用自定义精简字体替换默认蒙特塞拉特字体
This commit is contained in:
2026-03-28 09:12:33 +08:00
parent 3d57e6416a
commit 0b874a5c86
5 changed files with 1444 additions and 73 deletions

View File

@@ -11,6 +11,14 @@ project(new_kbd)
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/events)
zephyr_compile_definitions(
LV_LVGL_H_INCLUDE_SIMPLE=1
LV_FONT_MONTSERRAT_14=0
LV_FONT_UNSCII_8=0
LV_FONT_DEFAULT=\&ui_font_keyboard_small_18
"LV_FONT_CUSTOM_DECLARE=LV_FONT_DECLARE(ui_font_keyboard_small_18) LV_FONT_DECLARE(ui_font_keyboard_time_48)"
)
target_compile_definitions(app PRIVATE
APP_HID_KEYMAP_DEF_PATH=\"hid_keymap_def.h\"
)
@@ -44,4 +52,6 @@ target_sources(app PRIVATE
src/modules/time_manager_module.c
src/modules/usb_hid_module.c
src/modules/ble_hid_module.c
src/ui/fonts/ui_font_keyboard_small_18.c
src/ui/fonts/ui_font_keyboard_time_48.c
)