纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。 Co-authored-by: Cursor <[email protected]>
33 lines
1.5 KiB
C
33 lines
1.5 KiB
C
#ifndef UI_DISPATCH_H
|
||
#define UI_DISPATCH_H
|
||
|
||
#include <stdbool.h>
|
||
#include <stdint.h>
|
||
#include "esp_err.h"
|
||
|
||
esp_err_t ui_dispatch_init(void);
|
||
|
||
void ui_dispatch_set_brightness(uint8_t brightness_percent);
|
||
/** @return true 已入队,false 未初始化或队列满 */
|
||
bool ui_dispatch_set_date(uint16_t year, uint8_t month, uint8_t day, uint8_t week);
|
||
void ui_dispatch_set_time(uint8_t hour, uint8_t minute, uint8_t second);
|
||
// void ui_dispatch_set_weather(uint8_t timing, uint16_t temp_enc, const char *weather); // UNUSED: BLE uses direct path
|
||
void ui_dispatch_refresh_home_weather_slot_hour_labels(void);
|
||
|
||
/** 万年历 week/day 与时间页联动:与最近一次日期同步一致;进入万年历屏时可再调一次 */
|
||
void ui_dispatch_sync_perpetual_calendar_from_time(void);
|
||
|
||
/**
|
||
* 软件时钟整秒进位后调用:仅在 23:59:59 -> 00:00:00 且已有有效车机日历时,把日期推进一天。
|
||
* 须在持有 lvgl_api_lock 的 LVGL 任务上下文中调用(如 LVGL 定时器回调内)。
|
||
*/
|
||
void ui_dispatch_clock_calendar_try_roll_at_midnight(int prev_h, int prev_m, int prev_s,
|
||
int new_h, int new_m, int new_s);
|
||
|
||
/**
|
||
* LVGL 秒定时器内调用:若已收到过 ui_dispatch 校时,则按 esp_timer 单调时钟推算时分秒并处理跨午夜翻日。
|
||
* @return true 已更新全局 `screen_time_digital_clock_now_*`(勿再 clock_count / try_roll)
|
||
*/
|
||
bool ui_dispatch_digital_clock_monotonic_tick(void);
|
||
#endif
|