latest lvgl config

This commit is contained in:
2023-08-08 21:38:52 +02:00
parent d521208dfa
commit 3155c83b5a
2 changed files with 32 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
/** /**
* @file lv_conf.h * @file lv_conf.h
* Configuration file for v8.3.4 * Configuration file for v8.3.9
*/ */
/* /*
@@ -78,10 +78,10 @@
*====================*/ *====================*/
/*Default display refresh period. LVG will redraw changed areas with this period time*/ /*Default display refresh period. LVG will redraw changed areas with this period time*/
#define LV_DISP_DEF_REFR_PERIOD 16 /*[ms]*/ #define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
/*Input device read period in milliseconds*/ /*Input device read period in milliseconds*/
#define LV_INDEV_DEF_READ_PERIOD 16 /*[ms]*/ #define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
/*Use a custom tick source that tells the elapsed time in milliseconds. /*Use a custom tick source that tells the elapsed time in milliseconds.
*It removes the need to manually update the tick with `lv_tick_inc()`)*/ *It removes the need to manually update the tick with `lv_tick_inc()`)*/
@@ -89,6 +89,9 @@
#if LV_TICK_CUSTOM #if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
/*If using lvgl as ESP32 component*/
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /*LV_TICK_CUSTOM*/ #endif /*LV_TICK_CUSTOM*/
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings. /*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
@@ -180,10 +183,18 @@
#define LV_USE_GPU_STM32_DMA2D 0 #define LV_USE_GPU_STM32_DMA2D 0
#if LV_USE_GPU_STM32_DMA2D #if LV_USE_GPU_STM32_DMA2D
/*Must be defined to include path of CMSIS header of target processor /*Must be defined to include path of CMSIS header of target processor
e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ e.g. "stm32f7xx.h" or "stm32f4xx.h"*/
#define LV_GPU_DMA2D_CMSIS_INCLUDE #define LV_GPU_DMA2D_CMSIS_INCLUDE
#endif #endif
/*Enable RA6M3 G2D GPU*/
#define LV_USE_GPU_RA6M3_G2D 0
#if LV_USE_GPU_RA6M3_G2D
/*include path of target processor
e.g. "hal_data.h"*/
#define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
#endif
/*Use SWM341's DMA2D GPU*/ /*Use SWM341's DMA2D GPU*/
#define LV_USE_GPU_SWM341_DMA2D 0 #define LV_USE_GPU_SWM341_DMA2D 0
#if LV_USE_GPU_SWM341_DMA2D #if LV_USE_GPU_SWM341_DMA2D
@@ -219,7 +230,7 @@
*-----------*/ *-----------*/
/*Enable the log module*/ /*Enable the log module*/
#define LV_USE_LOG 1 #define LV_USE_LOG 0
#if LV_USE_LOG #if LV_USE_LOG
/*How important log should be added: /*How important log should be added:
@@ -236,14 +247,14 @@
#define LV_LOG_PRINTF 0 #define LV_LOG_PRINTF 0
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
#define LV_LOG_TRACE_MEM 0 #define LV_LOG_TRACE_MEM 1
#define LV_LOG_TRACE_TIMER 0 #define LV_LOG_TRACE_TIMER 1
#define LV_LOG_TRACE_INDEV 0 #define LV_LOG_TRACE_INDEV 1
#define LV_LOG_TRACE_DISP_REFR 0 #define LV_LOG_TRACE_DISP_REFR 1
#define LV_LOG_TRACE_EVENT 0 #define LV_LOG_TRACE_EVENT 1
#define LV_LOG_TRACE_OBJ_CREATE 0 #define LV_LOG_TRACE_OBJ_CREATE 1
#define LV_LOG_TRACE_LAYOUT 0 #define LV_LOG_TRACE_LAYOUT 1
#define LV_LOG_TRACE_ANIM 0 #define LV_LOG_TRACE_ANIM 1
#endif /*LV_USE_LOG*/ #endif /*LV_USE_LOG*/
@@ -255,7 +266,7 @@
*If LV_USE_LOG is enabled an error message will be printed on failure*/ *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_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_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
#define LV_USE_ASSERT_STYLE 1 /*Check if the styles are properly initialized. (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_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)*/ #define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
@@ -268,7 +279,7 @@
*-----------*/ *-----------*/
/*1: Show CPU usage and FPS count*/ /*1: Show CPU usage and FPS count*/
#define LV_USE_PERF_MONITOR 0 #define LV_USE_PERF_MONITOR 1
#if LV_USE_PERF_MONITOR #if LV_USE_PERF_MONITOR
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
#endif #endif

View File

@@ -21,6 +21,8 @@
#include <lvgl.h> #include <lvgl.h>
#include <gfx/lgfx.h> #include <gfx/lgfx.h>
#include "lv_conf.h"
#define LV_BUF_SIZE (SCREEN_WIDTH * SCREEN_HEIGHT) #define LV_BUF_SIZE (SCREEN_WIDTH * SCREEN_HEIGHT)
LGFX tft; LGFX tft;
@@ -56,9 +58,9 @@ void read_cb(lv_indev_drv_t *indev_driver, lv_indev_data_t *data)
bool touched = tft.getTouch(&touchX, &touchY); bool touched = tft.getTouch(&touchX, &touchY);
if (touched) if (touched)
{ {
data->state = LV_INDEV_STATE_PR;
data->point.x = touchX; data->point.x = touchX;
data->point.y = touchY; data->point.y = touchY;
data->state = LV_INDEV_STATE_PR;
} }
else else
{ {
@@ -76,7 +78,9 @@ void lv_begin()
tft.init(); tft.init();
tft.setRotation(1); tft.setRotation(1);
// lv_log_register_print_cb(print_cb); #if LV_USE_LOG
lv_log_register_print_cb(print_cb);
#endif
lv_init(); lv_init();