From 0f09360456592ecf0d0413352dc1ef5d23cd0364 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 6 Jan 2022 10:20:04 +0100 Subject: [PATCH] lvgl: change the prefix of Zephyr-specific LVGL config options We're now using the Kconfig copied from the upstream lvgl repository. It uses the LV_ prefix for all options while we're using LVGL_ for Zephyr-specific ones. Make the latter consistent with upstream but also make sure they're distinct from lvgl's by using LV_Z_ as the prefix. Signed-off-by: Bartosz Golaszewski --- boards/arm/mimxrt1050_evk/Kconfig.defconfig | 12 ++++++------ boards/arm/mimxrt1060_evk/Kconfig.defconfig | 12 ++++++------ boards/arm/mimxrt1064_evk/Kconfig.defconfig | 12 ++++++------ boards/arm/reel_board/Kconfig.defconfig | 6 +++--- .../adafruit_2_8_tft_touch_v2/Kconfig.defconfig | 14 +++++++------- .../Kconfig.defconfig | 14 +++++++------- .../Kconfig.defconfig | 14 +++++++------- boards/shields/ls0xx_generic/Kconfig.defconfig | 9 ++++++--- boards/shields/ssd1306/Kconfig.defconfig | 6 +++--- boards/shields/st7735r/Kconfig.defconfig | 2 +- boards/shields/st7789v_generic/Kconfig.defconfig | 2 +- boards/shields/waveshare_epaper/Kconfig.defconfig | 6 +++--- drivers/kscan/Kconfig.sdl | 2 +- samples/subsys/display/lvgl/prj.conf | 2 +- samples/subsys/display/lvgl/src/main.c | 2 +- tests/lib/gui/lvgl/prj.conf | 4 ++-- tests/lib/gui/lvgl/testcase.yaml | 12 ++++++------ 17 files changed, 67 insertions(+), 64 deletions(-) diff --git a/boards/arm/mimxrt1050_evk/Kconfig.defconfig b/boards/arm/mimxrt1050_evk/Kconfig.defconfig index c4aad4bc3e..a1fe789e50 100644 --- a/boards/arm/mimxrt1050_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1050_evk/Kconfig.defconfig @@ -53,22 +53,22 @@ endif # NETWORKING if LVGL -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "FT5336" -config LVGL_HOR_RES_MAX +config LV_Z_HOR_RES_MAX default 480 -config LVGL_VER_RES_MAX +config LV_Z_VER_RES_MAX default 272 -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 16 -config LVGL_DPI +config LV_Z_DPI default 128 choice LV_COLOR_DEPTH_BITS diff --git a/boards/arm/mimxrt1060_evk/Kconfig.defconfig b/boards/arm/mimxrt1060_evk/Kconfig.defconfig index 60bc1fa752..ceb444e730 100644 --- a/boards/arm/mimxrt1060_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1060_evk/Kconfig.defconfig @@ -53,22 +53,22 @@ endif # NETWORKING if LVGL -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "FT5336" -config LVGL_HOR_RES_MAX +config LV_Z_HOR_RES_MAX default 480 -config LVGL_VER_RES_MAX +config LV_Z_VER_RES_MAX default 272 -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 16 -config LVGL_DPI +config LV_Z_DPI default 128 choice LV_COLOR_DEPTH_BITS diff --git a/boards/arm/mimxrt1064_evk/Kconfig.defconfig b/boards/arm/mimxrt1064_evk/Kconfig.defconfig index 0e0cce2ace..642cb6f8ac 100644 --- a/boards/arm/mimxrt1064_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1064_evk/Kconfig.defconfig @@ -47,22 +47,22 @@ endif # NETWORKING if LVGL -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "FT5336" -config LVGL_HOR_RES_MAX +config LV_Z_HOR_RES_MAX default 480 -config LVGL_VER_RES_MAX +config LV_Z_VER_RES_MAX default 272 -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 16 -config LVGL_DPI +config LV_Z_DPI default 128 choice LV_COLOR_DEPTH_BITS diff --git a/boards/arm/reel_board/Kconfig.defconfig b/boards/arm/reel_board/Kconfig.defconfig index 1e1df226c4..a9edb04eb9 100644 --- a/boards/arm/reel_board/Kconfig.defconfig +++ b/boards/arm/reel_board/Kconfig.defconfig @@ -32,13 +32,13 @@ choice LV_COLOR_DEPTH_BITS default LV_COLOR_DEPTH_1 endchoice -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -config LVGL_DPI +config LV_Z_DPI default 130 -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 16 endif # LVGL diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig index 9f4b995ab0..3d3f77aa44 100644 --- a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig +++ b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig @@ -30,10 +30,10 @@ endif # KSCAN if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 24 choice LV_COLOR_DEPTH_BITS @@ -43,19 +43,19 @@ endchoice config KSCAN default y -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "FT5336" -config LVGL_POINTER_KSCAN_SWAP_XY +config LV_Z_POINTER_KSCAN_SWAP_XY default y -config LVGL_POINTER_KSCAN_INVERT_X +config LV_Z_POINTER_KSCAN_INVERT_X default y -config LVGL_POINTER_KSCAN_INVERT_Y +config LV_Z_POINTER_KSCAN_INVERT_Y default y endif # LVGL diff --git a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig index 896e4af697..2d44b5ee00 100644 --- a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig @@ -27,10 +27,10 @@ endif # KSCAN if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 16 choice LV_COLOR_DEPTH_BITS @@ -43,19 +43,19 @@ config LV_COLOR_16_SWAP config KSCAN default y -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "TOUCH" -config LVGL_POINTER_KSCAN_SWAP_XY +config LV_Z_POINTER_KSCAN_SWAP_XY default y -config LVGL_POINTER_KSCAN_INVERT_X +config LV_Z_POINTER_KSCAN_INVERT_X default y -config LVGL_POINTER_KSCAN_INVERT_Y +config LV_Z_POINTER_KSCAN_INVERT_Y default y endif # LVGL diff --git a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig index e668294051..da25d645ec 100644 --- a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig @@ -27,10 +27,10 @@ endif # KSCAN if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 32 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 24 choice LV_COLOR_DEPTH_BITS @@ -40,19 +40,19 @@ endchoice config KSCAN default y -config LVGL_POINTER_KSCAN +config LV_Z_POINTER_KSCAN default y -config LVGL_POINTER_KSCAN_DEV_NAME +config LV_Z_POINTER_KSCAN_DEV_NAME default "TOUCH" -config LVGL_POINTER_KSCAN_SWAP_XY +config LV_Z_POINTER_KSCAN_SWAP_XY default y -config LVGL_POINTER_KSCAN_INVERT_X +config LV_Z_POINTER_KSCAN_INVERT_X default y -config LVGL_POINTER_KSCAN_INVERT_Y +config LV_Z_POINTER_KSCAN_INVERT_Y default y endif # LVGL diff --git a/boards/shields/ls0xx_generic/Kconfig.defconfig b/boards/shields/ls0xx_generic/Kconfig.defconfig index e7925c348d..3b932e3092 100644 --- a/boards/shields/ls0xx_generic/Kconfig.defconfig +++ b/boards/shields/ls0xx_generic/Kconfig.defconfig @@ -13,13 +13,16 @@ config LS0XX if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE + int default 16 -config LVGL_DPI +config LV_Z_DPI + int default 150 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL + int default 1 choice LV_COLOR_DEPTH_BITS diff --git a/boards/shields/ssd1306/Kconfig.defconfig b/boards/shields/ssd1306/Kconfig.defconfig index 31e83a9604..25454a2c40 100644 --- a/boards/shields/ssd1306/Kconfig.defconfig +++ b/boards/shields/ssd1306/Kconfig.defconfig @@ -28,14 +28,14 @@ endchoice if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 116 if SHIELD_SH1106_128X64 default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 choice LV_COLOR_DEPTH_BITS diff --git a/boards/shields/st7735r/Kconfig.defconfig b/boards/shields/st7735r/Kconfig.defconfig index 73eb0fb1ac..8bfcf10322 100644 --- a/boards/shields/st7735r/Kconfig.defconfig +++ b/boards/shields/st7735r/Kconfig.defconfig @@ -14,7 +14,7 @@ config ST7735R if LVGL -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 16 endif # LVGL diff --git a/boards/shields/st7789v_generic/Kconfig.defconfig b/boards/shields/st7789v_generic/Kconfig.defconfig index c6490e2af6..f086e24570 100644 --- a/boards/shields/st7789v_generic/Kconfig.defconfig +++ b/boards/shields/st7789v_generic/Kconfig.defconfig @@ -18,7 +18,7 @@ endchoice if LVGL -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 24 if SHIELD_ST7789V_TL019FQV01 default 16 if SHIELD_ST7789V_WAVESHARE_240X240 diff --git a/boards/shields/waveshare_epaper/Kconfig.defconfig b/boards/shields/waveshare_epaper/Kconfig.defconfig index 83ce7d2400..510e2937cd 100644 --- a/boards/shields/waveshare_epaper/Kconfig.defconfig +++ b/boards/shields/waveshare_epaper/Kconfig.defconfig @@ -25,11 +25,11 @@ config GD7965 if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 16 if SHIELD_WAVESHARE_EPAPER_GDEW075T7 default 16 -config LVGL_DPI +config LV_Z_DPI default 188 if SHIELD_WAVESHARE_EPAPER_GDEH0154A07 default 120 if SHIELD_WAVESHARE_EPAPER_GDEW042T2 default 130 @@ -38,7 +38,7 @@ choice LV_COLOR_DEPTH_BITS default LV_COLOR_DEPTH_1 endchoice -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 endif # LVGL diff --git a/drivers/kscan/Kconfig.sdl b/drivers/kscan/Kconfig.sdl index b594e7aa2c..68b2a3a9b3 100644 --- a/drivers/kscan/Kconfig.sdl +++ b/drivers/kscan/Kconfig.sdl @@ -10,5 +10,5 @@ config KSCAN_SDL config SDL_POINTER_KSCAN_DEV_NAME string "SDL kscan device name" depends on KSCAN_SDL - default LVGL_POINTER_KSCAN_DEV_NAME if LVGL + default LV_Z_POINTER_KSCAN_DEV_NAME if LVGL default "SDL_KSCAN" diff --git a/samples/subsys/display/lvgl/prj.conf b/samples/subsys/display/lvgl/prj.conf index fd18a71485..8ac5276a02 100644 --- a/samples/subsys/display/lvgl/prj.conf +++ b/samples/subsys/display/lvgl/prj.conf @@ -1,4 +1,4 @@ -CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS=8 +CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8 CONFIG_MAIN_STACK_SIZE=2048 CONFIG_DISPLAY=y diff --git a/samples/subsys/display/lvgl/src/main.c b/samples/subsys/display/lvgl/src/main.c index 0b50e3b62b..a0a4bcbe7d 100644 --- a/samples/subsys/display/lvgl/src/main.c +++ b/samples/subsys/display/lvgl/src/main.c @@ -29,7 +29,7 @@ void main(void) return; } - if (IS_ENABLED(CONFIG_LVGL_POINTER_KSCAN)) { + if (IS_ENABLED(CONFIG_LV_Z_POINTER_KSCAN)) { lv_obj_t *hello_world_button; hello_world_button = lv_btn_create(lv_scr_act()); diff --git a/tests/lib/gui/lvgl/prj.conf b/tests/lib/gui/lvgl/prj.conf index 8d2d9f9776..e84879dc66 100644 --- a/tests/lib/gui/lvgl/prj.conf +++ b/tests/lib/gui/lvgl/prj.conf @@ -12,8 +12,8 @@ CONFIG_FILE_SYSTEM=y CONFIG_FILE_SYSTEM_LITTLEFS=y CONFIG_LVGL=y -CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS=8 -CONFIG_LVGL_USE_FILESYSTEM=y +CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8 +CONFIG_LV_Z_USE_FILESYSTEM=y CONFIG_LV_MEM_CUSTOM=y CONFIG_LV_USE_LOG=y CONFIG_LV_COLOR_DEPTH_32=y diff --git a/tests/lib/gui/lvgl/testcase.yaml b/tests/lib/gui/lvgl/testcase.yaml index 51f959be3b..7fb6fc9961 100644 --- a/tests/lib/gui/lvgl/testcase.yaml +++ b/tests/lib/gui/lvgl/testcase.yaml @@ -8,16 +8,16 @@ tests: platform_allow: native_posix_64 extra_configs: - CONFIG_NEWLIB_LIBC=y - - CONFIG_LVGL_BUFFER_ALLOC_DYNAMIC=y - - CONFIG_LVGL_MEM_POOL_HEAP_LIB_C=y + - CONFIG_LV_Z_BUFFER_ALLOC_DYNAMIC=y + - CONFIG_LV_Z_MEM_POOL_HEAP_LIB_C=y libraries.gui.lvgl.dynamic.pool.sys_heap: tags: display gui platform_allow: native_posix_64 extra_configs: - - CONFIG_LVGL_BUFFER_ALLOC_DYNAMIC=y - - CONFIG_LVGL_MEM_POOL_SYS_HEAP=y - - CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS=3 - - CONFIG_LVGL_MEM_POOL_MAX_SIZE=32768 + - CONFIG_LV_Z_BUFFER_ALLOC_DYNAMIC=y + - CONFIG_LV_Z_MEM_POOL_SYS_HEAP=y + - CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=3 + - CONFIG_LV_Z_MEM_POOL_MAX_SIZE=32768 libraries.gui.lvgl.16bit: tags: display gui platform_allow: native_posix_64