From f60ddffda4873f76340a08d1c712c7809bd47117 Mon Sep 17 00:00:00 2001 From: marcus_xu Date: Wed, 28 Jun 2023 19:55:12 +0800 Subject: [PATCH] framebuffer: BSP_LCD_DRAW_BUF_DOUBLE set bool type --- esp-box-lite/Kconfig | 5 ++--- esp-box-lite/esp-box-lite.c | 6 +++++- esp-box/Kconfig | 5 ++--- esp-box/esp-box.c | 6 +++++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/esp-box-lite/Kconfig b/esp-box-lite/Kconfig index 13a08f735..28457ae6b 100644 --- a/esp-box-lite/Kconfig +++ b/esp-box-lite/Kconfig @@ -69,9 +69,8 @@ menu "Board Support Package" Framebuf is used for lvgl rendering output. config BSP_LCD_DRAW_BUF_DOUBLE - int "LCD framebuf number" - default 0 - range 0 1 + bool "LCD double framebuf" + default n help Whether to enable double framebuf. endmenu diff --git a/esp-box-lite/esp-box-lite.c b/esp-box-lite/esp-box-lite.c index cc9d6981e..70961ad40 100644 --- a/esp-box-lite/esp-box-lite.c +++ b/esp-box-lite/esp-box-lite.c @@ -383,7 +383,11 @@ static lv_disp_t *bsp_display_lcd_init(void) .io_handle = io_handle, .panel_handle = panel_handle, .buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT, - .double_buffer = CONFIG_BSP_LCD_DRAW_BUF_DOUBLE, + #if CONFIG_BSP_LCD_DRAW_BUF_DOUBLE + .double_buffer = 1, + #else + .double_buffer = 0, + #endif .hres = BSP_LCD_H_RES, .vres = BSP_LCD_V_RES, .monochrome = false, diff --git a/esp-box/Kconfig b/esp-box/Kconfig index 016f66a7b..162d1bfde 100644 --- a/esp-box/Kconfig +++ b/esp-box/Kconfig @@ -69,9 +69,8 @@ menu "Board Support Package" Framebuf is used for lvgl rendering output. config BSP_LCD_DRAW_BUF_DOUBLE - int "LCD framebuf number" - default 0 - range 0 1 + bool "LCD double framebuf" + default n help Whether to enable double framebuf. endmenu diff --git a/esp-box/esp-box.c b/esp-box/esp-box.c index e4a249455..5ddedb7dd 100644 --- a/esp-box/esp-box.c +++ b/esp-box/esp-box.c @@ -374,7 +374,11 @@ static lv_disp_t *bsp_display_lcd_init(void) .io_handle = io_handle, .panel_handle = panel_handle, .buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT, - .double_buffer = CONFIG_BSP_LCD_DRAW_BUF_DOUBLE, + #if CONFIG_BSP_LCD_DRAW_BUF_DOUBLE + .double_buffer = 1, + #else + .double_buffer = 0, + #endif .hres = BSP_LCD_H_RES, .vres = BSP_LCD_V_RES, .monochrome = false,