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..7365a0565 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..3025d4e63 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,