Files
STM32F4-Base/simulator/lv_conf.h
T

310 lines
9.7 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @file lv_conf.h
* @brief LVGL v9.3.0 配置 — Windows SDL2 模拟器(160x160 1bpp 单色)
* @note 基于项目 Lib/lv_conf.h 适配,用于 PC 模拟器 UI 开发
*/
#ifndef LV_CONF_H
#define LV_CONF_H
/* clang-format off */
/*============================================================================
* MEMORY AND STANDARD LIBRARY
*============================================================================*/
#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>
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
#define LV_MEM_SIZE (40 * 1024U)
#define LV_MEM_ADR 0
#endif
/*============================================================================
* OS
*============================================================================*/
#define LV_USE_OS LV_OS_NONE
/*============================================================================
* RENDERING
*============================================================================*/
/** 1bpp 单色 */
#define LV_COLOR_DEPTH 1
#define LV_COLOR_MIX_ROUND_OFS 0
/** 刷新周期(ms) */
#define LV_DEF_REFR_PERIOD 20
/** DPI */
#define LV_DPI_DEF 130
/** 绘制缓冲对齐 */
#define LV_DRAW_BUF_STRIDE_ALIGN 1
#define LV_DRAW_BUF_ALIGN 4
/** 复杂绘制:主界面顶部开口浅 V 装饰含斜线(lv_line 斜段依赖 LV_DRAW_SW_COMPLEX),须与 MCU 端一致保持开启,否则两腿不渲染 */
#define LV_DRAW_SW_COMPLEX 1
#define LV_DRAW_SW_COMPLEX_GRADIENTS 0
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
#define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4 /* LV_DRAW_SW_COMPLEX 依赖非零(零长数组 C2466);与 MCU 端默认一致 */
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE 0
#define LV_DRAW_LAYER_MAX_MEMORY 0
/** SW 渲染器:启用 I1 支持 */
#define LV_USE_DRAW_SW 1
#define LV_DRAW_SW_SUPPORT_RGB565 0
#define LV_DRAW_SW_SUPPORT_RGB565_SWAPPED 0
#define LV_DRAW_SW_SUPPORT_RGB565A8 0
#define LV_DRAW_SW_SUPPORT_RGB888 0
#define LV_DRAW_SW_SUPPORT_XRGB8888 0
#define LV_DRAW_SW_SUPPORT_ARGB8888 0
#define LV_DRAW_SW_SUPPORT_ARGB8888_PREMULTIPLIED 0
#define LV_DRAW_SW_SUPPORT_L8 0
#define LV_DRAW_SW_SUPPORT_AL88 0
#define LV_DRAW_SW_SUPPORT_A8 0
#define LV_DRAW_SW_SUPPORT_I1 1
#define LV_DRAW_SW_I1_LUM_THRESHOLD 127
/** 关闭 GPU/矢量绘制 */
#define LV_USE_DRAW_VG_LITE 0
#define LV_USE_DRAW_DAVE2D 0
#define LV_USE_DRAW_NEMA_GFX 0
#define LV_USE_DRAW_PXP 0
#define LV_USE_DRAW_PPA 0
#define LV_USE_DRAW_DMA2D 0
#define LV_USE_DRAW_EVE 0
#define LV_USE_DRAW_G2D 0
#define LV_USE_DRAW_NANOVG 0
#define LV_USE_DRAW_OPENGLES 0
#define LV_USE_DRAW_SDL 0
#define LV_USE_THORVG 0
#define LV_USE_VECTOR_GRAPHIC 0
#define LV_USE_MATRIX 0
/* 离屏截图(--screenshot)用 lv_snapshot 取整屏,需要开启 */
#define LV_USE_SNAPSHOT 1
/*============================================================================
* INPUT DEVICES
*============================================================================*/
#define LV_USE_GRIDNAV 0
#define LV_USE_GESTURE_RECOGNITION 0
/*============================================================================
* CORE
*============================================================================*/
#define LV_OBJ_STYLE_CACHE 1
#define LV_USE_OBJ_NAME 1
#define LV_USE_OBJ_ID 1
#define LV_OBJ_ID_AUTO_ASSIGN 1
#define LV_USE_OBJ_ID_BUILTIN 1
#define LV_USE_OBJ_PROPERTY 0
#define LV_USE_EXT_DATA 0
#define LV_USE_FLOAT 0
#define LV_USE_OBSERVER 0
#define LV_USE_TRANSLATION 0
#define LV_USE_COLOR_FILTER 0
/*============================================================================
* LOGGING
*============================================================================*/
#define LV_USE_LOG 0
/*============================================================================
* THEMES
*============================================================================*/
#define LV_USE_THEME_DEFAULT 0
#define LV_USE_THEME_SIMPLE 0
#define LV_USE_THEME_MONO 1
/*============================================================================
* LAYOUTS
*============================================================================*/
#define LV_USE_FLEX 1
#define LV_USE_GRID 0
/*============================================================================
* IMAGE SETTINGS
*============================================================================*/
#define LV_CACHE_DEF_SIZE 0
#define LV_IMAGE_HEADER_CACHE_DEF_CNT 0
#define LV_USE_RLE 0
#define LV_USE_LZ4 0
#define LV_BIN_DECODER_RAM_LOAD 0
#define LV_USE_LODEPNG 0
#define LV_USE_LIBPNG 0
#define LV_USE_BMP 0
#define LV_USE_TJPGD 0
#define LV_USE_LIBJPEG_TURBO 0
#define LV_USE_LIBWEBP 0
#define LV_USE_SVG 0
/*============================================================================
* TEXT & FONT
*============================================================================*/
#define LV_TXT_ENC LV_TXT_ENC_UTF8
#define LV_TXT_BREAK_CHARS " ,.;:-_)]}"
#define LV_TXT_LINE_BREAK_LONG_LEN 0
#define LV_TXT_COLOR_CMD "#"
#define LV_USE_BIDI 0
#define LV_USE_ARABIC_PERSIAN_CHARS 0
/** 内置字体:仅启用 Montserrat 12 作为基础 */
#define LV_FONT_MONTSERRAT_8 0
#define LV_FONT_MONTSERRAT_10 0
#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 0
#define LV_FONT_MONTSERRAT_16 0
#define LV_FONT_MONTSERRAT_18 0
#define LV_FONT_MONTSERRAT_20 0
#define LV_FONT_MONTSERRAT_22 0
#define LV_FONT_MONTSERRAT_24 0
#define LV_FONT_MONTSERRAT_26 0
#define LV_FONT_MONTSERRAT_28 0
#define LV_FONT_MONTSERRAT_30 0
#define LV_FONT_MONTSERRAT_32 0
#define LV_FONT_MONTSERRAT_34 0
#define LV_FONT_MONTSERRAT_36 0
#define LV_FONT_MONTSERRAT_38 0
#define LV_FONT_MONTSERRAT_40 0
#define LV_FONT_MONTSERRAT_42 0
#define LV_FONT_MONTSERRAT_44 0
#define LV_FONT_MONTSERRAT_46 0
#define LV_FONT_MONTSERRAT_48 0
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0
#define LV_FONT_SOURCE_HAN_SANS_SC_14_CJK 0
#define LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 0
#define LV_FONT_UNSCII_8 0
#define LV_FONT_UNSCII_16 0
/** 自定义字体:中文 12px 1bpp */
#define LV_FONT_USE_CUSTOM_INCLUDE 1
#define LV_FONT_CUSTOM_INCLUDE "ui_font_cn_12.h"
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(ui_font_cn_12)
#define LV_FONT_DEFAULT &ui_font_cn_12
#define LV_USE_CUSTOM_FONT_DEFAULT 0
#define LV_FONT_FMT_TXT_LARGE 0
#define LV_USE_FONT_COMPRESSED 0
#define LV_USE_FONT_PLACEHOLDER 1
#define LV_USE_FONT_MANAGER 0
#define LV_USE_IMGFONT 0
#define LV_USE_FREETYPE 0
#define LV_USE_TINY_TTF 0
/*============================================================================
* WIDGETS
*============================================================================*/
#define LV_WIDGETS_HAS_DEFAULT_VALUE 0
#define LV_USE_3DTEXTURE 0
#define LV_USE_ANIMIMG 0
#define LV_USE_ARC 0
#define LV_USE_ARCLABEL 0
#define LV_USE_BAR 0
#define LV_USE_BARCODE 0
#define LV_USE_BUTTON 1
#define LV_USE_BUTTONMATRIX 1
#define LV_USE_CALENDAR 0
#define LV_USE_CANVAS 0
#define LV_USE_CHART 0
#define LV_USE_CHECKBOX 0
#define LV_USE_DROPDOWN 0
#define LV_USE_FFMPEG 0
#define LV_USE_GIF 0
#define LV_USE_GLTF 0
#define LV_USE_GSTREAMER 0
#define LV_USE_IMAGE 1
#define LV_USE_IMAGEBUTTON 0
#define LV_USE_IME_PINYIN 0
#define LV_USE_KEYBOARD 1
#define LV_USE_LABEL 1
#define LV_LABEL_TEXT_SELECTION 0
#define LV_LABEL_LONG_TXT_HINT 0
#define LV_LABEL_WAIT_CHAR_COUNT 0
#define LV_USE_LED 0
#define LV_USE_LINE 1
#define LV_USE_LIST 0
#define LV_USE_LOTTIE 0
#define LV_USE_MENU 0
#define LV_USE_MSGBOX 0
#define LV_USE_QRCODE 0
#define LV_USE_RLOTTIE 0
#define LV_USE_ROLLER 0
#define LV_USE_SCALE 0
#define LV_USE_SLIDER 0
#define LV_USE_SPAN 0
#define LV_USE_SPINBOX 0
#define LV_USE_SPINNER 0
#define LV_USE_SWITCH 0
#define LV_USE_TEXTAREA 1
#define LV_USE_TABLE 0
#define LV_USE_TABVIEW 0
#define LV_USE_TILEVIEW 0
#define LV_USE_WIN 0
/*============================================================================
* DRIVERS — SDL2 (模拟器专用)
*============================================================================*/
#define LV_USE_LINUX_DRM 0
#define LV_USE_LINUX_FBDEV 0
#define LV_USE_FT81X 0
#define LV_USE_LOVYAN_GFX 0
#define LV_USE_GENERIC_MIPI 0
#define LV_USE_EVDEV 0
#define LV_USE_LIBINPUT 0
#define LV_USE_NUTTX 0
#define LV_USE_OPENGLES 0
#define LV_USE_GLFW 0
#define LV_USE_QNX 0
#define LV_USE_UEFI 0
#define LV_USE_WAYLAND 0
/** SDL2 驱动:启用 */
#define LV_USE_SDL 1
#if LV_USE_SDL
#define LV_SDL_INCLUDE_PATH "SDL2/SDL.h"
#define LV_SDL_AUTO_BACKEND 1
#define LV_SDL_BACKEND LV_SDL_BACKEND_SW
/** 1bpp 必须使用 PARTIAL 模式 */
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
#define LV_SDL_BUF_COUNT 1
#define LV_SDL_ACCELERATED 0
#define LV_SDL_FULLSCREEN 0
#define LV_SDL_DIRECT_EXIT 1
#define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER
#endif
#define LV_USE_WINDOWS 0
/*============================================================================
* THEMES (补充)
*============================================================================*/
#define LV_USE_THEME_DEFAULT 0
#define LV_THEME_DEFAULT_DARK 0
#define LV_THEME_DEFAULT_GROW 0
#define LV_THEME_DEFAULT_TRANSITION_TIME 0
#define LV_USE_THEME_SIMPLE 0
/*============================================================================
* EXPORTS
*============================================================================*/
#define LV_USE_DEMO_NONE 1
#define LV_USE_DEMO_WIDGETS 0
#define LV_USE_DEMO_MUSIC 0
#define LV_USE_DEMO_BENCHMARK 0
#define LV_USE_DEMO_STRESS 0
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
#endif /* LV_CONF_H */