fix(conf) better support bool option from Kconfign (#2555)
* fix(arc) format code Signed-off-by: FASTSHIFT <vifextech@foxmail.com> * fix(Kconfig) add missing LV_BUILD_EXAMPLES configuration Signed-off-by: FASTSHIFT <vifextech@foxmail.com> * fix(fsdrv): remove the seek call in fs_open (#2736) since the file should be located at zero after open Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * docs(os) add example and clarify some poinits * fix(draw border):border draw error if border width > radius (#2739) * fix(label) consider base dir lv_label_get_letter_pos in special cases related to https://github.com/lvgl/lvgl/issues/2712#issuecomment-953463193 * improve lv_conf_internal_gen.py for better Kconfig support Co-authored-by: Xiang Xiao <xiaoxiang@xiaomi.com> Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com> Co-authored-by: guoweilkd <guowei15@xiaomi.com> Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
607dfeceb6
commit
abcf5660a9
4
Kconfig
4
Kconfig
@@ -836,4 +836,8 @@ menu "LVGL configuration"
|
||||
default y if !LV_CONF_MINIMAL
|
||||
endmenu
|
||||
|
||||
config LV_BUILD_EXAMPLES
|
||||
bool "Enable the examples to be built with the library."
|
||||
default y
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -59,6 +59,9 @@ fout.write(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LV_COLOR_DEPTH
|
||||
# define _LV_KCONFIG_PRESENT
|
||||
#endif
|
||||
|
||||
/*----------------------------------
|
||||
* Start parsing lv_conf_template.h
|
||||
@@ -68,44 +71,65 @@ fout.write(
|
||||
|
||||
started = 0
|
||||
|
||||
for i in fin.read().splitlines():
|
||||
for line in fin.read().splitlines():
|
||||
if not started:
|
||||
if '#define LV_CONF_H' in i:
|
||||
if '#define LV_CONF_H' in line:
|
||||
started = 1
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
|
||||
if '/*--END OF LV_CONF_H--*/' in i: break
|
||||
if '/*--END OF LV_CONF_H--*/' in line: break
|
||||
|
||||
r = re.search(r'^ *# *define ([^\s]+).*$', i)
|
||||
|
||||
#ifndef LV_USE_BTN /*Only if not defined in lv_conf.h*/
|
||||
# ifdef CONFIG_LV_USE_BTN /*Use KConfig value if set*/
|
||||
# define LV_USE_BTN CONFIG_LV_USE_BTN
|
||||
# else
|
||||
# define LV_USE_BTN 1 /*Use default value*/
|
||||
# endif
|
||||
#endif
|
||||
#Is there a #define in this line?
|
||||
r = re.search(r'^[\s]*#[\s]*define[\s]+([^\s]+).*$', line) # \s means any white space character
|
||||
|
||||
if r:
|
||||
line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
|
||||
dr = re.sub('.*# *define', '', i, 1)
|
||||
d = "# define" + dr
|
||||
name = r[1]
|
||||
name = re.sub('\(.*?\)', '', name, 1) #remove parentheses from macros. E.g. MY_FUNC(5) -> MY_FUNC
|
||||
|
||||
name_and_value = re.sub('.*# *define', '', line, 1)
|
||||
|
||||
#If the value should be 1 (enabled) by default use a more complex structure for Kconfig checks because
|
||||
#if a not defined CONFIG_... value should be interpreted as 0 and not the LVGL default
|
||||
is_one = re.search(r'.*#.*define +[A-Z0-9_]+ +1[^0-9]*', line)
|
||||
if(is_one):
|
||||
#1. Use the value if already set from lv_conf.h or anything else (i.e. do nothing)
|
||||
#2. In Kconfig environment use the CONFIG_... value if set, else use 0
|
||||
#3. In not Kconfig environment use the LVGL's default value
|
||||
|
||||
fout.write(
|
||||
f'#ifndef {line}\n'
|
||||
f'# ifdef CONFIG_{line.upper()}\n'
|
||||
f'# define {line} CONFIG_{line.upper()}\n'
|
||||
f'#ifndef {name}\n'
|
||||
f'# ifdef _LV_KCONFIG_PRESENT\n'
|
||||
f'# ifdef CONFIG_{name.upper()}\n'
|
||||
f'# define {name} CONFIG_{name.upper()}\n'
|
||||
f'# else\n'
|
||||
f'{d}\n'
|
||||
f'# define {name} 0\n'
|
||||
f'# endif\n'
|
||||
f'# else\n'
|
||||
f'# define {name_and_value}\n'
|
||||
f'# endif\n'
|
||||
f'#endif\n'
|
||||
)
|
||||
elif re.search('^ *typedef .*;.*$', i):
|
||||
else:
|
||||
#1. Use the value if already set from lv_conf.h or anything else (i.e. do nothing)
|
||||
#2. Use the Kconfig value if set
|
||||
#3. Use the LVGL's default value
|
||||
|
||||
fout.write(
|
||||
f'#ifndef {name}\n'
|
||||
f'# ifdef CONFIG_{name.upper()}\n'
|
||||
f'# define {name} CONFIG_{name.upper()}\n'
|
||||
f'# else\n'
|
||||
f'# define {name_and_value}\n'
|
||||
f'# endif\n'
|
||||
f'#endif\n'
|
||||
)
|
||||
|
||||
elif re.search('^ *typedef .*;.*$', line):
|
||||
continue #ignore typedefs to avoide redeclaration
|
||||
else:
|
||||
fout.write(f'{i}\n')
|
||||
fout.write(f'{line}\n')
|
||||
|
||||
fout.write(
|
||||
'''
|
||||
@@ -116,6 +140,8 @@ fout.write(
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_DPI_DEF);
|
||||
|
||||
#undef _LV_KCONFIG_PRESENT
|
||||
|
||||
/*If running without lv_conf.h add typdesf with default value*/
|
||||
#ifdef LV_CONF_SKIP
|
||||
# if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /*Disable warnings for Visual Studio*/
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LV_COLOR_DEPTH
|
||||
# define _LV_KCONFIG_PRESENT
|
||||
#endif
|
||||
|
||||
/*----------------------------------
|
||||
* Start parsing lv_conf_template.h
|
||||
@@ -55,9 +58,13 @@
|
||||
|
||||
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
|
||||
#ifndef LV_COLOR_DEPTH
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_COLOR_DEPTH
|
||||
# define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH
|
||||
# else
|
||||
# define LV_COLOR_DEPTH 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_COLOR_DEPTH 16
|
||||
# endif
|
||||
#endif
|
||||
@@ -228,9 +235,13 @@
|
||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||
*(Not so important, you can adjust it to modify default sizes and spaces)*/
|
||||
#ifndef LV_DPI_DEF
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_DPI_DEF
|
||||
# define LV_DPI_DEF CONFIG_LV_DPI_DEF
|
||||
# else
|
||||
# define LV_DPI_DEF 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_DPI_DEF 130 /*[px/inch]*/
|
||||
# endif
|
||||
#endif
|
||||
@@ -246,9 +257,13 @@
|
||||
/*Enable complex draw engine.
|
||||
*Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/
|
||||
#ifndef LV_DRAW_COMPLEX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_DRAW_COMPLEX
|
||||
# define LV_DRAW_COMPLEX CONFIG_LV_DRAW_COMPLEX
|
||||
# else
|
||||
# define LV_DRAW_COMPLEX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_DRAW_COMPLEX 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -425,58 +440,90 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
||||
#ifndef LV_LOG_TRACE_MEM
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_MEM
|
||||
# define LV_LOG_TRACE_MEM CONFIG_LV_LOG_TRACE_MEM
|
||||
# else
|
||||
# define LV_LOG_TRACE_MEM 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_MEM 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_TIMER
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_TIMER
|
||||
# define LV_LOG_TRACE_TIMER CONFIG_LV_LOG_TRACE_TIMER
|
||||
# else
|
||||
# define LV_LOG_TRACE_TIMER 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_TIMER 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_INDEV
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_INDEV
|
||||
# define LV_LOG_TRACE_INDEV CONFIG_LV_LOG_TRACE_INDEV
|
||||
# else
|
||||
# define LV_LOG_TRACE_INDEV 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_INDEV 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_DISP_REFR
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_DISP_REFR
|
||||
# define LV_LOG_TRACE_DISP_REFR CONFIG_LV_LOG_TRACE_DISP_REFR
|
||||
# else
|
||||
# define LV_LOG_TRACE_DISP_REFR 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_DISP_REFR 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_EVENT
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_EVENT
|
||||
# define LV_LOG_TRACE_EVENT CONFIG_LV_LOG_TRACE_EVENT
|
||||
# else
|
||||
# define LV_LOG_TRACE_EVENT 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_EVENT 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_OBJ_CREATE
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_OBJ_CREATE
|
||||
# define LV_LOG_TRACE_OBJ_CREATE CONFIG_LV_LOG_TRACE_OBJ_CREATE
|
||||
# else
|
||||
# define LV_LOG_TRACE_OBJ_CREATE 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_OBJ_CREATE 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_LAYOUT
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_LAYOUT
|
||||
# define LV_LOG_TRACE_LAYOUT CONFIG_LV_LOG_TRACE_LAYOUT
|
||||
# else
|
||||
# define LV_LOG_TRACE_LAYOUT 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_LAYOUT 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LOG_TRACE_ANIM
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LOG_TRACE_ANIM
|
||||
# define LV_LOG_TRACE_ANIM CONFIG_LV_LOG_TRACE_ANIM
|
||||
# else
|
||||
# define LV_LOG_TRACE_ANIM 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LOG_TRACE_ANIM 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -490,16 +537,24 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
/*Enable asserts if an operation is failed or an invalid data is found.
|
||||
*If LV_USE_LOG is enabled an error message will be printed on failure*/
|
||||
#ifndef LV_USE_ASSERT_NULL
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_ASSERT_NULL
|
||||
# define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
|
||||
# else
|
||||
# define LV_USE_ASSERT_NULL 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_USE_ASSERT_MALLOC
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_ASSERT_MALLOC
|
||||
# define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
|
||||
# else
|
||||
# define LV_USE_ASSERT_MALLOC 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
|
||||
# endif
|
||||
#endif
|
||||
@@ -632,9 +687,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
#endif /*LV_SPRINTF_CUSTOM*/
|
||||
|
||||
#ifndef LV_USE_USER_DATA
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_USER_DATA
|
||||
# define LV_USE_USER_DATA CONFIG_LV_USE_USER_DATA
|
||||
# else
|
||||
# define LV_USE_USER_DATA 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_USER_DATA 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -700,9 +759,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*Required alignment size for buffers*/
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN_SIZE
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
|
||||
# define LV_ATTRIBUTE_MEM_ALIGN_SIZE CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
|
||||
# else
|
||||
# define LV_ATTRIBUTE_MEM_ALIGN_SIZE 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -800,9 +863,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_FONT_MONTSERRAT_14
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_FONT_MONTSERRAT_14
|
||||
# define LV_FONT_MONTSERRAT_14 CONFIG_LV_FONT_MONTSERRAT_14
|
||||
# else
|
||||
# define LV_FONT_MONTSERRAT_14 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_FONT_MONTSERRAT_14 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1138,113 +1205,169 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
|
||||
|
||||
#ifndef LV_USE_ARC
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_ARC
|
||||
# define LV_USE_ARC CONFIG_LV_USE_ARC
|
||||
# else
|
||||
# define LV_USE_ARC 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_ARC 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_ANIMIMG
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_ANIMIMG
|
||||
# define LV_USE_ANIMIMG CONFIG_LV_USE_ANIMIMG
|
||||
# else
|
||||
# define LV_USE_ANIMIMG 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_ANIMIMG 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_BAR
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_BAR
|
||||
# define LV_USE_BAR CONFIG_LV_USE_BAR
|
||||
# else
|
||||
# define LV_USE_BAR 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_BAR 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_BTN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_BTN
|
||||
# define LV_USE_BTN CONFIG_LV_USE_BTN
|
||||
# else
|
||||
# define LV_USE_BTN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_BTN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_BTNMATRIX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_BTNMATRIX
|
||||
# define LV_USE_BTNMATRIX CONFIG_LV_USE_BTNMATRIX
|
||||
# else
|
||||
# define LV_USE_BTNMATRIX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_BTNMATRIX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_CANVAS
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CANVAS
|
||||
# define LV_USE_CANVAS CONFIG_LV_USE_CANVAS
|
||||
# else
|
||||
# define LV_USE_CANVAS 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CANVAS 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_CHECKBOX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CHECKBOX
|
||||
# define LV_USE_CHECKBOX CONFIG_LV_USE_CHECKBOX
|
||||
# else
|
||||
# define LV_USE_CHECKBOX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CHECKBOX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_DROPDOWN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_DROPDOWN
|
||||
# define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN
|
||||
# else
|
||||
# define LV_USE_DROPDOWN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_IMG
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_IMG
|
||||
# define LV_USE_IMG CONFIG_LV_USE_IMG
|
||||
# else
|
||||
# define LV_USE_IMG 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_IMG 1 /*Requires: lv_label*/
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_LABEL
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_LABEL
|
||||
# define LV_USE_LABEL CONFIG_LV_USE_LABEL
|
||||
# else
|
||||
# define LV_USE_LABEL 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_LABEL 1
|
||||
# endif
|
||||
#endif
|
||||
#if LV_USE_LABEL
|
||||
#ifndef LV_LABEL_TEXT_SELECTION
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
# define LV_LABEL_TEXT_SELECTION CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
# else
|
||||
# define LV_LABEL_TEXT_SELECTION 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_LABEL_LONG_TXT_HINT
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
# define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
# else
|
||||
# define LV_LABEL_LONG_TXT_HINT 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_LINE
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_LINE
|
||||
# define LV_USE_LINE CONFIG_LV_USE_LINE
|
||||
# else
|
||||
# define LV_USE_LINE 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_LINE 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_ROLLER
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_ROLLER
|
||||
# define LV_USE_ROLLER CONFIG_LV_USE_ROLLER
|
||||
# else
|
||||
# define LV_USE_ROLLER 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
||||
# endif
|
||||
#endif
|
||||
@@ -1259,42 +1382,62 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SLIDER
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SLIDER
|
||||
# define LV_USE_SLIDER CONFIG_LV_USE_SLIDER
|
||||
# else
|
||||
# define LV_USE_SLIDER 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SWITCH
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SWITCH
|
||||
# define LV_USE_SWITCH CONFIG_LV_USE_SWITCH
|
||||
# else
|
||||
# define LV_USE_SWITCH 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SWITCH 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_TEXTAREA
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_TEXTAREA
|
||||
# define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA
|
||||
# else
|
||||
# define LV_USE_TEXTAREA 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
|
||||
# endif
|
||||
#endif
|
||||
#if LV_USE_TEXTAREA != 0
|
||||
#ifndef LV_TEXTAREA_DEF_PWD_SHOW_TIME
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
|
||||
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
|
||||
# else
|
||||
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_TABLE
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_TABLE
|
||||
# define LV_USE_TABLE CONFIG_LV_USE_TABLE
|
||||
# else
|
||||
# define LV_USE_TABLE 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_TABLE 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1307,9 +1450,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
* Widgets
|
||||
*----------*/
|
||||
#ifndef LV_USE_CALENDAR
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CALENDAR
|
||||
# define LV_USE_CALENDAR CONFIG_LV_USE_CALENDAR
|
||||
# else
|
||||
# define LV_USE_CALENDAR 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CALENDAR 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1347,129 +1494,193 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_USE_CALENDAR_HEADER_ARROW
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CALENDAR_HEADER_ARROW
|
||||
# define LV_USE_CALENDAR_HEADER_ARROW CONFIG_LV_USE_CALENDAR_HEADER_ARROW
|
||||
# else
|
||||
# define LV_USE_CALENDAR_HEADER_ARROW 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CALENDAR_HEADER_ARROW 1
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LV_USE_CALENDAR_HEADER_DROPDOWN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
|
||||
# define LV_USE_CALENDAR_HEADER_DROPDOWN CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
|
||||
# else
|
||||
# define LV_USE_CALENDAR_HEADER_DROPDOWN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CALENDAR_HEADER_DROPDOWN 1
|
||||
# endif
|
||||
#endif
|
||||
#endif /*LV_USE_CALENDAR*/
|
||||
|
||||
#ifndef LV_USE_CHART
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_CHART
|
||||
# define LV_USE_CHART CONFIG_LV_USE_CHART
|
||||
# else
|
||||
# define LV_USE_CHART 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_CHART 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_COLORWHEEL
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_COLORWHEEL
|
||||
# define LV_USE_COLORWHEEL CONFIG_LV_USE_COLORWHEEL
|
||||
# else
|
||||
# define LV_USE_COLORWHEEL 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_COLORWHEEL 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_IMGBTN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_IMGBTN
|
||||
# define LV_USE_IMGBTN CONFIG_LV_USE_IMGBTN
|
||||
# else
|
||||
# define LV_USE_IMGBTN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_IMGBTN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_KEYBOARD
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_KEYBOARD
|
||||
# define LV_USE_KEYBOARD CONFIG_LV_USE_KEYBOARD
|
||||
# else
|
||||
# define LV_USE_KEYBOARD 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_KEYBOARD 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_LED
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_LED
|
||||
# define LV_USE_LED CONFIG_LV_USE_LED
|
||||
# else
|
||||
# define LV_USE_LED 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_LED 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_LIST
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_LIST
|
||||
# define LV_USE_LIST CONFIG_LV_USE_LIST
|
||||
# else
|
||||
# define LV_USE_LIST 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_LIST 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_METER
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_METER
|
||||
# define LV_USE_METER CONFIG_LV_USE_METER
|
||||
# else
|
||||
# define LV_USE_METER 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_METER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_MSGBOX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_MSGBOX
|
||||
# define LV_USE_MSGBOX CONFIG_LV_USE_MSGBOX
|
||||
# else
|
||||
# define LV_USE_MSGBOX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_MSGBOX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SPINBOX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SPINBOX
|
||||
# define LV_USE_SPINBOX CONFIG_LV_USE_SPINBOX
|
||||
# else
|
||||
# define LV_USE_SPINBOX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SPINBOX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SPINNER
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SPINNER
|
||||
# define LV_USE_SPINNER CONFIG_LV_USE_SPINNER
|
||||
# else
|
||||
# define LV_USE_SPINNER 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SPINNER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_TABVIEW
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_TABVIEW
|
||||
# define LV_USE_TABVIEW CONFIG_LV_USE_TABVIEW
|
||||
# else
|
||||
# define LV_USE_TABVIEW 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_TABVIEW 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_TILEVIEW
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_TILEVIEW
|
||||
# define LV_USE_TILEVIEW CONFIG_LV_USE_TILEVIEW
|
||||
# else
|
||||
# define LV_USE_TILEVIEW 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_TILEVIEW 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_WIN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_WIN
|
||||
# define LV_USE_WIN CONFIG_LV_USE_WIN
|
||||
# else
|
||||
# define LV_USE_WIN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_WIN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SPAN
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SPAN
|
||||
# define LV_USE_SPAN CONFIG_LV_USE_SPAN
|
||||
# else
|
||||
# define LV_USE_SPAN 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SPAN 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1490,9 +1701,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*A simple, impressive and very complete theme*/
|
||||
#ifndef LV_USE_THEME_DEFAULT
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_THEME_DEFAULT
|
||||
# define LV_USE_THEME_DEFAULT CONFIG_LV_USE_THEME_DEFAULT
|
||||
# else
|
||||
# define LV_USE_THEME_DEFAULT 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_THEME_DEFAULT 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1509,9 +1724,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*1: Enable grow on press*/
|
||||
#ifndef LV_THEME_DEFAULT_GROW
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_THEME_DEFAULT_GROW
|
||||
# define LV_THEME_DEFAULT_GROW CONFIG_LV_THEME_DEFAULT_GROW
|
||||
# else
|
||||
# define LV_THEME_DEFAULT_GROW 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_THEME_DEFAULT_GROW 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1528,18 +1747,26 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*A very simple theme that is a good starting point for a custom theme*/
|
||||
#ifndef LV_USE_THEME_BASIC
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_THEME_BASIC
|
||||
# define LV_USE_THEME_BASIC CONFIG_LV_USE_THEME_BASIC
|
||||
# else
|
||||
# define LV_USE_THEME_BASIC 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_THEME_BASIC 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*A theme designed for monochrome displays*/
|
||||
#ifndef LV_USE_THEME_MONO
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_THEME_MONO
|
||||
# define LV_USE_THEME_MONO CONFIG_LV_USE_THEME_MONO
|
||||
# else
|
||||
# define LV_USE_THEME_MONO 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_THEME_MONO 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1550,18 +1777,26 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*A layout similar to Flexbox in CSS.*/
|
||||
#ifndef LV_USE_FLEX
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_FLEX
|
||||
# define LV_USE_FLEX CONFIG_LV_USE_FLEX
|
||||
# else
|
||||
# define LV_USE_FLEX 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_FLEX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*A layout similar to Grid in CSS.*/
|
||||
#ifndef LV_USE_GRID
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_GRID
|
||||
# define LV_USE_GRID CONFIG_LV_USE_GRID
|
||||
# else
|
||||
# define LV_USE_GRID 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_GRID 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1687,9 +1922,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*1: Enable API to take snapshot for object*/
|
||||
#ifndef LV_USE_SNAPSHOT
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_USE_SNAPSHOT
|
||||
# define LV_USE_SNAPSHOT CONFIG_LV_USE_SNAPSHOT
|
||||
# else
|
||||
# define LV_USE_SNAPSHOT 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_USE_SNAPSHOT 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1701,9 +1940,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
/*Enable the examples to be built with the library*/
|
||||
#ifndef LV_BUILD_EXAMPLES
|
||||
# ifdef _LV_KCONFIG_PRESENT
|
||||
# ifdef CONFIG_LV_BUILD_EXAMPLES
|
||||
# define LV_BUILD_EXAMPLES CONFIG_LV_BUILD_EXAMPLES
|
||||
# else
|
||||
# define LV_BUILD_EXAMPLES 0
|
||||
# endif
|
||||
# else
|
||||
# define LV_BUILD_EXAMPLES 1
|
||||
# endif
|
||||
#endif
|
||||
@@ -1716,6 +1959,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_DPI_DEF);
|
||||
|
||||
#undef _LV_KCONFIG_PRESENT
|
||||
|
||||
/*If running without lv_conf.h add typdesf with default value*/
|
||||
#ifdef LV_CONF_SKIP
|
||||
# if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /*Disable warnings for Visual Studio*/
|
||||
|
||||
Reference in New Issue
Block a user