ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display)
Einbinden der LVGL Library
Bevor ihr mit diesem Artikel startet, solltet ihr euch zuerst ein wenig einlesen und die Hardware und das Pinout des TouchScreen-ESP32 kennenlernen.
Außerdem solltet ihr euch eine Entwicklungsumgebung mit PlatformIO einrichten, wie in diesem Artikel besprochen. Danach solltet ihr noch den Artikel Programmierung des Displays mit der TFT_eSPI-Library lesen, indem wir etwas auf dem Display ausgeben.
Sowie den Artikel über die Programmierung des Touchscreen Digitizer XPT2046, der im Cheap Yellow Display steckt.
Damit haben wir alles, um Text und Grafiken auf dem Touchscreen-ESP32 darzustellen und auf Tipper auf den Touchscreen zu reagieren.
Wir könnten uns die Mühe machen, kleine Dialogelemente wie zum Beispiel Buttons mit drawRoundRect() aus der TFT_eSPI-Libary auf den Bildschirm zu zeichnen und dann in einer Schleife abzufragen, ob darauf getippt wurde.
Aber wozu das Rad neu erfinden, wenn es schon etwas fertiges gibt, das einen sehr professionellen Eindruck macht? Als wir das CYD das erste mal eingeschaltet haben, sollte uns die LVGL-Demo begrüßt haben, die viele, gut aussehende Dialogelemente zeigte.
Die LVGL Library
Für die Dialogelemente in dieser Demo ist die LVGL-Library zuständig. LVGL steht für "Light and Versatile Graphics Library". Das ist ein großes Projekt mit einer guten Dokumentation, dass für viele Mikrocontroller-Platformen und Displaytypen geeignet ist, unter anderem auch für unser Cheap Yellow Display mit ILI9341 bzw. ST7789 Bildschirm. LVGL ist auch unter github.com/lvgl/lvgl zu finden.Library lvgl by LVGLEinen ersten Einblick in das, was LVGL kann, findet man auf deren Seite mit interaktiven Demos im Browserfenster.
Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.
Nochmals ein Wort zum Versionsdilemma
Die Installation der Library ist allerdings ein wenig haarig und hakelig auf dem CYD. Und wir werden wieder auf das Versions-Dilemma treffen, dass ich schon im letzten Artikel angesprochen hatte. Das besteht darin, dass jeder natürlich seine eigene Library weiterentwickelt. Aber auf die Entwickler, die abhängige Libraries inkludieren, keine Rücksicht nehmen kann. Man kann ja auch schlecht jedem Bescheid sagen: "Hey, du benutzt doch meine Library, wie soll ich die weiter entwickeln, damit die mit deinem Programm kompatibel bleibt?".Anders herum wird ein Schuh draus. Der Entwickler, der eine Library benutzt, muss sein Programm immer für eine bestimmte Library-Version entwickeln. Und wenn es eine neue Library-Version gibt, sein Programm daran anpassen.
Gängige Praxis scheint aber zu sein, dass man einfach die neueste Version, das ist die ohne explizite Angabe der Version, benutzt. Wenn ich jetzt drei Libraries in der neuesten Version benutze, dann wird das wahrscheinlich gut gehen, wenn alle drei Libraries zeitnah entwickelt wurden, und jede die jeweils neueste Version benutzt hat.
Aber nach ein paar Monaten, spätestens Jahren passen die jeweils neuesten Versionen nicht mehr zusammen und man bekommt das Projekt nicht mehr kompiliert. Wenn man dann als Entwickler noch nicht mal dokumentiert hat, welche Versionen man benutzt hat, dann wird es echt schwierig, die richtige Kombination von Versionen wiederherzustellen, damit das Programm kompiliert werden kann.
Darum ist es nötig beim Schreiben eines Programmes mit Abhängigkeiten die Libraries zu notieren und am besten auch gleich in die platformio.ini zu schreiben, damit nicht automatisch beim nächsten Kompilieren (bei einem anderen) die neuesten Versionen bezogen werden.
Beim Kompilieren eines Projektes unter Platform IO wird am Anfang immer eine Tabelle der Pakete und Abhängigkeiten ausgegeben:
PACKAGES:
- framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 46 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TFT_eSPI @ 2.5.43
|-- TJpg_Decoder @ 1.1.0+sha.71bfc26
|-- XPT2046_Touchscreen @ 0.0.0+sha.5d5120e
|-- lvgl @ 9.1.0
|-- SPI @ 2.0.0
|-- SPIFFS @ 2.0.0
|-- FS @ 2.0.0
|-- LittleFS @ 2.0.0
|-- SD @ 2.0.0
Das die XPT2046_Touchscreen-Library so eine komische Versionsnummer hat, liegt wahrscheinlich daran, dass der Entwickler nicht 100%ig korrekt versioniert hat. Dann greift PlatformIO zu einem SHA-Hash, um die Version zu identifizieren.
Und am Besten trägt man die Versionsnummer auch gleich in die platformio.ini unter lib_deps ein:
lib_deps =
bodmer/TFT_eSPI@2.5.43
https://github.com/PaulStoffregen/XPT2046_Touchscreen
lvgl/lvgl@9.1.0
Selbst die Version des espressif32-Frameworks ist wichtig. Ich musste hier eine Nummer zurückgehen, damit es kompatibel bleibt:
platform = espressif32@6.5.0
Die LVGL Library dem Projekt hinzufügen
In der platformio.ini
Mit dem lib_deps = ... lvgl/lvgl@9.1.0 - Eintrag haben wir dann auch schon die LVGL eingebunden, naja, das heißt rudimentär, denn die eigentlich Arbeit liegt in der Konfiguration, und die geschieht über die lv_conf.hAber zuerst hier nocheinmal die vollständige platformio.ini:
platformio.ini (klicken, um diesen Abschnitt auf- und zuzuklappen)
[platformio]
src_dir = .
default_envs = cyd_v3
[env]
platform = espressif32@6.5.0
board = esp32dev
framework = arduino
upload_speed = 460800
upload_port = COM17
monitor_speed = 115200
monitor_port = COM17
lib_deps =
bodmer/TFT_eSPI@2.5.43
https://github.com/Bodmer/TJpg_Decoder
https://github.com/PaulStoffregen/XPT2046_Touchscreen
lvgl/lvgl@9.1.0
build_flags =
;-D LV_CONF_PATH="${PROJECT_SRC_DIR}/lv_config.h"
;-D LV_CONF_PATH="D:/Users/admin/Documents/PlatformIO/Projects/ESP32-CYD-LVGL/src/lv_conf.h"
;-D LV_CONF_PATH="${PROJECT_INCLUDE_DIR}/lv_conf.h"
; anstatt User_Setup.h für TFT_eSPI Library
-D USER_SETUP_LOADED
-D ILI9341_2_DRIVER
-D TFT_WIDTH=240
-D TFT_HEIGHT=320
-D USE_HSPI_PORT
-D TFT_MISO=12
-D TFT_MOSI=13
-D TFT_SCLK=14
-D TFT_CS=15
-D TFT_DC=2
-D TFT_RST=-1
-D TFT_BL=21
-D TFT_BACKLIGHT_ON=HIGH
-D TFT_BACKLIGHT_OFF=LOW
-D LOAD_GLCD
-D LOAD_FONT2
-D LOAD_FONT4
-D LOAD_FONT6
-D LOAD_FONT7
-D LOAD_FONT8
-D LOAD_GFXFF
-D SMOOTH_FONT
;-D SPI_FREQUENCY=27000000
-D SPI_FREQUENCY=55000000
-D SPI_READ_FREQUENCY=20000000
-D SPI_TOUCH_FREQUENCY=2500000
; für XPT2046_Touchscreen Library
-D XPT2046_IRQ=36
-D XPT2046_MOSI=32
-D XPT2046_MISO=39
-D XPT2046_CLK=25
-D XPT2046_CS=33
; XPT2046 Digitizer X/Y min und max
-D XPT2046_XMIN=290
-D XPT2046_XMAX=3670
-D XPT2046_YMIN=230
-D XPT2046_YMAX=3860
; Lichtsensor-Pin
-D LDR_PIN=34
; LVGL
-D LV_HOR_RES=320
-D LV_VER_RES=240
-D TFT_HOR_RES=320
-D TFT_VER_RES=240
[env:cyd_v1]
build_flags =
${env.build_flags}
-D CYD_VARIANT=v1
-D TFT_INVERSION_OFF
[env:cyd_v3]
build_flags =
${env.build_flags}
-D CYD_VARIANT=v3
-D TFT_INVERSION_ON
Die Zeile lib_deps = ... https://github.com/Bodmer/TJpg_Decoder brauche ich nur zur Anzeige eines Logos vor der eigentlichen LVGL-Demo; sie ist nicht unbedingt nötig, wenn man den Code für das Logo weglässt.
Die Zeile build_flags = ... -D LV_CONF_PATH="${PROJECT_INCLUDE_DIR}/lv_conf.h" funktioniert leider nicht und ist auskommentiert. Normalerweise sollte so die LVGL-Konfigurationsdatei lv_conf.h unter meinem include-Verzeichnis eingebunden werden, was aber aus irgendeinem Grund ignoriert wird. Dazu gleich mehr.
Die Zeilen
-D LV_HOR_RES=320
-D LV_VER_RES=240
-D TFT_HOR_RES=320
-D TFT_VER_RES=240
Die lv_conf.h
Laut Anleitung uf der LVGL-Seite soll man nun die Datei lvgl/lv_conf_template.h als lv_conf.h in sein include-Verzeichnis kopieren und LV_CONF_PATH per Define definieren, was ich mit obiger Zeile eigentlich getan haben sollte. Nur leider findet LVGL bei mir die lv_conf.h dann trotzdem nicht.Es kommt immer zur Fehlermeldung
.pio/libdeps/cyd_v1/lvgl/src/core/../lv_conf_internal.h:59:18: fatal error: ../../lv_conf.h: No such file or directory
/*If "lv_conf.h" is available from here try to use it later.*/
#ifdef __has_include
#if __has_include("lv_conf.h")
#ifndef LV_CONF_INCLUDE_SIMPLE
#define LV_CONF_INCLUDE_SIMPLE
#endif
#endif
#endif
/*If lv_conf.h is not skipped include it*/
#ifndef LV_CONF_SKIP
#ifdef LV_CONF_PATH /*If there is a path defined for lv_conf.h use it*/
#define __LV_TO_STR_AUX(x) #x
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
#include __LV_TO_STR(LV_CONF_PATH)
#undef __LV_TO_STR_AUX
#undef __LV_TO_STR
#elif defined(LV_CONF_INCLUDE_SIMPLE) /*Or simply include lv_conf.h is enabled*/
#include "lv_conf.h"
#else
#include "../../../../../include/lv_conf.h" /*Else assume lv_conf.h is next to the lvgl folder*/
#endif
#if !defined(LV_CONF_H) && !defined(LV_CONF_SUPPRESS_DEFINE_CHECK)
/* #include will sometimes silently fail when __has_include is used */
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753 */
#pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
#endif
#endif
In der lv_conf.h müssen wir nicht viel ändern. Zuallerst müssen wir die Zeile 15 auf #if 1 /*Set it to "1" to enable content*/ ändern, damit die Konfigurationsdatei überhaupt wirksam wird. Dann ist es wichtig, mit #define LV_COLOR_DEPTH 16 (Zeile 30) anzugegeben, dass wir ein 16-Bit-Farbsystem benutzen. Genaugenommen ist das eine RGB565-Farbkodierung, welche 65'536 Farben darstellen kann.
Möchten wir die bekannte LVGL-Dialog-Demo anzeigen lassen, um zu testen, ob alles funktioniert - und das wollen wir - dann müssen wir noch die Zeile 947 entsprechend anpassen:
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 1
lv_conf.h (klicken, um diesen Abschnitt auf- und zuzuklappen)
/**
* @file lv_conf.h
* Configuration file for v9.1.0
*/
/*
* Copy this file as `lv_conf.h`
* 1. simply next to the `lvgl` folder
* 2. or any other places and
* - define `LV_CONF_INCLUDE_SIMPLE`
* - add the path as include path
*/
/* clang-format off */
#if 1 /*Set it to "1" to 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
*====================*/
/*Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/
#define LV_COLOR_DEPTH 16
/*=========================
STDLIB WRAPPER SETTINGS
*=========================*/
/* Possible values
* - LV_STDLIB_BUILTIN: LVGL's built in implementation
* - LV_STDLIB_CLIB: Standard C functions, like malloc, strlen, etc
* - LV_STDLIB_MICROPYTHON: MicroPython implementation
* - LV_STDLIB_RTTHREAD: RT-Thread implementation
* - LV_STDLIB_CUSTOM: Implement the functions externally
*/
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
/*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/
#define LV_MEM_SIZE (64 * 1024U) /*[bytes]*/
/*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*/
/*====================
HAL SETTINGS
*====================*/
/*Default display refresh, input device read and animation step period.*/
#define LV_DEF_REFR_PERIOD 33 /*[ms]*/
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
*(Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI_DEF 130 /*[px/inch]*/
/*=================
* OPERATING SYSTEM
*=================*/
/*Select an operating system to use. Possible options:
* - LV_OS_NONE
* - LV_OS_PTHREAD
* - LV_OS_FREERTOS
* - LV_OS_CMSIS_RTOS2
* - LV_OS_RTTHREAD
* - LV_OS_WINDOWS
* - LV_OS_CUSTOM */
#define LV_USE_OS LV_OS_NONE
#if LV_USE_OS == LV_OS_CUSTOM
#define LV_OS_CUSTOM_INCLUDE
#endif
/*========================
* RENDERING CONFIGURATION
*========================*/
/*Align the stride of all layers and images to this bytes*/
#define LV_DRAW_BUF_STRIDE_ALIGN 1
/*Align the start address of draw_buf addresses to this bytes*/
#define LV_DRAW_BUF_ALIGN 4
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
* > 1 requires an operating system enabled in `LV_USE_OS`
* > 1 means multiply threads will render the screen in parallel */
#define LV_DRAW_SW_DRAW_UNIT_CNT 1
/* Use Arm-2D to accelerate the sw render */
#define LV_USE_DRAW_ARM2D_SYNC 0
/* Enable native helium assembly to be compiled */
#define LV_USE_NATIVE_HELIUM_ASM 0
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#define LV_DRAW_SW_COMPLEX 1
#if LV_DRAW_SW_COMPLEX == 1
/*Allow buffering some shadow calculation.
*LV_DRAW_SW_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
*Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost*/
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
/* Set number of maximally cached circle data.
* The circumference of 1/4 circle are saved for anti-aliasing
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
* 0: to disable caching */
#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
#endif
/* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */
#define LV_USE_DRAW_VGLITE 0
#if LV_USE_DRAW_VGLITE
/* Enable blit quality degradation workaround recommended for screen's dimension > 352 pixels. */
#define LV_USE_VGLITE_BLIT_SPLIT 0
#if LV_USE_OS
/* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */
#define LV_USE_VGLITE_DRAW_ASYNC 1
#endif
/* Enable VGLite asserts. */
#define LV_USE_VGLITE_ASSERT 0
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
#define LV_USE_DRAW_PXP 0
#if LV_USE_DRAW_PXP
/* Enable PXP asserts. */
#define LV_USE_PXP_ASSERT 0
#endif
/* 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
#if LV_USE_DRAW_VG_LITE
/* Enable VG-Lite custom external 'gpu_init()' function */
#define LV_VG_LITE_USE_GPU_INIT 0
/* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0
/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
#define LV_VG_LITE_FLUSH_MAX_COUNT 8
/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#define LV_VG_LITE_USE_BOX_SHADOW 0
/* VG-Lite gradient image maximum cache number.
* NOTE: The memory usage of a single gradient image is 4K bytes.
*/
#define LV_VG_LITE_GRAD_CACHE_SIZE 32
#endif
/*=======================
* FEATURE CONFIGURATION
*=======================*/
/*-------------
* Logging
*-----------*/
/*Enable the log module*/
//+++
#define LV_USE_LOG 1
#if LV_USE_LOG
/*How important log should be added:
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
*LV_LOG_LEVEL_INFO Log important events
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*LV_LOG_LEVEL_USER Only logs added by the user
*LV_LOG_LEVEL_NONE Do not log anything*/
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/*1: Print the log with 'printf';
*0: User need to register a callback with `lv_log_register_print_cb()`*/
#define LV_LOG_PRINTF 0
/*1: Enable print timestamp;
*0: Disable print timestamp*/
#define LV_LOG_USE_TIMESTAMP 1
/*1: Print file and line number of the log;
*0: Do not print file and line number of the log*/
#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
#define LV_LOG_TRACE_TIMER 1
#define LV_LOG_TRACE_INDEV 1
#define LV_LOG_TRACE_DISP_REFR 1
#define LV_LOG_TRACE_EVENT 1
#define LV_LOG_TRACE_OBJ_CREATE 1
#define LV_LOG_TRACE_LAYOUT 1
#define LV_LOG_TRACE_ANIM 1
#define LV_LOG_TRACE_CACHE 1
#endif /*LV_USE_LOG*/
/*-------------
* Asserts
*-----------*/
/*Enable asserts if an operation is failed or an invalid data is found.
*If LV_USE_LOG is enabled an error message will be printed on failure*/
#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 /*Check if the styles are properly initialized. (Very fast, recommended)*/
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
/*Add a custom handler when assert happens e.g. to restart the MCU*/
#define LV_ASSERT_HANDLER_INCLUDE
#define LV_ASSERT_HANDLER while(1); /*Halt by default*/
/*-------------
* Debug
*-----------*/
/*1: Draw random colored rectangles over the redrawn areas*/
#define LV_USE_REFR_DEBUG 0
/*1: Draw a red overlay for ARGB layers and a green overlay for RGB layers*/
#define LV_USE_LAYER_DEBUG 0
/*1: Draw overlays with different colors for each draw_unit's tasks.
*Also add the index number of the draw unit on white background.
*For layers add the index number of the draw unit on black background.*/
#define LV_USE_PARALLEL_DRAW_DEBUG 0
/*-------------
* Others
*-----------*/
#define LV_ENABLE_GLOBAL_CUSTOM 0
#if LV_ENABLE_GLOBAL_CUSTOM
/*Header to include for the custom 'lv_global' function"*/
#define LV_GLOBAL_CUSTOM_INCLUDE
#endif
/*Default cache size in bytes.
*Used by image decoders such as `lv_lodepng` to keep the decoded image in the memory.
*If size is not set to 0, the decoder will fail to decode when the cache is full.
*If size is 0, the cache function is not enabled and the decoded mem will be released immediately after use.*/
#define LV_CACHE_DEF_SIZE 0
/*Default number of image header cache entries. The cache is used to store the headers of images
*The main logic is like `LV_CACHE_DEF_SIZE` but for image headers.*/
#define LV_IMAGE_HEADER_CACHE_DEF_CNT 0
/*Number of stops allowed per gradient. Increase this to allow more stops.
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
#define LV_GRADIENT_MAX_STOPS 2
/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
* 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
#define LV_COLOR_MIX_ROUND_OFS 0
/* Add 2 x 32 bit variables to each lv_obj_t to speed up getting style properties */
#define LV_OBJ_STYLE_CACHE 0
/* Add `id` field to `lv_obj_t` */
#define LV_USE_OBJ_ID 0
/* Use lvgl builtin method for obj ID */
#define LV_USE_OBJ_ID_BUILTIN 0
/*Use obj property set/get API*/
#define LV_USE_OBJ_PROPERTY 0
/* VG-Lite Simulator */
/*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
#define LV_USE_VG_LITE_THORVG 0
#if LV_USE_VG_LITE_THORVG
/*Enable LVGL's blend mode support*/
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0
/*Enable YUV color format support*/
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
/*Enable 16 pixels alignment*/
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
/*Buffer address alignment*/
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
/*Enable multi-thread render*/
#define LV_VG_LITE_THORVG_THREAD_RENDER 0
#endif
/*=====================
* COMPILER SETTINGS
*====================*/
/*For big endian systems set to 1*/
#define LV_BIG_ENDIAN_SYSTEM 0
/*Define a custom attribute to `lv_tick_inc` function*/
#define LV_ATTRIBUTE_TICK_INC
/*Define a custom attribute to `lv_timer_handler` function*/
#define LV_ATTRIBUTE_TIMER_HANDLER
/*Define a custom attribute to `lv_display_flush_ready` function*/
#define LV_ATTRIBUTE_FLUSH_READY
/*Required alignment size for buffers*/
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
/*Will be added where memories 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 font's bitmaps*/
#define LV_ATTRIBUTE_LARGE_CONST
/*Compiler prefix for a big 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_ 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 0
/*==================
* FONT USAGE
*===================*/
/*Montserrat fonts with ASCII range and some symbols using bpp = 4
*https://fonts.google.com/specimen/Montserrat*/
#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
/*Demonstrate special features*/
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
/*Pixel perfect monospace fonts*/
#define LV_FONT_UNSCII_8 0
#define LV_FONT_UNSCII_16 0
/*Optionally declare custom fonts here.
*You can use these fonts as default font too and they will be available globally.
*E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
#define LV_FONT_CUSTOM_DECLARE
/*Always set a default font*/
#define LV_FONT_DEFAULT &lv_font_montserrat_14
/*Enable handling large font and/or fonts with a lot of characters.
*The limit depends on the font size, font face and bpp.
*Compiler error will be triggered if a font needs it.*/
#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
/*=================
* TEXT SETTINGS
*=================*/
/**
* Select a character encoding for strings.
* Your IDE or editor should have the same character encoding
* - LV_TXT_ENC_UTF8
* - LV_TXT_ENC_ASCII
*/
#define LV_TXT_ENC LV_TXT_ENC_UTF8
/*Can break (wrap) texts on these chars*/
#define LV_TXT_BREAK_CHARS " ,.;:-_)]}"
/*If a word is at least this long, will break wherever "prettiest"
*To disable, set to a value <= 0*/
#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
/*Minimum number of characters in a long word to put on a line after a break.
*Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
*The direction will be processed according to the Unicode Bidirectional Algorithm:
*https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
#define LV_USE_BIDI 0
#if LV_USE_BIDI
/*Set the default direction. Supported values:
*`LV_BASE_DIR_LTR` Left-to-Right
*`LV_BASE_DIR_RTL` Right-to-Left
*`LV_BASE_DIR_AUTO` detect texts base direction*/
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
#endif
/*Enable Arabic/Persian processing
*In these languages characters should be replaced with an other form based on their position in the text*/
#define LV_USE_ARABIC_PERSIAN_CHARS 0
/*==================
* WIDGETS
*================*/
/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
#define LV_WIDGETS_HAS_DEFAULT_VALUE 1
#define LV_USE_ANIMIMG 1
#define LV_USE_ARC 1
#define LV_USE_BAR 1
#define LV_USE_BUTTON 1
#define LV_USE_BUTTONMATRIX 1
#define LV_USE_CALENDAR 1
#if LV_USE_CALENDAR
#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
#if LV_CALENDAR_WEEK_STARTS_MONDAY
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
#else
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
#endif
#define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
#define LV_USE_CALENDAR_HEADER_ARROW 1
#define LV_USE_CALENDAR_HEADER_DROPDOWN 1
#endif /*LV_USE_CALENDAR*/
#define LV_USE_CANVAS 1
#define LV_USE_CHART 1
#define LV_USE_CHECKBOX 1
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
#define LV_USE_IMAGE 1 /*Requires: lv_label*/
#define LV_USE_IMAGEBUTTON 1
#define LV_USE_KEYBOARD 1
#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 texts*/
#define LV_LABEL_WAIT_CHAR_COUNT 3 /*The count of wait chart*/
#endif
#define LV_USE_LED 1
#define LV_USE_LINE 1
#define LV_USE_LIST 1
#define LV_USE_MENU 1
#define LV_USE_MSGBOX 1
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
#define LV_USE_SCALE 1
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
#define LV_USE_SPAN 1
#if LV_USE_SPAN
/*A line text can contain maximum num of span descriptor */
#define LV_SPAN_SNIPPET_STACK_SIZE 64
#endif
#define LV_USE_SPINBOX 1
#define LV_USE_SPINNER 1
#define LV_USE_SWITCH 1
#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
#if LV_USE_TEXTAREA != 0
#define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
#endif
#define LV_USE_TABLE 1
#define LV_USE_TABVIEW 1
#define LV_USE_TILEVIEW 1
#define LV_USE_WIN 1
/*==================
* THEMES
*==================*/
/*A simple, impressive and very complete theme*/
#define LV_USE_THEME_DEFAULT 1
#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 1
/*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 1
/*A theme designed for monochrome displays*/
#define LV_USE_THEME_MONO 1
/*==================
* LAYOUTS
*==================*/
/*A layout similar to Flexbox in CSS.*/
#define LV_USE_FLEX 1
/*A layout similar to Grid in CSS.*/
#define LV_USE_GRID 1
/*====================
* 3RD PARTS LIBRARIES
*====================*/
/*File system interfaces for common APIs */
/*API for fopen, fread, etc*/
#define LV_USE_FS_STDIO 0
#if LV_USE_FS_STDIO
#define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
#define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#endif
/*API for open, read, etc*/
#define LV_USE_FS_POSIX 0
#if LV_USE_FS_POSIX
#define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (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 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#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 cased letter on which the drive will accessible (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 '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#define LV_FS_FATFS_CACHE_SIZE 0 /*>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 cased letter on which the drive will accessible (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 cased letter on which the drive will accessible (e.g. 'A')*/
#endif
/*LODEPNG decoder library*/
#define LV_USE_LODEPNG 0
/*PNG decoder(libpng) library*/
#define LV_USE_LIBPNG 0
/*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. */
#define LV_USE_LIBJPEG_TURBO 0
/*GIF decoder library*/
#define LV_USE_GIF 0
#if LV_USE_GIF
/*GIF decoder accelerate*/
#define LV_GIF_CACHE_DECODE_DATA 0
#endif
/*Decode bin images to RAM*/
#define LV_BIN_DECODER_RAM_LOAD 0
/*RLE decompress library*/
#define LV_USE_RLE 0
/*QR code library*/
#define LV_USE_QRCODE 0
/*Barcode code library*/
#define LV_USE_BARCODE 0
/*FreeType library*/
#define LV_USE_FREETYPE 0
#if LV_USE_FREETYPE
/*Let FreeType to use LVGL memory and file porting*/
#define LV_FREETYPE_USE_LVGL_PORT 0
/*Cache count of the glyphs in FreeType. It means the 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
#endif
/*Rlottie library*/
#define LV_USE_RLOTTIE 0
/*Enable Vector Graphic APIs*/
#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 0
/*Use external LZ4 library*/
#define LV_USE_LZ4_EXTERNAL 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
#endif
/*==================
* OTHERS
*==================*/
/*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_timer_get_idle
/*1: Show CPU usage and FPS count
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_PERF_MONITOR 0
#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 the used memory and the memory fragmentation
* Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN`
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_MEM_MONITOR 0
#if LV_USE_MEM_MONITOR
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
#endif
#endif /*LV_USE_SYSMON*/
/*1: Enable the runtime performance profiler*/
#define LV_USE_PROFILER 0
#if LV_USE_PROFILER
/*1: Enable the built-in profiler*/
#define LV_USE_PROFILER_BUILTIN 1
#if LV_USE_PROFILER_BUILTIN
/*Default profiler trace buffer size*/
#define LV_PROFILER_BUILTIN_BUF_SIZE (16 * 1024) /*[bytes]*/
#endif
/*Header to include for the profiler*/
#define LV_PROFILER_INCLUDE "lvgl/src/misc/lv_profiler_builtin.h"
/*Profiler start point function*/
#define LV_PROFILER_BEGIN LV_PROFILER_BUILTIN_BEGIN
/*Profiler end point function*/
#define LV_PROFILER_END LV_PROFILER_BUILTIN_END
/*Profiler start point function with custom tag*/
#define LV_PROFILER_BEGIN_TAG LV_PROFILER_BUILTIN_BEGIN_TAG
/*Profiler end point function with custom tag*/
#define LV_PROFILER_END_TAG LV_PROFILER_BUILTIN_END_TAG
#endif
/*1: Enable Monkey test*/
#define LV_USE_MONKEY 0
/*1: Enable grid navigation*/
#define LV_USE_GRIDNAV 0
/*1: Enable lv_obj fragment*/
#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
#if LV_USE_IME_PINYIN
/*1: Use default thesaurus*/
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
#define LV_IME_PINYIN_USE_DEFAULT_DICT 1
/*Set the maximum number of candidate panels that can be displayed*/
/*This needs to be adjusted according to the size of the screen*/
#define LV_IME_PINYIN_CAND_TEXT_NUM 6
/*Use 9 key input(k9)*/
#define LV_IME_PINYIN_USE_K9_MODE 1
#if LV_IME_PINYIN_USE_K9_MODE == 1
#define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
#endif /*LV_IME_PINYIN_USE_K9_MODE*/
#endif
/*1: Enable file explorer*/
/*Requires: lv_table*/
#define LV_USE_FILE_EXPLORER 0
#if LV_USE_FILE_EXPLORER
/*Maximum length of path*/
#define LV_FILE_EXPLORER_PATH_MAX_LEN (128)
/*Quick access bar, 1:use, 0:not use*/
/*Requires: lv_list*/
#define LV_FILE_EXPLORER_QUICK_ACCESS 1
#endif
/*==================
* DEVICES
*==================*/
/*Use SDL to open window on PC and handle mouse and keyboard*/
#define LV_USE_SDL 0
#if LV_USE_SDL
#define LV_SDL_INCLUDE_PATH
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
#define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/
#endif
/*Use X11 to open window on Linux desktop and handle mouse and keyboard*/
#define LV_USE_X11 0
#if LV_USE_X11
#define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/
/*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/
#define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/
#define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/
#define LV_X11_RENDER_MODE_FULL 0 /*Full render mode*/
#endif
/*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
#endif
/*Use Nuttx to open window and handle touchscreen*/
#define LV_USE_NUTTX 0
#if LV_USE_NUTTX
#define LV_USE_NUTTX_LIBUV 0
/*Use Nuttx custom init API to open window and handle touchscreen*/
#define LV_USE_NUTTX_CUSTOM_INIT 0
/*Driver for /dev/lcd*/
#define LV_USE_NUTTX_LCD 0
#if LV_USE_NUTTX_LCD
#define LV_NUTTX_LCD_BUFFER_COUNT 0
#define LV_NUTTX_LCD_BUFFER_SIZE 60
#endif
/*Driver for /dev/input*/
#define LV_USE_NUTTX_TOUCHSCREEN 0
#endif
/*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
#if LV_USE_LIBINPUT
#define LV_LIBINPUT_BSD 0
/*Full keyboard support*/
#define LV_LIBINPUT_XKB 0
#if LV_LIBINPUT_XKB
/*"setxkbmap -query" can help find the right values for your keyboard*/
#define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
#endif
#endif
/*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_GENERIC_MIPI (LV_USE_ST7735 | LV_USE_ST7789 | LV_USE_ST7796 | LV_USE_ILI9341)
/* LVGL Windows backend */
#define LV_USE_WINDOWS 0
/*==================
* EXAMPLES
*==================*/
/*Enable the examples to be built with the library*/
#define LV_BUILD_EXAMPLES 1
/*===================
* DEMO USAGE
====================*/
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 1
//+++
/*Demonstrate the usage of encoder and keyboard*/
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
/*Benchmark your system*/
#define LV_USE_DEMO_BENCHMARK 0
/*Render test for each primitives. 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
#if LV_USE_DEMO_MUSIC
#define LV_DEMO_MUSIC_SQUARE 0
#define LV_DEMO_MUSIC_LANDSCAPE 0
#define LV_DEMO_MUSIC_ROUND 0
#define LV_DEMO_MUSIC_LARGE 0
#define LV_DEMO_MUSIC_AUTO_PLAY 0
#endif
/*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
/*Vector graphic demo*/
#define LV_USE_DEMO_VECTOR_GRAPHIC 0
/*--END OF LV_CONF_H--*/
#endif /*LV_CONF_H*/
#endif /*End of "Content enable"*/
Anpassungen am Code
Zu allererst brauchen wir ein #include <lvgl.h> am Anfang unseres Codes in main.cpp, um die Funktionalität der LVGL-Library einzubinden.Ein eventuelles #include <lv_conf.h> sollten wir davor setzen, wenn wir den Pfad wie oben beschrieben nicht anpassen wollen und unsere lv_conf.h in unserem Include-Verzeichnis (neben unserem Src-Verzeichnis) liegen haben. Dann ist allerdings auch ein build_flags = ... -D LV_CONF_SKIP in der platformio.ini nötig. Ein #define LV_CONF_SKIP in main.cpp reicht seltsamerweise nicht.
Wie eingangs erwähnt, benutzen wir die TFT_eSpi-Library für Ausgaben auf das Display und die XPT2046_Touchscreen-Library zur Auswertung der Position, wenn jemand auf den Touchscreen tippt. Wir setzen also direkt auf unserem letzten Projekt auf.
Einmal kurz erläutert, wie sich LVGL in unser Projekt integriert bzw. wie das Zusammenspiel funktioniert:
- Wir müssen zwei Routinen schreiben, die von LVGL aufgerufen werden
- eine Funktion namens my_disp_flush(), an die LVGL eine Grafiken übergibt, damit wir sie auf dem Display zeichnen.
- eine Funktion namens my_touchpad_read(), in der wir die Touchscreen-Position bei Tippern ermitteln und an LVGL weitergeben
- optional können wir noch eine Funktion (lvgl_debug_print()) schreiben, in der LVGL Meldungen ausgibt, wenn das Debugging angeschaltet ist.
- dann müssen wir nur noch in unserem loop() die LVGL-Funktion lv_tick_inc() und lv_timer_handler() aufrufen, damit LVGL sich um alles kümmern kann. Dies sollte so alle 5 Millisekunden geschehen.
Die Funktion my_disp_flush()
Meine Funktion sieht folgendermaßen aus:// user function, that is called from LVGL, by Oliver Kuhlemann, cool-web.de
// Implement and register a function which can copy the rendered image to an area of your display:
void my_disp_flush(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) { // Display flushing
uint32_t w = lv_area_get_width(area);
uint32_t h = lv_area_get_height(area);
tft.startWrite();
tft.setAddrWindow(area->x1, area->y1, w, h); // Set window area to pour pixels into
tft.pushColors( (uint16_t *) px_map, w*h, true); // Push Color Informations into area
tft.endWrite();
lv_disp_flush_ready(disp); // Indicate you are ready with the flushing
}
Die Funktion pushColors() der TFT_eSPI-Library erledigt das schnelle Schreiben des Bildes an die richtige Stelle für uns.
Erste User-Funktion fertig.
Die Funktion my_touchpad_read
// user function, that is called from LVGL, by Oliver Kuhlemann, cool-web.de
// Implement and register a function which can read an input device. E.g. for a touchpad:
void my_touchpad_read(lv_indev_t *indev, lv_indev_data_t *data) { // Read the touchscreen
// Serial.println ("my_touchpad_read");
uint16_t xptX, xptY, tftX, tftY;
uint8_t xptZ;
if (xpt.touched()) {
xptPosition (&xptX, &xptY, &xptZ, &tftX, &tftY);
data->point.x = tftX;
data->point.y = tftY;
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
}
LVGL checkt dann selbst, ob auf ein Dialogelement geklickt wurde und ändert die Oberfläche entsprechend, setzt vielleicht ein Häkchen in eine Checkbox. Das löst dann wiederum ein Ereignis (Event) aus, das wir dann wieder abfangen und drauf reagieren können. Aber dazu mehr im nächsten Artikel.
Die Funktion lvgl_debug_print
Diese Funktion ist denkbar einfach, wird nur erstellt, wenn auch das Debugging eingeschaltet ist und sieht wie folgt aus:#if LV_USE_LOG
// user function, that is called from LVGL
// Serial debugging
void lvgl_debug_print(lv_log_level_t level, const char * buf) {
LV_UNUSED(level);
Serial.printf(buf);
Serial.flush();
}
#endif
weitere Anpassungen am Code
Damit LVGL performant funktioniert braucht es außerdem einen Zeichenbuffer, um Grafiken schneller zu schreiben. Dann muss noch mit lv_init() das LVGL-Modul aktiviert werden. Außerdem muss das Display und das XPT2046-Touch-Device angemeldet werden und die User-Funktionen verknüpft werden.Wie das alles zu bewerkstelligen ist, das schaut ihr am besten im vollständigen Source-Code unten nach.
Nach diesen vielen Vorbereitungen ist das Aufrufen der LVGL-Dialog-Demo mit dem Onlineshop eine Kleinigkeit:
Einfach lv_demo_widgets() in setup() aufrufen und in loop() in Endlosschleife lv_tick_inc() und lv_timer_handler() aufrufen - LVGL kümmert sich um den Rest.
void loop() {
while (1) {
lv_tick_inc(millis() - lv_lastTick); // Update the tick timer. Tick is new for LVGL 9
lv_lastTick = millis();
lv_timer_handler(); // Update the GUI
delay(5);
}
}
Anpassungen für die LVGL-Dialog-Demo
Ein paar Kleinigkeiten sind allerdings doch noch zu tun, damit die Demo läuft.
Zum Einen sind die Verzeichnisse examples und demos in das Src-Verzeichnis zu kopieren, zum anderen die Datei lvgl.h:
- kopieren von d:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\.pio\libdeps\cyd_v3\lvgl\examples\ nach d:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\src\
- kopieren von d:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\.pio\libdeps\cyd_v3\lvgl\demos\ nach d:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\src\
- kopieren D:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\.pio\libdeps\cyd_v3\lvgl\lvgl.h nach d:\Users\admin\Documents\PlatformIO\Projects\ESP32-CYD-LVGL\src\
* cyd_v3 ggf. durch cyd_v1 ersetzen
* ESP32-CYD-LVGL ersetzen durch euer Projektname
Eure Verzeichnisstruktur sollte dann so ungefähr wie rechts aussehen. Die Free_Fonts.h allerdings braucht ihr nicht.
Außerdem müssen noch zwei Includes an den Anfang von main.cpp gestellt werden:
// Includes for demo
#include "examples/lv_examples.h"
#include "demos/lv_demos.h"
Der Source-Code
Kleine Warnung vorweg: Das Kompilieren dauert einige Minuten. Es müssen alle Beispiel-Dialogelemente kompiliert werden und das dauert etwas.Die Dateien platformio.ini und lv_conf.h findet ihr ja bereits schon oben. Fehlt uns als nächstes natürlich die main.cpp. Die wichtigsten Funktionen habe ich ja bereits oben erklärt. Der Rest sollte sich durch die vielen Kommentare im Source-Code selbst erklären. Die Kommentare habe ich diesmal auf englisch verfasst, aber ich schätze, da kommt ihr schon mit klar. Ein paar Kommentare habe ich auch aus den Beispielen übernommen, und da waren die englisch und ich wollte kein Misch-Masch.
Das c-o-o-l Face auf dem Startbildschirm wird im Flash in include/c-o-o-l.h als Bytecode hinterlegt. Von da aus wird es via der TJpg_Decoder-Library dekodiert und mittels schnellem DMA (Direct Memory Access) auf den Bildschirm gebracht. Den Teil könnt ihr natürlich auch auslassen, dann braucht ihr die c-o-o-l.h nicht.
main.cpp (klicken, um diesen Abschnitt auf- und zuzuklappen)
// V1.00, 2024-04-17
// (C) by Oliver Kuhlemann, cool-web.de
// Quelle: https://cool-web.de/esp8266-esp32/
#include <Arduino.h>
#include <SPI.h>
#include <XPT2046_Touchscreen.h>
#include <TFT_eSPI.h>
// #include <lv_conf.h>
#include <lvgl.h>
// Include the JPEG decoder / logo
#define USE_DMA
#include <TJpg_Decoder.h>
#include <c-o-o-l.h> // Image is stored here in an 8-bit array
//+++ Includes for demo
#include "examples/lv_examples.h"
#include "demos/lv_demos.h"
// for XPT2046 Touch ////////////////////////////////
SPIClass xptSPI = SPIClass(VSPI); // SPI-Interface for XPT2046_Touchscreen
XPT2046_Touchscreen xpt(XPT2046_CS, XPT2046_IRQ); // create an XPT object (Digitizer)
// for TFT Display //////////////////////////////////
TFT_eSPI tft = TFT_eSPI(); // create an TFT object (TFT-Display)
#ifdef USE_DMA
uint16_t dmaBuffer1[16*16]; // Toggle buffer for 16*16 MCU block, 512bytes
uint16_t dmaBuffer2[16*16]; // Toggle buffer for 16*16 MCU block, 512bytes
uint16_t* dmaBufferPtr = dmaBuffer1;
bool dmaBufferSel = 0;
#endif
// for LVGL ////////////////////////////////////
// LVGL draw into this buffer, 1/10 screen size usually works well. The size is in bytes
#define DRAW_BUF_SIZE (TFT_HOR_RES * TFT_VER_RES / 10 * (LV_COLOR_DEPTH / 8))
uint32_t draw_buf[DRAW_BUF_SIZE / 4];
lv_indev_t * indev; // Touchscreen input device for LVGL
uint32_t lv_lastTick = 0; //Used to track the tick timer
// This next function will be called during decoding of the jpeg file to render each
// 16x16 or 8x8 image tile (Minimum Coding Unit) to the TFT.
bool tft_output(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t* bitmap)
{
// Stop further decoding as image is running off bottom of screen
if ( y >= tft.height() ) return 0;
// STM32F767 processor takes 43ms just to decode (and not draw) jpeg (-Os compile option)
// Total time to decode and also draw to TFT:
// SPI 54MHz=71ms, with DMA 50ms, 71-43 = 28ms spent drawing, so DMA is complete before next MCU block is ready
// Apparent performance benefit of DMA = 71/50 = 42%, 50 - 43 = 7ms lost elsewhere
// SPI 27MHz=95ms, with DMA 52ms. 95-43 = 52ms spent drawing, so DMA is *just* complete before next MCU block is ready!
// Apparent performance benefit of DMA = 95/52 = 83%, 52 - 43 = 9ms lost elsewhere
#ifdef USE_DMA
// Double buffering is used, the bitmap is copied to the buffer by pushImageDMA() the
// bitmap can then be updated by the jpeg decoder while DMA is in progress
if (dmaBufferSel) dmaBufferPtr = dmaBuffer2;
else dmaBufferPtr = dmaBuffer1;
dmaBufferSel = !dmaBufferSel; // Toggle buffer selection
// pushImageDMA() will clip the image block at screen boundaries before initiating DMA
tft.pushImageDMA(x, y, w, h, bitmap, dmaBufferPtr); // Initiate DMA - blocking only if last DMA is not complete
// The DMA transfer of image block to the TFT is now in progress...
#else
// Non-DMA blocking alternative
tft.pushImage(x, y, w, h, bitmap); // Blocking, so only returns when image block is drawn
#endif
// Return 1 to decode next block.
return 1;
}
void drawLogo(int32_t x, int32_t y) { // The jpeg image can be scaled down by a factor of 1, 2, 4, or 8
TJpgDec.setJpgScale(1);
// The colour byte order can be swapped by the decoder
// using TJpgDec.setSwapBytes(true); or by the TFT_eSPI library:
tft.setSwapBytes(true);
// The decoder must be given the exact name of the rendering function above
TJpgDec.setCallback(tft_output);
uint16_t w = 0, h = 0;
TJpgDec.getJpgSize(&w, &h, logo, sizeof(logo));
Serial.print("JPEG Width = "); Serial.print(w); Serial.print(", height = "); Serial.println(h);
// Must use startWrite first so TFT chip select stays low during DMA and SPI channel settings remain configured
tft.startWrite();
// Draw the image, top left at 0,0 - DMA request is handled in the call-back tft_output() in this sketch
TJpgDec.drawJpg(x, y, logo, sizeof(logo));
// Must use endWrite to release the TFT chip select and release the SPI channel
tft.endWrite();
}
// read position of XPT digitizer and corresponding TFT position
void xptPosition (uint16_t *xptX, uint16_t *xptY, uint8_t *xptZ, uint16_t *tftX, uint16_t *tftY) {
uint16_t x, y; uint8_t z; // XPT
uint16_t tx, ty; // TFT
float xx = (XPT2046_XMAX - XPT2046_XMIN); // width XPT-Points
float yy = (XPT2046_YMAX - XPT2046_YMIN); // height XPT-Points
xpt.readData(&x, &y, &z);
// calc position for TFT display from digitizer position
tx = (x / xx * TFT_HEIGHT) - (XPT2046_XMIN / xx * TFT_HEIGHT); // TFT_HEIGHT=320
ty = (y / yy * TFT_WIDTH) - (XPT2046_YMIN / yy * TFT_WIDTH); // TFT_WIDTH=240
// avoid invalid values
if (tx < 0) tx = 0;
if (ty < 0) ty = 0;
if (tx > TFT_HEIGHT-1) tx = TFT_HEIGHT-1;
if (ty > TFT_WIDTH-1) ty = TFT_WIDTH-1;
*xptX = x;
*xptY = y;
*xptZ = z;
*tftX = tx;
*tftY = ty;
}
// user function, that is called from LVGL
// Implement and register a function which can copy the rendered image to an area of your display:
void my_disp_flush(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) { // Display flushing
uint32_t w = lv_area_get_width(area);
uint32_t h = lv_area_get_height(area);
tft.startWrite();
tft.setAddrWindow(area->x1, area->y1, w, h); // Set window area to pour pixels into
tft.pushColors( (uint16_t *) px_map, w*h, true); // Push Color Informations into area
tft.endWrite();
lv_disp_flush_ready(disp); // Indicate you are ready with the flushing
}
// user function, that is called from LVGL
// Implement and register a function which can read an input device. E.g. for a touchpad:
void my_touchpad_read(lv_indev_t *indev, lv_indev_data_t *data) { // Read the touchscreen
// Serial.println ("my_touchpad_read");
uint16_t xptX, xptY, tftX, tftY;
uint8_t xptZ;
if (xpt.touched()) {
xptPosition (&xptX, &xptY, &xptZ, &tftX, &tftY);
data->point.x = tftX;
data->point.y = tftY;
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
}
#if LV_USE_LOG
// user function, that is called from LVGL
// Serial debugging
void lvgl_debug_print(lv_log_level_t level, const char * buf) {
LV_UNUSED(level);
Serial.printf(buf);
Serial.flush();
}
#endif
void setup() {
Serial.begin(115200);
Serial.println("Program started.");
Serial.print("Using LVGL Version ");
Serial.print(lv_version_major());
Serial.print(".");
Serial.print(lv_version_minor());
Serial.print(".");
Serial.println (lv_version_patch());
// Start the SPI for the touch screen and init the XPT2046 library
xptSPI.begin(XPT2046_CLK, XPT2046_MISO, XPT2046_MOSI, XPT2046_CS);
xpt.begin(xptSPI);
xpt.setRotation(1); // landscape, USB ports right bottom
// Init the eSPI-TFT Library
tft.init();
tft.setRotation(1); // landscape, USB ports right bottom
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.fillScreen(TFT_BLACK); // clear screen
tft.initDMA(); // init DMA for faster drawing in my_disp_flush
// Show Logo
drawLogo(TFT_HOR_RES/2-60, 10);
int y=130; int lh=30; // y-pos 1. line, line-height
tft.drawCentreString("For more information", TFT_HEIGHT/2, y, 4); y+=lh;
tft.drawCentreString("visit cool-web.de", TFT_HEIGHT/2, y, 4); y+=lh;
while (! xpt.touched()) delay (1);
// Init the LVGL Library
Serial.println ("Init LVGL");
lv_init();
lv_display_t * disp;
#if LV_USE_TFT_ESPI
// TFT_eSPI can be enabled lv_conf.h to initialize the display in a simple way
disp = lv_tft_espi_create(TFT_HOR_RES, TFT_VER_RES, draw_buf, sizeof(draw_buf));
lv_display_set_rotation(disp, TFT_ROTATION);
#else
// Else create a display yourself <-- We use our own TFT_eSPI and display routines
disp = lv_display_create(TFT_HOR_RES, TFT_VER_RES);
lv_display_set_flush_cb(disp, my_disp_flush);
lv_display_set_buffers(disp, draw_buf, NULL, sizeof(draw_buf), LV_DISPLAY_RENDER_MODE_PARTIAL);
#endif
// Initialize the XPT2046 input device driver
Serial.println ("Init XPT2046");
indev = lv_indev_create();
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
lv_indev_set_read_cb(indev, my_touchpad_read);
#if LV_USE_LOG != 0
lv_log_register_print_cb(lvgl_debug_print); // register print function for debugging
#endif
// try out a demo. Don't forget to enable the demos in lv_conf.h. E.g. LV_USE_DEMO_WIDGETS
Serial.println ("Execute lv_demo_widgets");
lv_demo_widgets();
}
void loop() {
while (1) {
lv_tick_inc(millis() - lv_lastTick); // Update the tick timer. Tick is new for LVGL 9
lv_lastTick = millis();
lv_timer_handler(); // Update the GUI
delay(5);
}
}
c-o-o-l.h (klicken, um diesen Abschnitt auf- und zuzuklappen)
const uint8_t logo[] PROGMEM = {
0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x48,
0x00, 0x48, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x05, 0x03, 0x04, 0x04, 0x04, 0x03, 0x05,
0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x07, 0x0C, 0x08, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0B,
0x0B, 0x09, 0x0C, 0x11, 0x0F, 0x12, 0x12, 0x11, 0x0F, 0x11, 0x11, 0x13, 0x16, 0x1C, 0x17, 0x13,
0x14, 0x1A, 0x15, 0x11, 0x11, 0x18, 0x21, 0x18, 0x1A, 0x1D, 0x1D, 0x1F, 0x1F, 0x1F, 0x13, 0x17,
0x22, 0x24, 0x22, 0x1E, 0x24, 0x1C, 0x1E, 0x1F, 0x1E, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x05, 0x05,
0x05, 0x07, 0x06, 0x07, 0x0E, 0x08, 0x08, 0x0E, 0x1E, 0x14, 0x11, 0x14, 0x1E, 0x1E, 0x1E, 0x1E,
0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0xFF, 0xC0,
0x00, 0x11, 0x08, 0x00, 0x60, 0x00, 0x78, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11,
0x01, 0xFF, 0xC4, 0x00, 0x1D, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x08, 0x03, 0x05, 0x02, 0x04, 0x09, 0x01,
0xFF, 0xC4, 0x00, 0x45, 0x10, 0x00, 0x01, 0x03, 0x03, 0x02, 0x04, 0x02, 0x06, 0x04, 0x09, 0x0B,
0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x11, 0x00, 0x07, 0x08, 0x12,
0x21, 0x31, 0x41, 0x51, 0x13, 0x14, 0x22, 0x32, 0x61, 0x71, 0x15, 0x23, 0x62, 0x81, 0x16, 0x18,
0x25, 0x42, 0x52, 0x72, 0xA1, 0xB1, 0xD2, 0x09, 0x17, 0x38, 0x54, 0x57, 0x76, 0x82, 0x91, 0x92,
0x95, 0x96, 0x26, 0x33, 0x56, 0xC1, 0xD1, 0xFF, 0xC4, 0x00, 0x14, 0x01, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC4, 0x00,
0x14, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F,
0x00, 0xA6, 0x5A, 0x34, 0x68, 0xD0, 0x1A, 0x34, 0x6B, 0xE8, 0x04, 0x9C, 0x0E, 0xA7, 0x41, 0xDA,
0xA3, 0x22, 0x03, 0xB5, 0x78, 0x6D, 0x55, 0x5F, 0x7A, 0x3D, 0x3D, 0x6F, 0xA1, 0x32, 0x9D, 0x65,
0x1C, 0xEB, 0x6D, 0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 0xFC, 0xF5, 0x99, 0xB7, 0xF8, 0x73,
0xB2, 0xFD, 0xB6, 0x58, 0xB8, 0xF7, 0x2A, 0xA0, 0x8F, 0x77, 0xD3, 0x7E, 0x4D, 0x80, 0x4F, 0x9E,
0x3F, 0xEE, 0x1F, 0x91, 0xC8, 0xD0, 0x2C, 0x2C, 0x6B, 0x2E, 0xE9, 0xBD, 0xEB, 0x09, 0xA4, 0xDA,
0xB4, 0x49, 0x75, 0x49, 0x47, 0x1C, 0xC1, 0x94, 0x7B, 0x2D, 0x8F, 0xD2, 0x5A, 0x8F, 0xB2, 0x81,
0xF1, 0x24, 0x69, 0xC6, 0x97, 0xED, 0x9E, 0x1F, 0x29, 0x53, 0x11, 0x4E, 0xAA, 0xC3, 0xB8, 0xB7,
0x46, 0x64, 0x75, 0x46, 0x2F, 0xC4, 0x57, 0x3C, 0x4A, 0x12, 0x16, 0x30, 0xBE, 0x55, 0xFE, 0x7B,
0xFE, 0x1F, 0x0F, 0x80, 0xF7, 0xA2, 0x37, 0xBE, 0xFB, 0xDE, 0x75, 0xEA, 0x42, 0xAD, 0xEA, 0x22,
0x20, 0x59, 0xF6, 0xE6, 0x0A, 0x45, 0x32, 0x84, 0xC8, 0x8E, 0x85, 0x27, 0xED, 0xAC, 0x7B, 0x4B,
0xCF, 0x8F, 0x50, 0x0F, 0x96, 0x95, 0x5A, 0x0E, 0x4B, 0x52, 0x96, 0xB5, 0x2D, 0x6A, 0x2A, 0x52,
0x8E, 0x49, 0x27, 0x24, 0x9D, 0x1A, 0xE3, 0xA3, 0x41, 0xFF, 0xD9
};
Firmware Download via ESP Web Tools
Du möchtest die Firmware schon einmal ausprobieren, ohne die Entwicklungsumgebung zu installieren oder zu programmieren?
Kein Problem. Schließe einfach dein ESP32 an einen USB-Port deines PC an und klicke auf den deinem Gerät entsprechenden Button:
Demo und Video
Und hier noch ein kleines Video, das das Ganze noch einmal in bewegtem Bild zusammenfasst und den Unterschied zwischen dieser LVGL-Demo und der, womit das CYD derzeit ausgeliefert wird, zeigt:Update / Fehlerkorrektur 2024-04-18
Mir war ein kleiner, dummer Fehler unterlaufen, und zwar hatte ich den IF und ELSE Zweig in der Funktion my_touchpad_read vertauscht bzw. das negierende Ausrufezeichen vor dem xpt.touched() vergessen. Richtig muss der Abschnitt lauten: if (xpt.touched()) {
xptPosition (&xptX, &xptY, &xptZ, &tftX, &tftY);
data->point.x = tftX;
data->point.y = tftY;
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
Die Firmwares habe ich neu kompiliert und nun in der fehlerfreien Version bereitgestellt, die der LVGL-Demo im Auslieferungszustand entspricht und bei der auch das Scrolling etc. funktioniert.
Und ich glaube, ich bin euch noch ein Video der nun richtig funktionierenden Version schuldig:
Fazit und Aussichten
Mit dem heutigen Artikel haben wir gerade mal den obersten Teil der Doku Get Started auf docs.lvgl.io abgearbeitet und sind noch nicht einmal bei "Learn the basics" angekommen.Damit werde ich mich in naher Zukunft beschäftigen und mir anschauen, was für Widgets (Dialogelemente) es im Einzelnen gibt und wie man sie gebraucht. Nachdem ich mich da ein bisschen eingefuchst habe, werde ich versuchen, eine halbwegs brauchbare, eigene Beispielanwendung damit zu programmieren, die ich euch dann natürlich wieder zur Verfügung stelle.
Zum Artikel über den Entwurf und Programmnierugn von Dialogen mit LVGL geht es hier entlang.
Quellen, Literaturverweise und weiterführende Links
(1) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Vorstellung Hardware und Pinout
(2) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Erste Schritte Programmierung der RGB LED
(3) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Programmierung des Displays mit der TFT_eSPI-Library
(4) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Programmierung des Touchscreen Digitizer XPT2046
(5) LVGL-Dokumentation für Version 9.1
(2) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Erste Schritte Programmierung der RGB LED
(3) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Programmierung des Displays mit der TFT_eSPI-Library
(4) ESP32-2432S028 mit 2.8" Touchscreen (Cheap Yellow Display) - Programmierung des Touchscreen Digitizer XPT2046
(5) LVGL-Dokumentation für Version 9.1