fix GT911 crash in LVGL firmware (#18633)

* fix GT911 crash

* remove wrong frag when using GT911
This commit is contained in:
Jason2866 2023-05-10 14:02:51 +02:00 committed by GitHub
parent 64e844d387
commit 3c951d7751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -306,7 +306,7 @@
#define SHOW_SPLASH
#define USE_XPT2046
#define USE_FT5206
//#define USE_GT911 // TODO Fix GT911 Touch driver with LVGL HASPMOTA
#define USE_GT911
#define USE_MPU_ACCEL
#define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
#define USE_BM8563

View File

@ -673,7 +673,7 @@ uint32_t ESP_getFreeHeap(void) {
uint32_t ESP_getMaxAllocHeap(void) {
// arduino returns IRAM but we want only DRAM
#ifdef RGB_DISPLAY
#ifdef USE_GT911 // GT911 IRQ crashes with heap_caps_get_largest_free_block
return ESP_getFreeHeap();
#endif
uint32_t free_block_size = heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);

View File

@ -2466,7 +2466,11 @@ void HandleInformation(void)
WSContentSend_P(PSTR("}1" D_PROGRAM_SIZE "}2%d KB"), ESP_getSketchSize() / 1024);
WSContentSend_P(PSTR("}1" D_FREE_PROGRAM_SPACE "}2%d KB"), ESP_getFreeSketchSpace() / 1024);
#ifdef ESP32
#ifdef USE_GT911
WSContentSend_PD(PSTR("}1" D_FREE_MEMORY "}2%1_f KB"), &freemem);
#else
WSContentSend_PD(PSTR("}1" D_FREE_MEMORY "}2%1_f KB (" D_FRAGMENTATION " %d%%)"), &freemem, ESP_getHeapFragmentation());
#endif // USE_GT911
if (UsePSRAM()) {
WSContentSend_P(PSTR("}1" D_PSR_MAX_MEMORY "}2%d KB"), ESP.getPsramSize() / 1024);
WSContentSend_P(PSTR("}1" D_PSR_FREE_MEMORY "}2%d KB"), ESP.getFreePsram() / 1024);