Commit 52282110 authored by Johann Fischer's avatar Johann Fischer Committed by Carles Cufi
Browse files

lib: lvgl: obtain LVGL_DISPLAY_DEV_NAME from devicetree



It is not possible completely remove options like
LVGL_DISPLAY_DEV_NAME without heavy reworking of LVGL support
because lvgl_init needs the name of the device, and
LVGL_*_RES_MAX options to define internal buffers.

Signed-off-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent 65f0c864
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4,20 +4,28 @@

menu "Graphical settings"

DT_CHOSEN_ZEPHYR_DISPLAY := zephyr,display
DT_CZD_PATH:= $(dt_chosen_path,$(DT_CHOSEN_ZEPHYR_DISPLAY))
DT_CZD_HOR_RES_MAX := $(dt_node_int_prop_int,$(DT_CZD_PATH),width)
DT_CZD_VER_RES_MAX := $(dt_node_int_prop_int,$(DT_CZD_PATH),height)

config LVGL_DISPLAY_DEV_NAME
	string "Display device name"
	default "$(dt_chosen_label,$(DT_CHOSEN_ZEPHYR_DISPLAY))" if HAS_DTS
	default "DISPLAY"
	help
	  Name of the display device to use for rendering.

config LVGL_HOR_RES_MAX
	int "Horizontal Screen Resolution"
	default "$(DT_CZD_HOR_RES_MAX)" if HAS_DTS
	default 480
	help
	  Horizontal screen resolution in pixels

config LVGL_VER_RES_MAX
	int "Vertical Screen Resolution"
	default "$(DT_CZD_VER_RES_MAX)" if HAS_DTS
	default 320
	help
	  Vertical screen resolution in pixels