From efc7cc63d1834736631023aa660c117f6f2e1f59 Mon Sep 17 00:00:00 2001 From: "Nikhil Robinson." <57759123+nikhil-robinson@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:16:57 +0530 Subject: [PATCH] feat(s3_eye): Add option to change LVGL buffer location from MENUCONFIG (BSP-589) (#446) --- bsp/esp32_s3_eye/Kconfig | 6 ++++++ bsp/esp32_s3_eye/esp32_s3_eye.c | 5 +++++ bsp/esp32_s3_eye/idf_component.yml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bsp/esp32_s3_eye/Kconfig b/bsp/esp32_s3_eye/Kconfig index 22097031..1e0be15d 100644 --- a/bsp/esp32_s3_eye/Kconfig +++ b/bsp/esp32_s3_eye/Kconfig @@ -86,6 +86,12 @@ menu "Board Support Package" range 1 500 help Maximum time for task sleep in ms. + + config BSP_DISPLAY_LVGL_BUFFER_IN_PSRAM + bool "Allocate LVGL buffer in PSRAM " + default n + help + LVGL buffer will be allocated in PSRAM instead of internal RAM with DMA. config BSP_DISPLAY_BRIGHTNESS_LEDC_CH int "LEDC channel index" diff --git a/bsp/esp32_s3_eye/esp32_s3_eye.c b/bsp/esp32_s3_eye/esp32_s3_eye.c index a6353767..4c03ab78 100644 --- a/bsp/esp32_s3_eye/esp32_s3_eye.c +++ b/bsp/esp32_s3_eye/esp32_s3_eye.c @@ -357,8 +357,13 @@ lv_display_t *bsp_display_start(void) .buffer_size = BSP_LCD_DRAW_BUFF_SIZE, .double_buffer = BSP_LCD_DRAW_BUFF_DOUBLE, .flags = { +#if (CONFIG_BSP_DISPLAY_LVGL_BUFFER_IN_PSRAM && CONFIG_SPIRAM) + .buff_dma = false, + .buff_spiram = true, +#else .buff_dma = true, .buff_spiram = false, +#endif } }; return bsp_display_start_with_config(&cfg); diff --git a/bsp/esp32_s3_eye/idf_component.yml b/bsp/esp32_s3_eye/idf_component.yml index 82dae467..b0a8ef17 100644 --- a/bsp/esp32_s3_eye/idf_component.yml +++ b/bsp/esp32_s3_eye/idf_component.yml @@ -1,4 +1,4 @@ -version: "4.0.0" +version: "4.0.1" description: Board Support Package (BSP) for ESP32-S3-EYE url: https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_eye