fix(lv_conf_internal): be sure Kconfig defines are always uppercase

fixes #1989
This commit is contained in:
Gabor Kiss-Vamosi
2021-01-04 09:42:50 +01:00
parent 07b6d93de4
commit aba10b0170
2 changed files with 9 additions and 9 deletions

View File

@@ -93,14 +93,14 @@ for i in fin.read().splitlines():
if r: if r:
line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
line_upper = line.upper();
dr = re.sub('.*# *define', '', i, 1) dr = re.sub('.*# *define', '', i, 1)
d = "# define " + dr d = "# define " + dr
fout.write( fout.write(
f'#ifndef {line}\n' f'#ifndef {line}\n'
f'# ifdef CONFIG_{line}\n' f'# ifdef CONFIG_{line_upper}\n'
f'# define {line} CONFIG_{line}\n' f'# define {line} CONFIG_{line_upper}\n'
f'# else\n' f'# else\n'
f'{d}\n' f'{d}\n'
f'# endif\n' f'# endif\n'

View File

@@ -602,7 +602,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
* (I.e. no new image decoder is added) * (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. * 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. * 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 #ifndef LV_IMG_CACHE_DEF_SIZE
# ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE # ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE
# define LV_IMG_CACHE_DEF_SIZE 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
#endif #endif
#ifndef lv_snprintf #ifndef lv_snprintf
# ifdef CONFIG_lv_snprintf # ifdef CONFIG_LV_SNPRINTF
# define lv_snprintf CONFIG_lv_snprintf # define lv_snprintf CONFIG_LV_SNPRINTF
# else # else
# define lv_snprintf snprintf # define lv_snprintf snprintf
# endif # endif
#endif #endif
#ifndef lv_vsnprintf #ifndef lv_vsnprintf
# ifdef CONFIG_lv_vsnprintf # ifdef CONFIG_LV_VSNPRINTF
# define lv_vsnprintf CONFIG_lv_vsnprintf # define lv_vsnprintf CONFIG_LV_VSNPRINTF
# else # else
# define lv_vsnprintf vsnprintf # define lv_vsnprintf vsnprintf
# endif # endif