fix(lv_conf_internal): be sure Kconfig defines are always uppercase
fixes #1989
This commit is contained in:
@@ -93,14 +93,14 @@ for i in fin.read().splitlines():
|
||||
|
||||
if r:
|
||||
line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
|
||||
|
||||
line_upper = line.upper();
|
||||
dr = re.sub('.*# *define', '', i, 1)
|
||||
d = "# define " + dr
|
||||
|
||||
|
||||
fout.write(
|
||||
f'#ifndef {line}\n'
|
||||
f'# ifdef CONFIG_{line}\n'
|
||||
f'# define {line} CONFIG_{line}\n'
|
||||
f'# ifdef CONFIG_{line_upper}\n'
|
||||
f'# define {line} CONFIG_{line_upper}\n'
|
||||
f'# else\n'
|
||||
f'{d}\n'
|
||||
f'# endif\n'
|
||||
|
||||
@@ -602,7 +602,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
||||
* (I.e. no new image decoder is added)
|
||||
* With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
|
||||
* However the opened images might consume additional RAM.
|
||||
* LV_IMG_CACHE_DEF_SIZE must be >= 1 */
|
||||
* Set it to 0 to disable caching */
|
||||
#ifndef LV_IMG_CACHE_DEF_SIZE
|
||||
# ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE
|
||||
# define LV_IMG_CACHE_DEF_SIZE CONFIG_LV_IMG_CACHE_DEF_SIZE
|
||||
@@ -1373,15 +1373,15 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
||||
# endif
|
||||
#endif
|
||||
#ifndef lv_snprintf
|
||||
# ifdef CONFIG_lv_snprintf
|
||||
# define lv_snprintf CONFIG_lv_snprintf
|
||||
# ifdef CONFIG_LV_SNPRINTF
|
||||
# define lv_snprintf CONFIG_LV_SNPRINTF
|
||||
# else
|
||||
# define lv_snprintf snprintf
|
||||
# endif
|
||||
#endif
|
||||
#ifndef lv_vsnprintf
|
||||
# ifdef CONFIG_lv_vsnprintf
|
||||
# define lv_vsnprintf CONFIG_lv_vsnprintf
|
||||
# ifdef CONFIG_LV_VSNPRINTF
|
||||
# define lv_vsnprintf CONFIG_LV_VSNPRINTF
|
||||
# else
|
||||
# define lv_vsnprintf vsnprintf
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user