884 lines
27 KiB
C
Executable File
884 lines
27 KiB
C
Executable File
/* clang-format off */
|
||
#if 1 /* Enable content */
|
||
#ifndef LV_CONF_H
|
||
#define LV_CONF_H
|
||
|
||
/* If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
|
||
#if 0 && defined(__ASSEMBLY__)
|
||
#include "my_include.h"
|
||
#endif
|
||
|
||
/*====================
|
||
COLOR SETTINGS
|
||
*====================*/
|
||
|
||
#define LV_USE_HOR_SIZE 800 // the same as SDL_HOR_RES
|
||
#define LV_USE_VER_SIZE 1280 // the same as SDL_VER_RES
|
||
|
||
/** Color depth: 1 (I1), 8 (L8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888) */
|
||
#define LV_COLOR_DEPTH 32
|
||
|
||
/**
|
||
* ✅ 关键新增配置:32位色深时,强制使用 ARGB8888 格式(开启Alpha透明)
|
||
* 作用:覆盖LVGL默认的 XRGB8888,让32位色深支持透明
|
||
*/
|
||
#define LV_COLOR_32_SWAP_OX 0
|
||
#define LV_COLOR_FORMAT LV_COLOR_FORMAT_ARGB8888
|
||
|
||
/** Enable alpha blending for layers and opacity */
|
||
#define LV_USE_ALPHA 1 // ✅ 必须开启(Alpha透明渲染核心开关)
|
||
|
||
/*********************
|
||
* 渲染/性能优化配置(核心提速)
|
||
*********************/
|
||
// 1. ✅ 开启LVGL硬件加速引擎(32位色深必备,渲染速度翻倍)
|
||
#define LV_USE_GPU 1
|
||
#define LV_USE_GPU_STM32_DMA2D 0 // 非STM32设0,ARM平台可按需开启
|
||
#define LV_USE_SW_RENDERER 1 // 开启软件渲染优化(嵌入式必开)
|
||
|
||
// 2. ✅ 开启脏区域渲染(仅重绘变化区域,CPU占用降低70%)
|
||
#define LV_USE_DIRTY_AREA 1
|
||
#define LV_DIRTY_AREA_MODE LV_DIRTY_AREA_MODE_PARTIAL // ✅ 改为部分模式,只重绘变化区域
|
||
|
||
// 3. ✅ 关闭冗余特效,减少CPU开销(GIF播放无需这些功能)
|
||
#define LV_USE_SHADOW 0
|
||
#define LV_USE_BORDER_GRADIENT 0
|
||
#define LV_USE_OPA_SCALE 0
|
||
|
||
// 4. ✅ 32位色深内存优化(适配ARGB8888,减少内存拷贝)
|
||
#define LV_COLOR_32_SWAP 0
|
||
#define LV_USE_LARGE_COORD 0 // 关闭大坐标支持,节省算力
|
||
|
||
// 5. ✅ 提升LVGL主线程优先级(避免定时器被其他任务阻塞)
|
||
#define LV_TICK_CUSTOM 1
|
||
#define LV_DISP_DEF_REFR_PERIOD 10 // 刷新周期10ms(100帧/秒,适配GIF)
|
||
|
||
// 6. ✅ 开启画布缓存优化(32位格式专属)
|
||
#define LV_CANVAS_BUFFER_ALIGN 4 // 画布缓存4字节对齐,与代码层对齐呼应
|
||
|
||
|
||
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
|
||
|
||
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
|
||
|
||
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
|
||
|
||
#define LV_STDINT_INCLUDE <stdint.h>
|
||
#define LV_STDDEF_INCLUDE <stddef.h>
|
||
#define LV_STDBOOL_INCLUDE <stdbool.h>
|
||
#define LV_INTTYPES_INCLUDE <inttypes.h>
|
||
#define LV_LIMITS_INCLUDE <limits.h>
|
||
#define LV_STDARG_INCLUDE <stdarg.h>
|
||
|
||
|
||
#define LV_MEM_CUSTOM 0 /* 1: Use the custom malloc/free implementation instead of the built-in `lv_mem_alloc()` and `lv_mem_free()` */
|
||
|
||
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||
/** Size of memory available for `lv_malloc()` in bytes (>= 2kB) */
|
||
/*增加到 16MB 以支持 PNG 解码 */
|
||
#define LV_MEM_SIZE (16 * 1024 * 1024)
|
||
//#define LV_MEM_SIZE (LV_USE_HOR_SIZE * LV_USE_VER_SIZE * 4*2U)
|
||
|
||
/** Size of the memory expand for `lv_malloc()` in bytes */
|
||
#define LV_MEM_POOL_EXPAND_SIZE 0
|
||
|
||
/** Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too. */
|
||
#define LV_MEM_ADR 0 /**< 0: unused*/
|
||
/* Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc */
|
||
#if LV_MEM_ADR == 0
|
||
#undef LV_MEM_POOL_INCLUDE
|
||
#undef LV_MEM_POOL_ALLOC
|
||
#endif
|
||
#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
|
||
|
||
#define LV_DEF_REFR_PERIOD 50 /**< [ms] 50ms (20fps),降低刷新频率避免 VO_BUSY */
|
||
|
||
#define LV_DPI_DEF 130 /**< [px/inch] */
|
||
|
||
#define LV_USE_OS LV_OS_NONE
|
||
|
||
#if LV_USE_OS == LV_OS_CUSTOM
|
||
#define LV_OS_CUSTOM_INCLUDE <stdint.h>
|
||
#endif
|
||
#if LV_USE_OS == LV_OS_FREERTOS
|
||
#define LV_USE_FREERTOS_TASK_NOTIFY 1
|
||
#endif
|
||
|
||
#define LV_DRAW_BUF_STRIDE_ALIGN 1
|
||
|
||
#define LV_DRAW_BUF_ALIGN 4
|
||
|
||
#define LV_DRAW_TRANSFORM_USE_MATRIX 0
|
||
|
||
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /**< [bytes]*/
|
||
#define LV_DRAW_LAYER_MAX_MEMORY 0 /**< No limit by default [bytes]*/
|
||
|
||
/** Stack size of drawing thread.
|
||
* NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more.
|
||
*/
|
||
#define LV_DRAW_THREAD_STACK_SIZE (24 * 1024) /**< [bytes]*/
|
||
#define LV_DRAW_THREAD_PRIO LV_THREAD_PRIO_HIGH
|
||
|
||
#define LV_USE_DRAW_SW 1
|
||
#if LV_USE_DRAW_SW == 1
|
||
#define LV_DRAW_SW_SUPPORT_RGB565 1
|
||
#define LV_DRAW_SW_SUPPORT_RGB565_SWAPPED 1
|
||
#define LV_DRAW_SW_SUPPORT_RGB565A8 1
|
||
#define LV_DRAW_SW_SUPPORT_RGB888 1
|
||
#define LV_DRAW_SW_SUPPORT_XRGB8888 1
|
||
#define LV_DRAW_SW_SUPPORT_ARGB8888 1
|
||
#define LV_DRAW_SW_SUPPORT_ARGB8888_PREMULTIPLIED 1
|
||
#define LV_DRAW_SW_SUPPORT_L8 1
|
||
#define LV_DRAW_SW_SUPPORT_AL88 1
|
||
#define LV_DRAW_SW_SUPPORT_A8 1
|
||
#define LV_DRAW_SW_SUPPORT_I1 1
|
||
|
||
#define LV_DRAW_SW_I1_LUM_THRESHOLD 127
|
||
#define LV_DRAW_SW_DRAW_UNIT_CNT 1
|
||
|
||
#define LV_USE_DRAW_ARM2D_SYNC 0
|
||
|
||
/** Enable native helium assembly to be compiled. */
|
||
#define LV_USE_NATIVE_HELIUM_ASM 0
|
||
#define LV_DRAW_SW_COMPLEX 1
|
||
|
||
#if LV_DRAW_SW_COMPLEX == 1
|
||
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
|
||
#define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4
|
||
#endif
|
||
|
||
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
|
||
|
||
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
|
||
#define LV_DRAW_SW_ASM_CUSTOM_INCLUDE ""
|
||
#endif
|
||
#define LV_USE_DRAW_SW_COMPLEX_GRADIENTS 1
|
||
|
||
#endif
|
||
|
||
#define LV_USE_NEMA_GFX 0
|
||
|
||
|
||
/** Use NXP's VG-Lite GPU on iMX RTxxx platforms. */
|
||
#define LV_USE_DRAW_VGLITE 0
|
||
|
||
/** Use NXP's PXP on iMX RTxxx platforms. */
|
||
#define LV_USE_PXP 0
|
||
|
||
/** Use NXP's G2D on MPU platforms. */
|
||
#define LV_USE_DRAW_G2D 0
|
||
|
||
|
||
/** Use Renesas Dave2D on RA platforms. */
|
||
#define LV_USE_DRAW_DAVE2D 0
|
||
|
||
/** Draw using cached SDL textures*/
|
||
#define LV_USE_DRAW_SDL 0
|
||
|
||
/** Use VG-Lite GPU. */
|
||
#define LV_USE_DRAW_VG_LITE 0
|
||
|
||
/** Accelerate blends, fills, etc. with STM32 DMA2D */
|
||
#define LV_USE_DRAW_DMA2D 0
|
||
|
||
/** Draw using cached OpenGLES textures */
|
||
#define LV_USE_DRAW_OPENGLES 0
|
||
|
||
/** Draw using espressif PPA accelerator */
|
||
#define LV_USE_PPA 0
|
||
#if LV_USE_PPA
|
||
#define LV_USE_PPA_IMG 0
|
||
#endif
|
||
/*=======================
|
||
* FEATURE CONFIGURATION
|
||
*=======================*/
|
||
|
||
/*-------------
|
||
* Logging
|
||
*-----------*/
|
||
|
||
/** Enable log module */
|
||
#define LV_USE_LOG 1
|
||
#if LV_USE_LOG
|
||
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
||
#define LV_LOG_PRINTF 1
|
||
#define LV_LOG_USE_TIMESTAMP 1
|
||
#define LV_LOG_USE_FILE_LINE 1
|
||
|
||
/* Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs. */
|
||
#define LV_LOG_TRACE_MEM 1 /**< Enable/disable trace logs in memory operations. */
|
||
#define LV_LOG_TRACE_TIMER 1 /**< Enable/disable trace logs in timer operations. */
|
||
#define LV_LOG_TRACE_INDEV 1 /**< Enable/disable trace logs in input device operations. */
|
||
#define LV_LOG_TRACE_DISP_REFR 1 /**< Enable/disable trace logs in display re-draw operations. */
|
||
#define LV_LOG_TRACE_EVENT 1 /**< Enable/disable trace logs in event dispatch logic. */
|
||
#define LV_LOG_TRACE_OBJ_CREATE 1 /**< Enable/disable trace logs in object creation (core `obj` creation plus every widget). */
|
||
#define LV_LOG_TRACE_LAYOUT 1 /**< Enable/disable trace logs in flex- and grid-layout operations. */
|
||
#define LV_LOG_TRACE_ANIM 1 /**< Enable/disable trace logs in animation logic. */
|
||
#define LV_LOG_TRACE_CACHE 1 /**< Enable/disable trace logs in cache operations. */
|
||
#endif /*LV_USE_LOG*/
|
||
|
||
/*-------------
|
||
* Asserts
|
||
*-----------*/
|
||
#define LV_USE_ASSERT_NULL 1 /**< Check if the parameter is NULL. (Very fast, recommended) */
|
||
#define LV_USE_ASSERT_MALLOC 1 /**< Checks is the memory is successfully allocated or no. (Very fast, recommended) */
|
||
#define LV_USE_ASSERT_STYLE 0
|
||
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*内存完整性检查*/
|
||
#define LV_USE_ASSERT_OBJ 0 /*对象完整性检查*/
|
||
|
||
/** Add a custom handler when assert happens e.g. to restart MCU. */
|
||
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
|
||
#define LV_ASSERT_HANDLER while(1); /**< Halt by default */
|
||
|
||
#define LV_USE_REFR_DEBUG 0
|
||
|
||
#define LV_USE_LAYER_DEBUG 0
|
||
#define LV_USE_PARALLEL_DRAW_DEBUG 0
|
||
|
||
/*-------------
|
||
* Others
|
||
*-----------*/
|
||
|
||
#define LV_ENABLE_GLOBAL_CUSTOM 0
|
||
#if LV_ENABLE_GLOBAL_CUSTOM
|
||
/** Header to include for custom 'lv_global' function" */
|
||
#define LV_GLOBAL_CUSTOM_INCLUDE <stdint.h>
|
||
#endif
|
||
/** 图片缓存1MB */
|
||
#define LV_CACHE_DEF_SIZE 0// (6 * 1024 * 1024)
|
||
#define LV_IMAGE_HEADER_CACHE_DEF_CNT 0//16
|
||
|
||
#define LV_GRADIENT_MAX_STOPS 2
|
||
#define LV_COLOR_MIX_ROUND_OFS 0
|
||
|
||
#define LV_OBJ_STYLE_CACHE 1
|
||
|
||
/** Add `id` field to `lv_obj_t` */
|
||
#define LV_USE_OBJ_ID 1
|
||
|
||
/** Enable support widget names*/
|
||
#define LV_USE_OBJ_NAME 0
|
||
|
||
/** Automatically assign an ID when obj is created */
|
||
#define LV_OBJ_ID_AUTO_ASSIGN LV_USE_OBJ_ID
|
||
#define LV_USE_OBJ_ID_BUILTIN 1
|
||
|
||
/** Use obj property set/get API. */
|
||
#define LV_USE_OBJ_PROPERTY 0
|
||
|
||
/** Enable property name support. */
|
||
#define LV_USE_OBJ_PROPERTY_NAME 1
|
||
|
||
/* Use VG-Lite Simulator.
|
||
* - Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
|
||
#define LV_USE_VG_LITE_THORVG 0
|
||
#define LV_USE_GESTURE_RECOGNITION 0
|
||
|
||
/*=====================
|
||
* COMPILER SETTINGS
|
||
*====================*/
|
||
|
||
/** For big endian systems set to 1 */
|
||
#define LV_BIG_ENDIAN_SYSTEM 0
|
||
|
||
/** Define a custom attribute for `lv_tick_inc` function */
|
||
#define LV_ATTRIBUTE_TICK_INC
|
||
|
||
/** Define a custom attribute for `lv_timer_handler` function */
|
||
#define LV_ATTRIBUTE_TIMER_HANDLER
|
||
|
||
/** Define a custom attribute for `lv_display_flush_ready` function */
|
||
#define LV_ATTRIBUTE_FLUSH_READY
|
||
|
||
/** Align VG_LITE buffers on this number of bytes.
|
||
* @note vglite_src_buf_aligned() uses this value to validate alignment of passed buffer pointers. */
|
||
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
|
||
|
||
/** Will be added where memory needs to be aligned (with -Os data might not be aligned to boundary by default).
|
||
* E.g. __attribute__((aligned(4)))*/
|
||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||
|
||
/** Attribute to mark large constant arrays, for example for font bitmaps */
|
||
#define LV_ATTRIBUTE_LARGE_CONST
|
||
|
||
/** Compiler prefix for a large array declaration in RAM */
|
||
#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
|
||
|
||
/** Place performance critical functions into a faster memory (e.g RAM) */
|
||
#define LV_ATTRIBUTE_FAST_MEM
|
||
|
||
/** Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
||
* should also appear on LVGL binding API such as MicroPython. */
|
||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /**< The default value just prevents GCC warning */
|
||
|
||
/** Prefix all global extern data with this */
|
||
#define LV_ATTRIBUTE_EXTERN_DATA
|
||
|
||
/** Use `float` as `lv_value_precise_t` */
|
||
#define LV_USE_FLOAT 1
|
||
|
||
/** Enable matrix support
|
||
* - Requires `LV_USE_FLOAT = 1` */
|
||
#define LV_USE_MATRIX 1
|
||
|
||
/** Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default */
|
||
#ifndef LV_USE_PRIVATE_API
|
||
#define LV_USE_PRIVATE_API 0
|
||
#endif
|
||
|
||
/*==================
|
||
* FONT USAGE
|
||
*===================*/
|
||
|
||
/* Montserrat fonts with ASCII range and some symbols using bpp = 4
|
||
* https://fonts.google.com/specimen/Montserrat */
|
||
|
||
#define LV_FONT_MONTSERRAT_14 0
|
||
#define LV_FONT_MONTSERRAT_22 1
|
||
#define LV_FONT_MONTSERRAT_36 0
|
||
|
||
|
||
/* Demonstrate special features */
|
||
#define LV_FONT_MONTSERRAT_28_COMPRESSED 1
|
||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1
|
||
#define LV_FONT_SIMSUN_14_CJK 0 /**< 1000 most common CJK radicals */
|
||
#define LV_FONT_SIMSUN_16_CJK 1
|
||
#define LV_FONT_SOURCE_HAN_SANS_SC_14_CJK 0 /**< 1338 most common CJK radicals */
|
||
#define LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 0 /**< 1338 most common CJK radicals */
|
||
|
||
/** Pixel perfect monospaced fonts */
|
||
#define LV_FONT_UNSCII_8 1
|
||
#define LV_FONT_UNSCII_16 0
|
||
|
||
#define LV_FONT_CUSTOM_DECLARE
|
||
|
||
/** Always set a default font */
|
||
#define LV_FONT_DEFAULT &lv_font_montserrat_22
|
||
#define LV_FONT_FMT_TXT_LARGE 0
|
||
|
||
/** Enables/disables support for compressed fonts. */
|
||
#define LV_USE_FONT_COMPRESSED 0
|
||
|
||
/** Enable drawing placeholders when glyph dsc is not found. */
|
||
#define LV_USE_FONT_PLACEHOLDER 1
|
||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||
|
||
/** While rendering text strings, break (wrap) text on these chars. */
|
||
#define LV_TXT_BREAK_CHARS " ,.;:-_)]}"
|
||
#define LV_TXT_LINE_BREAK_LONG_LEN 0
|
||
|
||
/** Minimum number of characters in a long word to put on a line before a break.
|
||
* Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
|
||
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
|
||
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
|
||
#define LV_USE_BIDI 0
|
||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
||
|
||
#define LV_TXT_COLOR_CMD "#"
|
||
#define LV_WIDGETS_HAS_DEFAULT_VALUE 1
|
||
|
||
#define LV_USE_ANIMIMG 0
|
||
|
||
#define LV_USE_ARC 0
|
||
|
||
#define LV_USE_ARCLABEL 0
|
||
|
||
#define LV_USE_BAR 0
|
||
|
||
#define LV_USE_BUTTON 0
|
||
|
||
#define LV_USE_BUTTONMATRIX 0
|
||
|
||
#define LV_USE_CALENDAR 0
|
||
|
||
#define LV_USE_CANVAS 1
|
||
|
||
#define LV_USE_CHART 0
|
||
|
||
#define LV_USE_CHECKBOX 0
|
||
|
||
#define LV_USE_DROPDOWN 0 /**< Requires: lv_label */
|
||
|
||
#define LV_USE_IMAGE 1 /**< Requires: lv_label */
|
||
|
||
#define LV_USE_IMAGEBUTTON 0
|
||
|
||
#define LV_USE_KEYBOARD 0
|
||
|
||
#define LV_USE_LABEL 1
|
||
#if LV_USE_LABEL
|
||
#define LV_LABEL_TEXT_SELECTION 1 /**< Enable selecting text of the label */
|
||
#define LV_LABEL_LONG_TXT_HINT 1 /**< Store some extra info in labels to speed up drawing of very long text */
|
||
#define LV_LABEL_WAIT_CHAR_COUNT 3 /**< The count of wait chart */
|
||
#endif
|
||
|
||
#define LV_USE_LED 0
|
||
|
||
#define LV_USE_LINE 0
|
||
|
||
#define LV_USE_LIST 0
|
||
|
||
#define LV_USE_LOTTIE 0
|
||
|
||
#define LV_USE_MENU 0
|
||
|
||
#define LV_USE_MSGBOX 0
|
||
|
||
#define LV_USE_ROLLER 1 /**< Requires: lv_label */
|
||
|
||
#define LV_USE_SCALE 0
|
||
|
||
#define LV_USE_SLIDER 0 /**< Requires: lv_bar */
|
||
|
||
#define LV_USE_SPAN 0
|
||
#if LV_USE_SPAN
|
||
/** A line of text can contain this maximum number of span descriptors. */
|
||
#define LV_SPAN_SNIPPET_STACK_SIZE 64
|
||
#endif
|
||
|
||
#define LV_USE_SPINBOX 0
|
||
|
||
#define LV_USE_SPINNER 0
|
||
|
||
#define LV_USE_SWITCH 0
|
||
|
||
#define LV_USE_TABLE 0
|
||
|
||
#define LV_USE_TABVIEW 0
|
||
|
||
#define LV_USE_TEXTAREA 0 /**< Requires: lv_label */
|
||
#if LV_USE_TEXTAREA != 0
|
||
#define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /**< [ms] */
|
||
#endif
|
||
|
||
#define LV_USE_TILEVIEW 0
|
||
|
||
#define LV_USE_WIN 0
|
||
|
||
#define LV_USE_3DTEXTURE 0
|
||
|
||
#define LV_USE_THEME_DEFAULT 0
|
||
#if LV_USE_THEME_DEFAULT
|
||
/** 0: Light mode; 1: Dark mode */
|
||
#define LV_THEME_DEFAULT_DARK 0
|
||
|
||
/** 1: Enable grow on press */
|
||
#define LV_THEME_DEFAULT_GROW 0
|
||
|
||
/** Default transition time in ms. */
|
||
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
||
#endif /*LV_USE_THEME_DEFAULT*/
|
||
|
||
/** A very simple theme that is a good starting point for a custom theme */
|
||
#define LV_USE_THEME_SIMPLE 0
|
||
|
||
/** A theme designed for monochrome displays */
|
||
#define LV_USE_THEME_MONO 1
|
||
|
||
#define LV_USE_FLEX 1
|
||
#define LV_USE_GRID 1
|
||
#define LV_FS_DEFAULT_DRIVER_LETTER '\0'
|
||
|
||
|
||
//配置文件系统
|
||
|
||
/** API for fopen, fread, etc. */
|
||
#define LV_USE_FS_STDIO 0
|
||
|
||
/** API for open, read, etc. */
|
||
/* 设置开启文件系统 调试时开启 */
|
||
#define LV_USE_FS_POSIX 1
|
||
#if LV_USE_FS_POSIX
|
||
#define LV_FS_POSIX_LETTER 'A' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_POSIX_PATH "/" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#define LV_FS_POSIX_CACHE_SIZE 51200 /**< >0 to cache this number of bytes in lv_fs_read() 50KB缓存 */
|
||
#endif
|
||
|
||
/** API for CreateFile, ReadFile, etc. */
|
||
#define LV_USE_FS_WIN32 0
|
||
#if LV_USE_FS_WIN32
|
||
#define LV_FS_WIN32_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_WIN32_PATH "" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#define LV_FS_WIN32_CACHE_SIZE 0 /**< >0 to cache this number of bytes in lv_fs_read() */
|
||
#endif
|
||
|
||
/** API for FATFS (needs to be added separately). Uses f_open, f_read, etc. */
|
||
|
||
#define LV_USE_FS_FATFS 0
|
||
#if LV_USE_FS_FATFS
|
||
#define LV_FS_FATFS_LETTER 'F' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_FATFS_PATH "" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#define LV_FS_FATFS_CACHE_SIZE 512 /**< >0 to cache this number of bytes in lv_fs_read() */
|
||
#endif
|
||
|
||
/** API for memory-mapped file access. */
|
||
#define LV_USE_FS_MEMFS 0
|
||
#if LV_USE_FS_MEMFS
|
||
#define LV_FS_MEMFS_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#endif
|
||
|
||
/** API for LittleFs. */
|
||
#define LV_USE_FS_LITTLEFS 0
|
||
#if LV_USE_FS_LITTLEFS
|
||
#define LV_FS_LITTLEFS_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_LITTLEFS_PATH "" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#endif
|
||
|
||
/** API for Arduino LittleFs. */
|
||
#define LV_USE_FS_ARDUINO_ESP_LITTLEFS 0
|
||
#if LV_USE_FS_ARDUINO_ESP_LITTLEFS
|
||
#define LV_FS_ARDUINO_ESP_LITTLEFS_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_ARDUINO_ESP_LITTLEFS_PATH "" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#endif
|
||
|
||
/** API for Arduino Sd. */
|
||
#define LV_USE_FS_ARDUINO_SD 0
|
||
#if LV_USE_FS_ARDUINO_SD
|
||
#define LV_FS_ARDUINO_SD_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#define LV_FS_ARDUINO_SD_PATH "" /**< Set the working directory. File/directory paths will be appended to it. */
|
||
#endif
|
||
|
||
/** API for UEFI */
|
||
#define LV_USE_FS_UEFI 0
|
||
#if LV_USE_FS_UEFI
|
||
#define LV_FS_UEFI_LETTER '\0' /**< Set an upper-case driver-identifier letter for this driver (e.g. 'A'). */
|
||
#endif
|
||
|
||
/** PNG decoder library
|
||
* [LodePNG](https://github.com/lvandeve/lodepng) */
|
||
#define LV_USE_LODEPNG 1 /* 使用 LodePNG 避免 zlib crc32 冲突 */
|
||
|
||
/** PNG decoder(libpng) library */
|
||
#define LV_USE_LIBPNG 0 /* 禁用 libpng,避免 crc32 冲突 */
|
||
|
||
/** BMP decoder library */
|
||
#define LV_USE_BMP 0
|
||
|
||
/** JPG + split JPG decoder library.
|
||
* Split JPG is a custom format optimized for embedded systems. */
|
||
#define LV_USE_TJPGD 0
|
||
|
||
/** libjpeg-turbo decoder library.
|
||
* - Supports complete JPEG specifications and high-performance JPEG decoding. */
|
||
/*禁用重型TurboJPEG*/
|
||
#define LV_USE_LIBJPEG_TURBO 1
|
||
|
||
/** GIF decoder library */
|
||
#define LV_USE_GIF 1
|
||
#if LV_USE_GIF
|
||
/** GIF decoder accelerate */
|
||
#define LV_GIF_CACHE_DECODE_DATA 1
|
||
#endif
|
||
|
||
|
||
/** Decode bin images to RAM */
|
||
#define LV_BIN_DECODER_RAM_LOAD 1
|
||
|
||
/** RLE decompress library */
|
||
#define LV_USE_RLE 1
|
||
|
||
/** QR code library */
|
||
#define LV_USE_QRCODE 1
|
||
|
||
/** Barcode code library */
|
||
#define LV_USE_BARCODE 0
|
||
|
||
/** FreeType library */
|
||
#define LV_USE_FREETYPE 0
|
||
#if LV_USE_FREETYPE
|
||
/** Let FreeType use LVGL memory and file porting */
|
||
#define LV_FREETYPE_USE_LVGL_PORT 0
|
||
|
||
/** Cache count of glyphs in FreeType, i.e. number of glyphs that can be cached.
|
||
* The higher the value, the more memory will be used. */
|
||
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256
|
||
#endif
|
||
|
||
/** Built-in TTF decoder */
|
||
#define LV_USE_TINY_TTF 0
|
||
#if LV_USE_TINY_TTF
|
||
/* Enable loading TTF data from files */
|
||
#define LV_TINY_TTF_FILE_SUPPORT 0
|
||
#define LV_TINY_TTF_CACHE_GLYPH_CNT 128
|
||
#define LV_TINY_TTF_CACHE_KERNING_CNT 256
|
||
#endif
|
||
|
||
/** Rlottie library */
|
||
#define LV_USE_RLOTTIE 0
|
||
|
||
/** Enable Vector Graphic APIs
|
||
* - Requires `LV_USE_MATRIX = 1` */
|
||
/*禁用矢量图形(除非必需)*/
|
||
#define LV_USE_VECTOR_GRAPHIC 0
|
||
|
||
/** Enable ThorVG (vector graphics library) from the src/libs folder */
|
||
#define LV_USE_THORVG_INTERNAL 0
|
||
|
||
/** Enable ThorVG by assuming that its installed and linked to the project */
|
||
#define LV_USE_THORVG_EXTERNAL 0
|
||
|
||
/** Use lvgl built-in LZ4 lib */
|
||
#define LV_USE_LZ4_INTERNAL 1
|
||
|
||
/** Use external LZ4 library */
|
||
#define LV_USE_LZ4_EXTERNAL 0
|
||
|
||
/*SVG library
|
||
* - Requires `LV_USE_VECTOR_GRAPHIC = 1` */
|
||
#define LV_USE_SVG 0
|
||
#define LV_USE_SVG_ANIMATION 0
|
||
#define LV_USE_SVG_DEBUG 0
|
||
|
||
/** FFmpeg library for image decoding and playing videos.
|
||
* Supports all major image formats so do not enable other image decoder with it. */
|
||
#define LV_USE_FFMPEG 0
|
||
#if LV_USE_FFMPEG
|
||
/** Dump input information to stderr */
|
||
#define LV_FFMPEG_DUMP_FORMAT 0
|
||
#define LV_FFMPEG_PLAYER_USE_LV_FS 0
|
||
#endif
|
||
|
||
/*==================
|
||
* OTHERS
|
||
*==================*/
|
||
/* Documentation for several of the below items can be found here: https://docs.lvgl.io/master/details/auxiliary-modules/index.html . */
|
||
|
||
/** 1: Enable API to take snapshot for object */
|
||
#define LV_USE_SNAPSHOT 0
|
||
|
||
/** 1: Enable system monitor component 开启监控 */
|
||
#define LV_USE_SYSMON 0
|
||
#if LV_USE_SYSMON
|
||
/** Get the idle percentage. E.g. uint32_t my_get_idle(void); */
|
||
#define LV_SYSMON_GET_IDLE lv_os_get_idle_percent
|
||
|
||
/** 1: Show CPU usage and FPS count.
|
||
* - Requires `LV_USE_SYSMON = 1` */
|
||
/*启用内存监控*/
|
||
#define LV_USE_PERF_MONITOR 1
|
||
#if LV_USE_PERF_MONITOR
|
||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||
|
||
/** 0: Displays performance data on the screen; 1: Prints performance data using log. */
|
||
#define LV_USE_PERF_MONITOR_LOG_MODE 0
|
||
#endif
|
||
|
||
/** 1: Show used memory and memory fragmentation.
|
||
* - Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN`
|
||
* - Requires `LV_USE_SYSMON = 1`*/
|
||
/*启用内存监控*/
|
||
#define LV_USE_MEM_MONITOR 1
|
||
#if LV_USE_MEM_MONITOR
|
||
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
||
#endif
|
||
#endif /*LV_USE_SYSMON*/
|
||
|
||
/** 1: Enable runtime performance profiler */
|
||
#define LV_USE_PROFILER 0
|
||
|
||
/** 1: Enable Monkey test */
|
||
#define LV_USE_MONKEY 0
|
||
|
||
/** 1: Enable grid navigation */
|
||
#define LV_USE_GRIDNAV 0
|
||
|
||
/** 1: Enable `lv_obj` fragment logic */
|
||
#define LV_USE_FRAGMENT 0
|
||
|
||
/** 1: Support using images as font in label or span widgets */
|
||
#define LV_USE_IMGFONT 0
|
||
|
||
/** 1: Enable an observer pattern implementation */
|
||
#define LV_USE_OBSERVER 1
|
||
|
||
/** 1: Enable Pinyin input method
|
||
* - Requires: lv_keyboard */
|
||
#define LV_USE_IME_PINYIN 0
|
||
#define LV_USE_FILE_EXPLORER 0
|
||
|
||
/** 1: Enable Font manager */
|
||
#define LV_USE_FONT_MANAGER 0
|
||
#if LV_USE_FONT_MANAGER
|
||
|
||
/**Font manager name max length*/
|
||
#define LV_FONT_MANAGER_NAME_MAX_LEN 32
|
||
|
||
#endif
|
||
|
||
/** Enable emulated input devices, time emulation, and screenshot compares. */
|
||
#define LV_USE_TEST 0
|
||
#if LV_USE_TEST
|
||
|
||
/** Enable `lv_test_screenshot_compare`.
|
||
* Requires libpng and a few MB of extra RAM. */
|
||
#define LV_USE_TEST_SCREENSHOT_COMPARE 0
|
||
#endif /*LV_USE_TEST*/
|
||
|
||
/** Enable loading XML UIs runtime */
|
||
#define LV_USE_XML 0
|
||
|
||
/*1: Enable color filter style*/
|
||
#define LV_USE_COLOR_FILTER 0
|
||
/*==================
|
||
* DEVICES
|
||
*==================*/
|
||
|
||
/** Use SDL to open window on PC and handle mouse and keyboard. */
|
||
#define LV_USE_SDL 0
|
||
|
||
/** Use X11 to open window on Linux desktop and handle mouse and keyboard */
|
||
#define LV_USE_X11 0
|
||
|
||
/** Use Wayland to open a window and handle input on Linux or BSD desktops */
|
||
#define LV_USE_WAYLAND 0
|
||
|
||
/** Driver for /dev/fb */
|
||
#define LV_USE_LINUX_FBDEV 0
|
||
#if LV_USE_LINUX_FBDEV
|
||
#define LV_LINUX_FBDEV_BSD 0
|
||
#define LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
|
||
#define LV_LINUX_FBDEV_BUFFER_COUNT 0
|
||
#define LV_LINUX_FBDEV_BUFFER_SIZE 60
|
||
#define LV_LINUX_FBDEV_MMAP 1
|
||
#endif
|
||
|
||
/** Use Nuttx to open window and handle touchscreen */
|
||
#define LV_USE_NUTTX 0
|
||
|
||
/** Driver for /dev/dri/card */
|
||
#define LV_USE_LINUX_DRM 0
|
||
|
||
/** Interface for TFT_eSPI */
|
||
#define LV_USE_TFT_ESPI 0
|
||
|
||
/** Driver for evdev input devices */
|
||
#define LV_USE_EVDEV 0
|
||
|
||
/** Driver for libinput input devices */
|
||
#define LV_USE_LIBINPUT 0
|
||
|
||
/* Drivers for LCD devices connected via SPI/parallel port */
|
||
#define LV_USE_ST7735 0
|
||
#define LV_USE_ST7789 0
|
||
#define LV_USE_ST7796 0
|
||
#define LV_USE_ILI9341 0
|
||
#define LV_USE_FT81X 0
|
||
|
||
#if (LV_USE_ST7735 | LV_USE_ST7789 | LV_USE_ST7796 | LV_USE_ILI9341)
|
||
#define LV_USE_GENERIC_MIPI 1
|
||
#else
|
||
#define LV_USE_GENERIC_MIPI 0
|
||
#endif
|
||
|
||
/** Driver for Renesas GLCD */
|
||
#define LV_USE_RENESAS_GLCDC 0
|
||
|
||
/** Driver for ST LTDC */
|
||
#define LV_USE_ST_LTDC 0
|
||
#if LV_USE_ST_LTDC
|
||
/* Only used for partial. */
|
||
#define LV_ST_LTDC_USE_DMA2D_FLUSH 0
|
||
#endif
|
||
|
||
/** Driver for NXP ELCDIF */
|
||
#define LV_USE_NXP_ELCDIF 0
|
||
|
||
/** LVGL Windows backend */
|
||
#define LV_USE_WINDOWS 0
|
||
|
||
/** LVGL UEFI backend */
|
||
#define LV_USE_UEFI 0
|
||
#if LV_USE_UEFI
|
||
#define LV_USE_UEFI_INCLUDE "myefi.h" /**< Header that hides the actual framework (EDK2, gnu-efi, ...) */
|
||
#define LV_UEFI_USE_MEMORY_SERVICES 0 /**< Use the memory functions from the boot services table */
|
||
#endif
|
||
|
||
/** Use OpenGL to open window on PC and handle mouse and keyboard */
|
||
#define LV_USE_OPENGLES 0
|
||
#if LV_USE_OPENGLES
|
||
#define LV_USE_OPENGLES_DEBUG 1 /**< Enable or disable debug for opengles */
|
||
#endif
|
||
|
||
/** QNX Screen display and input drivers */
|
||
#define LV_USE_QNX 0
|
||
#if LV_USE_QNX
|
||
#define LV_QNX_BUF_COUNT 1 /**< 1 or 2 */
|
||
#endif
|
||
|
||
/*=====================
|
||
* BUILD OPTIONS
|
||
*======================*/
|
||
|
||
/** Enable examples to be built with the library. */
|
||
#define LV_BUILD_EXAMPLES 0
|
||
|
||
/** Build the demos */
|
||
#define LV_BUILD_DEMOS 0
|
||
|
||
/*===================
|
||
* DEMO USAGE
|
||
====================*/
|
||
|
||
#if LV_BUILD_DEMOS
|
||
/** Show some widgets. This might be required to increase `LV_MEM_SIZE`. */
|
||
#define LV_USE_DEMO_WIDGETS 0
|
||
|
||
/** Demonstrate usage of encoder and keyboard. */
|
||
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 1
|
||
|
||
/** Benchmark your system */
|
||
#define LV_USE_DEMO_BENCHMARK 0
|
||
|
||
#if LV_USE_DEMO_BENCHMARK
|
||
/** Use fonts where bitmaps are aligned 16 byte and has Nx16 byte stride */
|
||
#define LV_DEMO_BENCHMARK_ALIGNED_FONTS 0
|
||
#endif
|
||
|
||
/** Render test for each primitive.
|
||
* - Requires at least 480x272 display. */
|
||
#define LV_USE_DEMO_RENDER 0
|
||
|
||
/** Stress test for LVGL */
|
||
#define LV_USE_DEMO_STRESS 0
|
||
|
||
/** Music player demo */
|
||
#define LV_USE_DEMO_MUSIC 0
|
||
/** Vector graphic demo */
|
||
#define LV_USE_DEMO_VECTOR_GRAPHIC 0
|
||
|
||
/*---------------------------
|
||
* Demos from lvgl/lv_demos
|
||
---------------------------*/
|
||
|
||
/** Flex layout demo */
|
||
#define LV_USE_DEMO_FLEX_LAYOUT 0
|
||
|
||
/** Smart-phone like multi-language demo */
|
||
/* 关闭多语言 */
|
||
#define LV_USE_DEMO_MULTILANG 0
|
||
|
||
/** Widget transformation demo */
|
||
#define LV_USE_DEMO_TRANSFORM 0
|
||
|
||
/** Demonstrate scroll settings */
|
||
#define LV_USE_DEMO_SCROLL 0
|
||
|
||
/*E-bike demo with Lottie animations (if LV_USE_LOTTIE is enabled)*/
|
||
#define LV_USE_DEMO_EBIKE 0
|
||
#if LV_USE_DEMO_EBIKE
|
||
#define LV_DEMO_EBIKE_PORTRAIT 0 /*0: for 480x270..480x320, 1: for 480x800..720x1280*/
|
||
#endif
|
||
|
||
/** High-resolution demo */
|
||
#define LV_USE_DEMO_HIGH_RES 0
|
||
|
||
/* Smart watch demo */
|
||
#define LV_USE_DEMO_SMARTWATCH 0
|
||
#endif /* LV_BUILD_DEMOS */
|
||
|
||
/*--END OF LV_CONF_H--*/
|
||
|
||
#endif /*LV_CONF_H*/
|
||
|
||
#endif /*End of "Content enable"*/
|