From 52a1017ce31b4c142e79cd25521beb6d2bea0e8d Mon Sep 17 00:00:00 2001 From: Renee Date: Wed, 23 Mar 2022 13:47:39 -0500 Subject: [PATCH] Increase buffer allocation during flush Resolves https://github.com/lvgl/lvgl_esp32_drivers/issues/116 --- lvgl_tft/ili9488.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_tft/ili9488.c b/lvgl_tft/ili9488.c index feb9fbaf..28d6defa 100644 --- a/lvgl_tft/ili9488.c +++ b/lvgl_tft/ili9488.c @@ -118,7 +118,7 @@ void ili9488_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col lv_color16_t *buffer_16bit = (lv_color16_t *) color_map; uint8_t *mybuf; do { - mybuf = (uint8_t *) heap_caps_malloc(3 * size * sizeof(uint8_t), MALLOC_CAP_DMA); + mybuf = (uint8_t *) heap_caps_malloc(3 * size * sizeof(uint8_t) + 3, MALLOC_CAP_DMA); if (mybuf == NULL) ESP_LOGW(TAG, "Could not allocate enough DMA memory!"); } while (mybuf == NULL);