Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/gui/lvgl: Add user config file #36479

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib/gui/lvgl: Add user config file
Add custom preferences file, for example
to enable custom fonts and change preferences.

Signed-off-by: Krivorot Oleg [email protected]
Krivorot Oleg committed Jun 24, 2021
commit 19c431b383fb83b1e8e542861862106a0f247213
17 changes: 17 additions & 0 deletions lib/gui/lvgl/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) 2018-2019 Jan Van Winkel <[email protected]>
# Copyright (c) 2020 Teslabs Engineering S.L.
# Copyright (c) 2021 Krivorot Oleg <[email protected]>
# SPDX-License-Identifier: Apache-2.0

menuconfig LVGL
@@ -21,6 +22,22 @@ config APP_LINK_WITH_LVGL
disabled if the include paths for LVGL are causing aliasing
issues for 'app'.

config LVGL_USE_USER_CONFIG
bool "Use user config file"
help
Include a custom preferences file (lv_conf_user.h by default; see
LVGL_USER_CONFIG_FILE). In the file, you can set the preferences
that cannot be set using Kconfig (e.g. custom fonts).

config LVGL_USER_CONFIG_FILE
string "User config file name"
default "lv_conf_user.h"
depends on LVGL_USE_USER_CONFIG
help
This file should be located in the root folder of the project,
or in any folder, the path to which is registered in root
CMakeLists.txt using the macro zephyr_include_directories()

rsource "Kconfig.graphical"
rsource "Kconfig.memory"
rsource "Kconfig.input"
5 changes: 5 additions & 0 deletions lib/gui/lvgl/lv_conf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020 Jan Van Winkel <[email protected]>
* Copyright (c) 2020 Teslabs Engineering S.L.
* Copyright (c) 2021 Krivorot Oleg <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -871,4 +872,8 @@ typedef void *lv_obj_user_data_t;

#define LV_USE_WIN IS_ENABLED(CONFIG_LVGL_USE_WIN)

#ifdef CONFIG_LVGL_USE_USER_CONFIG
#include CONFIG_LVGL_USER_CONFIG_FILE
#endif

#endif /* ZEPHYR_LIB_GUI_LVGL_LV_CONF_H_ */