187 lines
4.9 KiB
C
187 lines
4.9 KiB
C
/**
|
|
* LVGL v8.4.0 Configuration for ESP32-S3-LCD-1.3
|
|
* 240x240 Round Display with ST7789VW Controller
|
|
*/
|
|
|
|
#ifndef LV_CONF_H
|
|
#define LV_CONF_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Color settings */
|
|
#define LV_COLOR_DEPTH 16 // RGB565
|
|
#define LV_COLOR_16_SWAP 0 // No byte swap needed
|
|
|
|
/* Memory settings */
|
|
#define LV_MEM_CUSTOM 0 // Use LVGL's built-in memory manager
|
|
/* 128 KB pool in PSRAM (2026-09-27, as on Main CTRL): the old 64 KB pool sat
|
|
* in the scarce internal RAM. Draw buffers stay internal (SPI DMA). */
|
|
#define LV_MEM_SIZE (128 * 1024U)
|
|
#define LV_MEM_ADR 0
|
|
#if LV_MEM_ADR == 0
|
|
#define LV_MEM_POOL_INCLUDE <esp_heap_caps.h>
|
|
#define LV_MEM_POOL_ALLOC(size) heap_caps_malloc((size), MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT)
|
|
#endif
|
|
|
|
/* Display settings */
|
|
#define LV_DPI_DEF 130 // DPI for 1.3" display
|
|
|
|
/* GPU settings */
|
|
#define LV_USE_GPU_STM32_DMA2D 0
|
|
#define LV_USE_GPU_NXP_PXP 0
|
|
#define LV_USE_GPU_NXP_VG_LITE 0
|
|
#define LV_USE_GPU_SDL 0
|
|
|
|
/* Logging */
|
|
#define LV_USE_LOG 0 // off: every log call costs CPU on the render path
|
|
#if LV_USE_LOG
|
|
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
|
#define LV_LOG_PRINTF 1
|
|
#endif
|
|
|
|
/* Performance settings */
|
|
#define LV_USE_PERF_MONITOR 1 // Enable performance monitor (shows FPS, CPU)
|
|
#define LV_USE_MEM_MONITOR 1 // Enable memory monitor (shows memory usage)
|
|
#define LV_USE_REFR_DEBUG 0 // Disable refresh debug overlay
|
|
|
|
/* Font settings - Montserrat 14 only; the screen uses the Ubuntu fonts in src/assets */
|
|
#define LV_FONT_MONTSERRAT_8 0
|
|
#define LV_FONT_MONTSERRAT_10 0
|
|
#define LV_FONT_MONTSERRAT_12 0
|
|
#define LV_FONT_MONTSERRAT_14 1
|
|
#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_DEFAULT &lv_font_montserrat_14
|
|
|
|
/* Widget settings */
|
|
#define LV_USE_ARC 1
|
|
#define LV_USE_BAR 1
|
|
#define LV_USE_BTN 1
|
|
#define LV_USE_BTNMATRIX 1
|
|
#define LV_USE_CANVAS 1
|
|
#define LV_USE_CHECKBOX 1
|
|
#define LV_USE_DROPDOWN 0
|
|
#define LV_USE_IMG 1
|
|
#define LV_USE_LABEL 1
|
|
#define LV_USE_LINE 1
|
|
#define LV_USE_ROLLER 0
|
|
#define LV_USE_SLIDER 0
|
|
#define LV_USE_SWITCH 0
|
|
#define LV_USE_TEXTAREA 0
|
|
#define LV_USE_TABLE 0
|
|
|
|
/* Theme settings */
|
|
#define LV_USE_THEME_DEFAULT 1
|
|
#define LV_THEME_DEFAULT_DARK 1 // Use dark theme
|
|
#define LV_THEME_DEFAULT_GROW 1
|
|
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
|
|
|
/* Extra widgets */
|
|
#define LV_USE_ANIMIMG 0
|
|
#define LV_USE_CALENDAR 0
|
|
#define LV_USE_CHART 0
|
|
#define LV_USE_COLORWHEEL 0
|
|
#define LV_USE_IMGBTN 0
|
|
#define LV_USE_KEYBOARD 0
|
|
#define LV_USE_LED 1
|
|
#define LV_USE_LIST 0
|
|
#define LV_USE_MENU 0
|
|
#define LV_USE_METER 1 // For temperature gauges
|
|
#define LV_USE_MSGBOX 0
|
|
#define LV_USE_SPAN 0
|
|
#define LV_USE_SPINBOX 0
|
|
#define LV_USE_SPINNER 1
|
|
#define LV_USE_TABVIEW 0
|
|
#define LV_USE_TILEVIEW 0
|
|
#define LV_USE_WIN 0
|
|
|
|
/* Animation settings */
|
|
#define LV_USE_ANIMATION 1
|
|
#if LV_USE_ANIMATION
|
|
#define LV_ANIM_DEFAULT_DURATION 200
|
|
#endif
|
|
|
|
/* Drawing settings */
|
|
#define LV_DRAW_COMPLEX 1
|
|
#define LV_SHADOW_CACHE_SIZE 0 // Disable shadow cache to save RAM
|
|
#define LV_CIRCLE_CACHE_SIZE 4 // Enable circle cache for round display
|
|
|
|
/* Text settings */
|
|
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
|
#define LV_USE_BIDI 0
|
|
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
|
|
|
/* Other settings */
|
|
#define LV_USE_SNAPSHOT 0
|
|
#define LV_USE_MONKEY 0
|
|
#define LV_USE_GRIDNAV 0
|
|
#define LV_USE_FRAGMENT 0
|
|
#define LV_USE_MSGBOX 0
|
|
#define LV_USE_IMG_CACHE_DEF_SIZE 0 // Disable image cache
|
|
|
|
/* Tick settings: LVGL reads millis() itself, no lv_tick_inc() bookkeeping */
|
|
#define LV_TICK_CUSTOM 1
|
|
#if LV_TICK_CUSTOM
|
|
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h"
|
|
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())
|
|
#endif
|
|
|
|
/* Assert settings */
|
|
#define LV_USE_ASSERT_NULL 1
|
|
#define LV_USE_ASSERT_MALLOC 1
|
|
#define LV_USE_ASSERT_STYLE 0
|
|
#define LV_USE_ASSERT_MEM_INTEGRITY 0
|
|
#define LV_USE_ASSERT_OBJ 0
|
|
|
|
/* String settings */
|
|
#define LV_SPRINTF_CUSTOM 0
|
|
#define LV_SPRINTF_USE_FLOAT 1
|
|
|
|
/* File system */
|
|
#define LV_USE_FS_STDIO 0
|
|
#define LV_USE_FS_POSIX 0
|
|
#define LV_USE_FS_WIN32 0
|
|
#define LV_USE_FS_FATFS 0
|
|
|
|
/* PNG decoder */
|
|
#define LV_USE_PNG 0
|
|
|
|
/* BMP decoder */
|
|
#define LV_USE_BMP 0
|
|
|
|
/* JPG decoder */
|
|
#define LV_USE_SJPG 0
|
|
|
|
/* GIF decoder */
|
|
#define LV_USE_GIF 0
|
|
|
|
/* QR code */
|
|
#define LV_USE_QRCODE 0
|
|
|
|
/* FreeType library */
|
|
#define LV_USE_FREETYPE 0
|
|
|
|
/* Rlottie library */
|
|
#define LV_USE_RLOTTIE 0
|
|
|
|
/* FFmpeg library */
|
|
#define LV_USE_FFMPEG 0
|
|
|
|
#endif /* LV_CONF_H */
|