boards/shields: st7789v: Use conditional Kconfig
Use conditional Kconfig, as introduced by PR #20934, for ST7789V based shields. Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
This commit is contained in:
parent
2e713dc34b
commit
6c5477dd3f
40
boards/shields/st7789v_generic/Kconfig.defconfig
Normal file
40
boards/shields/st7789v_generic/Kconfig.defconfig
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SHIELD_ST7789V_TL019FQV01 || SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
if DISPLAY
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
config ST7789V
|
||||
default y
|
||||
|
||||
choice ST7789V_PIXEL_FORMAT
|
||||
default ST7789V_RGB888 if SHIELD_ST7789V_TL019FQV01
|
||||
default ST7789V_RGB565 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
endchoice
|
||||
|
||||
if LVGL
|
||||
|
||||
config LVGL_DISPLAY_DEV_NAME
|
||||
default "ST7789V"
|
||||
|
||||
config LVGL_HOR_RES
|
||||
default 320 if SHIELD_ST7789V_TL019FQV01
|
||||
default 240 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
config LVGL_VER_RES
|
||||
default 170 if SHIELD_ST7789V_TL019FQV01
|
||||
default 240 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
config LVGL_BITS_PER_PIXEL
|
||||
default 24 if SHIELD_ST7789V_TL019FQV01
|
||||
default 16 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
endif # LVGL
|
||||
|
||||
endif # DISPLAY
|
||||
|
||||
endif # SHIELD_ST7789V_TL019FQV01 || SHIELD_ST7789V_WAVESHARE_240X240
|
8
boards/shields/st7789v_generic/Kconfig.shield
Normal file
8
boards/shields/st7789v_generic/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SHIELD_ST7789V_TL019FQV01
|
||||
def_bool $(shields_list_contains,st7789v_tl019fqv01)
|
||||
|
||||
config SHIELD_ST7789V_WAVESHARE_240X240
|
||||
def_bool $(shields_list_contains,st7789v_waveshare_240x240)
|
|
@ -1,10 +0,0 @@
|
|||
CONFIG_SPI=y
|
||||
CONFIG_DISPLAY=y
|
||||
CONFIG_ST7789V=y
|
||||
|
||||
CONFIG_ST7789V_RGB888=y
|
||||
CONFIG_LVGL_BITS_PER_PIXEL=24
|
||||
CONFIG_LVGL_HOR_RES=320
|
||||
CONFIG_LVGL_VER_RES=170
|
||||
|
||||
CONFIG_LVGL_DISPLAY_DEV_NAME="ST7789V"
|
|
@ -1,10 +0,0 @@
|
|||
CONFIG_SPI=y
|
||||
CONFIG_DISPLAY=y
|
||||
CONFIG_ST7789V=y
|
||||
|
||||
CONFIG_ST7789V_RGB565=y
|
||||
CONFIG_LVGL_BITS_PER_PIXEL=16
|
||||
CONFIG_LVGL_HOR_RES=240
|
||||
CONFIG_LVGL_VER_RES=240
|
||||
|
||||
CONFIG_LVGL_DISPLAY_DEV_NAME="ST7789V"
|
Loading…
Reference in a new issue