1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Add Kconfig (#1875)

* Kconfig: Add first revision of Kconfig.

* Kconfig: Let the user edit LV_COLOR_TRANSP directly.

* Kconfig: Define CONFIG_LV_CONF_SKIP.

* Kconfig: Let the user edit LV_THEME_DEFAULT_COLOR_PRIMARY and LV_THEME_DEFAULT_COLOR_SECONDARY directly.

* Kconfig: add LV_CONF_MINIMAL

* Kconfig: Expose LV_CONF_MINIMAL option.

* Kconfig: Fix LV_CONF_SKIP missing type.

* Remove garbage files

* lv_conf_kconfig: Fix wrong check for LV_THEME_DEFAULT_COLOR_PRIMARY and SECONDARY symbols.

* Add Unscii 16 options.

* Multiply LV_MEM_SIZE by 1024

* Fix message on API compability options

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
Carlos Diaz 2020-11-16 05:49:48 -06:00 committed by GitHub
parent 0b79b1690f
commit 16567f5705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1154 additions and 2 deletions

1118
Kconfig Normal file

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,17 @@ extern "C" {
#ifdef __NuttX__
#include <nuttx/config.h>
#endif
/*******************
* LV_MEM_SIZE
*******************/
#ifndef LV_MEM_SIZE
#if defined (CONFIG_LV_MEM_SIZE_BYTES)
#define CONFIG_LV_MEM_SIZE (CONFIG_LV_MEM_SIZE_BYTES * 1024U)
#endif
#endif
/*******************
* LV COLOR TRANSP
*******************/
@ -43,7 +53,23 @@ extern "C" {
#elif defined (CONFIG_LV_THEME_DEFAULT_INIT_MATERIAL)
#define CONFIG_LV_THEME_DEFAULT_INIT lv_theme_material_init
#elif defined (CONFIG_LV_THEME_DEFAULT_INIT_MONO)
#define CONFIG_LV_THEME_DEFAULT_INIT lv_theme_mono_init
#define LV_THEME_DEFAULT_INIT lv_theme_mono_init
#endif
#endif
/*******************
* COLOR SELECTION
*******************/
#ifndef LV_THEME_DEFAULT_COLOR_PRIMARY
#ifdef CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY
#define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY)
#endif
#endif
#ifndef LV_THEME_DEFAULT_COLOR_SECONDARY
#ifdef CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY
#define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY)
#endif
#endif
@ -104,6 +130,8 @@ extern "C" {
#define CONFIG_LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_48
#elif defined CONFIG_LV_FONT_DEFAULT_SMALL_UNSCII_8
#define CONFIG_LV_THEME_DEFAULT_FONT_SMALL &lv_font_unscii_8
#elif defined CONFIG_LV_FONT_DEFAULT_SMALL_UNSCII_16
#define CONFIG_LV_THEME_DEFAULT_FONT_SMALL &lv_font_unscii_16
#elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT12SUBPX
#define CONFIG_LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12_subpx
#elif defined CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT28COMPRESSED
@ -163,6 +191,8 @@ extern "C" {
#define CONFIG_LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_48
#elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_UNSCII_8
#define CONFIG_LV_THEME_DEFAULT_FONT_NORMAL &lv_font_unscii_8
#elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_UNSCII_16
#define CONFIG_LV_THEME_DEFAULT_FONT_NORMAL &lv_font_unscii_16
#elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT12SUBPX
#define CONFIG_LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_12_subpx
#elif defined CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT28COMPRESSED
@ -222,6 +252,8 @@ extern "C" {
#define CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_48
#elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_UNSCII_8
#define CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_unscii_8
#elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_UNSCII_16
#define CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_unscii_16
#elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT12SUBPX
#define CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_12_subpx
#elif defined CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT28COMPRESSED
@ -281,6 +313,8 @@ extern "C" {
#define CONFIG_LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_48
#elif defined CONFIG_LV_FONT_DEFAULT_TITLE_UNSCII_8
#define CONFIG_LV_THEME_DEFAULT_FONT_TITLE &lv_font_unscii_8
#elif defined CONFIG_LV_FONT_DEFAULT_TITLE_UNSCII_16
#define CONFIG_LV_THEME_DEFAULT_FONT_TITLE &lv_font_unscii_16
#elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT12SUBPX
#define CONFIG_LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_12_subpx
#elif defined CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT28COMPRESSED