1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

feat(conf) add better check for Kconfig default

If a bool config is False Kconfig it won't add CONFIG_ define and it confused lv_conf_internal.h

Fixes: #2555
This commit is contained in:
Gabor Kiss-Vamosi 2021-10-14 16:20:03 +02:00
parent b1416369ae
commit f8fe5366bb
2 changed files with 1076 additions and 356 deletions

View File

@ -59,6 +59,10 @@ fout.write(
# endif
#endif
/*Check if there is a Kconfig environment*/
#ifdef LV_COLOR_DEPTH
#define LV_KCONFIG_PRESENT
#endif
/*----------------------------------
* Start parsing lv_conf_template.h
@ -95,8 +99,12 @@ for i in fin.read().splitlines():
fout.write(
f'#ifndef {line}\n'
f'# ifdef CONFIG_{line.upper()}\n'
f'# define {line} CONFIG_{line.upper()}\n'
f'# ifdef LV_KCONFIG_PRESENT\n'
f'# ifdef CONFIG_{line.upper()}\n'
f'# define {line} CONFIG_{line.upper()}\n'
f'# else\n'
f'# define {line} 0\n'
f'# endif\n'
f'# else\n'
f'{d}\n'
f'# endif\n'

File diff suppressed because it is too large Load Diff