From 98a94557722faf910c5ce70d94f7566301d1c70a Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Wed, 23 Feb 2022 12:31:01 +0100 Subject: [PATCH] LVGL small fix --- .../berry_mapping/src/be_class_wrapper.c | 2 +- lib/libesp32_lvgl/lvgl/README_Tasmota.md | 20 +++++++++++++++++++ lib/libesp32_lvgl/lvgl/src/extra/lv_extra.c | 17 ++++++++-------- 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 lib/libesp32_lvgl/lvgl/README_Tasmota.md diff --git a/lib/libesp32/berry_mapping/src/be_class_wrapper.c b/lib/libesp32/berry_mapping/src/be_class_wrapper.c index 3580d5f8b..f6951a585 100644 --- a/lib/libesp32/berry_mapping/src/be_class_wrapper.c +++ b/lib/libesp32/berry_mapping/src/be_class_wrapper.c @@ -305,7 +305,7 @@ int be_check_arg_type(bvm *vm, int arg_start, int argc, const char * arg_type, i // special case when first parameter is '@', pass pointer to VM if (NULL != arg_type && arg_type[arg_idx] == '@') { arg_idx++; - p[p_idx] = vm; + p[p_idx] = (intptr_t) vm; p_idx++; } diff --git a/lib/libesp32_lvgl/lvgl/README_Tasmota.md b/lib/libesp32_lvgl/lvgl/README_Tasmota.md new file mode 100644 index 000000000..276fe1160 --- /dev/null +++ b/lib/libesp32_lvgl/lvgl/README_Tasmota.md @@ -0,0 +1,20 @@ +# Tasmota patches + +Following patches need to be applied when updating LVGL: + +`src/extra/libs/lv_extra.c` + +Comment the `lv_freetype_init()` portion. The actual initializatio is done in Tasmota code +because parameters depend on Tasmota defines and presence of PSRAM. + +``` C +// TASMOTA Specific, the initialization is done in Tasmota code to adjust with PSRAM +// #if LV_USE_FREETYPE +// /*Init freetype library*/ +// # if LV_FREETYPE_CACHE_SIZE >= 0 +// lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE); +// # else +// lv_freetype_init(0, 0, 0); +// # endif +// #endif +``` diff --git a/lib/libesp32_lvgl/lvgl/src/extra/lv_extra.c b/lib/libesp32_lvgl/lvgl/src/extra/lv_extra.c index 17707a3a7..b6ed79544 100644 --- a/lib/libesp32_lvgl/lvgl/src/extra/lv_extra.c +++ b/lib/libesp32_lvgl/lvgl/src/extra/lv_extra.c @@ -70,14 +70,15 @@ void lv_extra_init(void) lv_bmp_init(); #endif -#if LV_USE_FREETYPE - /*Init freetype library*/ -# if LV_FREETYPE_CACHE_SIZE >= 0 - lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE); -# else - lv_freetype_init(0, 0, 0); -# endif -#endif +// TASMOTA Specific, the initialization is done in Tasmota code to adjust with PSRAM +// #if LV_USE_FREETYPE +// /*Init freetype library*/ +// # if LV_FREETYPE_CACHE_SIZE >= 0 +// lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE); +// # else +// lv_freetype_init(0, 0, 0); +// # endif +// #endif #if LV_USE_FFMPEG lv_ffmpeg_init();