LVGL 库提交

This commit is contained in:
2026-08-30 08:57:07 +08:00
parent 26c9098630
commit e2f199c6bf
1056 changed files with 556743 additions and 45 deletions
+42
View File
@@ -0,0 +1,42 @@
/**
* @file ui_task.c
* @brief UI 主任务:等待网络就绪 -> 初始化显示/菜单/推流 -> 周期刷新
* @note 单任务内同时驱动 LVGL 刷新与网络推流轮询,避免任一方阻塞导致界面不刷新。
*/
#include "ui_task.h"
#include "cmsis_os.h"
#include "sys_events.h"
#include "ui_port.h"
#include "ui_menu.h"
#include "ui_net_sink.h"
static void ui_task_wait_net_ready(void)
{
if (sys_evtHandle != NULL) {
osEventFlagsWait(sys_evtHandle, SYS_EVT_NET_READY,
osFlagsWaitAny, osWaitForever);
}
}
void ui_task_func(void *argument)
{
(void)argument;
ui_task_wait_net_ready();
if (ui_port_init() != 0) {
for (;;) { osDelay(1000); }
}
if (ui_menu_init() != 0) {
for (;;) { osDelay(1000); }
}
ui_net_sink_start(UI_NET_SINK_PORT);
while (1) {
ui_port_step(10);
ui_net_sink_poll();
osDelay(10);
}
}