引入 vars.c 和 vars.h 用于管理与 UI 相关的全局变量。 新增 get_var_weigt_ui 和 set_var_weigt_ui 函数,用于访问和修改 UI 重量变量。 更新 CMakeLists.txt 以包含新的 UI 和 LVGL 依赖项。 将 main.c 转换为 main.cpp 以支持 C++ 特性,并重构了应用程序入口点。 实现了使用 FreeRTOS 定期更新 UI 的 UI 任务。 在 partitions.csv 中创建自定义分区表,用于管理闪存空间。 添加 update_sdkconfig.sh 脚本,自动更新 SDK 配置中的闪存大小和 SPIRAM 设置。 移除旧的 main.c 文件以精简项目结构。
29 lines
536 B
C
29 lines
536 B
C
#ifndef EEZ_LVGL_UI_FONTS_H
|
|
#define EEZ_LVGL_UI_FONTS_H
|
|
|
|
#include <lvgl.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern const lv_font_t ui_font_num;
|
|
extern const lv_font_t ui_font_num2;
|
|
extern const lv_font_t ui_font_chinese64;
|
|
extern const lv_font_t ui_font_chinese32;
|
|
|
|
#ifndef EXT_FONT_DESC_T
|
|
#define EXT_FONT_DESC_T
|
|
typedef struct _ext_font_desc_t {
|
|
const char *name;
|
|
const void *font_ptr;
|
|
} ext_font_desc_t;
|
|
#endif
|
|
|
|
extern ext_font_desc_t fonts[];
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /*EEZ_LVGL_UI_FONTS_H*/ |