mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
LVGL increase image cache when PSRAM is present
This commit is contained in:
parent
8650875ceb
commit
46f89b93b3
@ -259,6 +259,7 @@ typedef void * lv_fs_drv_user_data_t;
|
|||||||
* However the opened images might consume additional RAM.
|
* However the opened images might consume additional RAM.
|
||||||
* Set it to 0 to disable caching */
|
* Set it to 0 to disable caching */
|
||||||
#define LV_IMG_CACHE_DEF_SIZE 1
|
#define LV_IMG_CACHE_DEF_SIZE 1
|
||||||
|
#define LV_IMG_CACHE_DEF_SIZE_PSRAM 20 // special Tasmota setting when PSRAM is used
|
||||||
|
|
||||||
/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
|
/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
|
||||||
typedef void * lv_img_decoder_user_data_t;
|
typedef void * lv_img_decoder_user_data_t;
|
||||||
|
@ -445,6 +445,10 @@ void start_lvgl(const char * uconfig) {
|
|||||||
lv_png_init();
|
lv_png_init();
|
||||||
#endif // USE_LVGL_PNG_DECODER
|
#endif // USE_LVGL_PNG_DECODER
|
||||||
|
|
||||||
|
if (psramFound()) {
|
||||||
|
lv_img_cache_set_size(LV_IMG_CACHE_DEF_SIZE_PSRAM);
|
||||||
|
}
|
||||||
|
|
||||||
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_LVGL "LVGL initialized"));
|
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_LVGL "LVGL initialized"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user