From 29b017b7855b9e0a7e21c249c705ca6a8ffe0dfc Mon Sep 17 00:00:00 2001 From: Chen Jichang Date: Fri, 15 Nov 2024 17:27:32 +0800 Subject: [PATCH] fix(i2c_oled): fix buffer allocation --- examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c b/examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c index 098c62d66c..2a11223047 100644 --- a/examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c +++ b/examples/peripherals/lcd/i2c_oled/main/i2c_oled_example_main.c @@ -192,7 +192,7 @@ void app_main(void) ESP_LOGI(TAG, "Allocate separate LVGL draw buffers"); // LVGL reserves 2 x 4 bytes in the buffer, as these are assumed to be used as a palette. size_t draw_buffer_sz = EXAMPLE_LCD_H_RES * EXAMPLE_LCD_V_RES / 8 + EXAMPLE_LVGL_PALETTE_SIZE; - buf = heap_caps_calloc(1, draw_buffer_sz, MALLOC_CAP_INTERNAL); + buf = heap_caps_calloc(1, draw_buffer_sz, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); assert(buf); // LVGL9 suooprt new monochromatic format.