mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-29 14:46:29 +08:00
chore(conf): ensure the template and generated file conform the coding style (#2823)
* fix(conf): ensure the template and generated file conform the coding style and remove lv_conf_internal.h from the excluding list of code-format.cfg Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(conf): regenerate lv_conf_internal.h Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
+95
-95
@@ -48,22 +48,22 @@
|
|||||||
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
|
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
|
||||||
#define LV_MEM_CUSTOM 0
|
#define LV_MEM_CUSTOM 0
|
||||||
#if LV_MEM_CUSTOM == 0
|
#if LV_MEM_CUSTOM == 0
|
||||||
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
|
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
|
||||||
# define LV_MEM_SIZE (32U * 1024U) /*[bytes]*/
|
#define LV_MEM_SIZE (32U * 1024U) /*[bytes]*/
|
||||||
|
|
||||||
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
|
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
|
||||||
# define LV_MEM_ADR 0 /*0: unused*/
|
#define LV_MEM_ADR 0 /*0: unused*/
|
||||||
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
|
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
|
||||||
#if LV_MEM_ADR == 0
|
#if LV_MEM_ADR == 0
|
||||||
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
||||||
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /*LV_MEM_CUSTOM*/
|
#else /*LV_MEM_CUSTOM*/
|
||||||
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
||||||
# define LV_MEM_CUSTOM_ALLOC malloc
|
#define LV_MEM_CUSTOM_ALLOC malloc
|
||||||
# define LV_MEM_CUSTOM_FREE free
|
#define LV_MEM_CUSTOM_FREE free
|
||||||
# define LV_MEM_CUSTOM_REALLOC realloc
|
#define LV_MEM_CUSTOM_REALLOC realloc
|
||||||
#endif /*LV_MEM_CUSTOM*/
|
#endif /*LV_MEM_CUSTOM*/
|
||||||
|
|
||||||
/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
|
/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
|
||||||
@@ -87,8 +87,8 @@
|
|||||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||||
#define LV_TICK_CUSTOM 0
|
#define LV_TICK_CUSTOM 0
|
||||||
#if LV_TICK_CUSTOM
|
#if LV_TICK_CUSTOM
|
||||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||||
#endif /*LV_TICK_CUSTOM*/
|
#endif /*LV_TICK_CUSTOM*/
|
||||||
|
|
||||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||||
@@ -108,16 +108,16 @@
|
|||||||
#define LV_DRAW_COMPLEX 1
|
#define LV_DRAW_COMPLEX 1
|
||||||
#if LV_DRAW_COMPLEX != 0
|
#if LV_DRAW_COMPLEX != 0
|
||||||
|
|
||||||
/*Allow buffering some shadow calculation.
|
/*Allow buffering some shadow calculation.
|
||||||
*LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
|
*LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
|
||||||
*Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
|
*Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
|
||||||
#define LV_SHADOW_CACHE_SIZE 0
|
#define LV_SHADOW_CACHE_SIZE 0
|
||||||
|
|
||||||
/* Set number of maximally cached circle data.
|
/* Set number of maximally cached circle data.
|
||||||
* The circumference of 1/4 circle are saved for anti-aliasing
|
* The circumference of 1/4 circle are saved for anti-aliasing
|
||||||
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
|
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
|
||||||
* 0: to disable caching */
|
* 0: to disable caching */
|
||||||
#define LV_CIRCLE_CACHE_SIZE 4
|
#define LV_CIRCLE_CACHE_SIZE 4
|
||||||
|
|
||||||
#endif /*LV_DRAW_COMPLEX*/
|
#endif /*LV_DRAW_COMPLEX*/
|
||||||
|
|
||||||
@@ -138,20 +138,20 @@
|
|||||||
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
||||||
#define LV_USE_GPU_STM32_DMA2D 0
|
#define LV_USE_GPU_STM32_DMA2D 0
|
||||||
#if LV_USE_GPU_STM32_DMA2D
|
#if LV_USE_GPU_STM32_DMA2D
|
||||||
/*Must be defined to include path of CMSIS header of target processor
|
/*Must be defined to include path of CMSIS header of target processor
|
||||||
e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
||||||
#define LV_GPU_DMA2D_CMSIS_INCLUDE
|
#define LV_GPU_DMA2D_CMSIS_INCLUDE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Use NXP's PXP GPU iMX RTxxx platforms*/
|
/*Use NXP's PXP GPU iMX RTxxx platforms*/
|
||||||
#define LV_USE_GPU_NXP_PXP 0
|
#define LV_USE_GPU_NXP_PXP 0
|
||||||
#if LV_USE_GPU_NXP_PXP
|
#if LV_USE_GPU_NXP_PXP
|
||||||
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
|
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
|
||||||
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
|
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
|
||||||
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
|
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
|
||||||
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
|
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
|
||||||
*/
|
*/
|
||||||
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
|
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
|
/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
|
||||||
@@ -163,7 +163,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
/*Use SDL renderer API. Requires LV_USE_EXTERNAL_RENDERER*/
|
/*Use SDL renderer API. Requires LV_USE_EXTERNAL_RENDERER*/
|
||||||
#define LV_USE_GPU_SDL 0
|
#define LV_USE_GPU_SDL 0
|
||||||
#if LV_USE_GPU_SDL
|
#if LV_USE_GPU_SDL
|
||||||
# define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
|
#define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-------------
|
/*-------------
|
||||||
@@ -174,28 +174,28 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
#define LV_USE_LOG 0
|
#define LV_USE_LOG 0
|
||||||
#if LV_USE_LOG
|
#if LV_USE_LOG
|
||||||
|
|
||||||
/*How important log should be added:
|
/*How important log should be added:
|
||||||
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
|
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
|
||||||
*LV_LOG_LEVEL_INFO Log important events
|
*LV_LOG_LEVEL_INFO Log important events
|
||||||
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
|
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
|
||||||
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
|
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
|
||||||
*LV_LOG_LEVEL_USER Only logs added by the user
|
*LV_LOG_LEVEL_USER Only logs added by the user
|
||||||
*LV_LOG_LEVEL_NONE Do not log anything*/
|
*LV_LOG_LEVEL_NONE Do not log anything*/
|
||||||
# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
||||||
|
|
||||||
/*1: Print the log with 'printf';
|
/*1: Print the log with 'printf';
|
||||||
*0: User need to register a callback with `lv_log_register_print_cb()`*/
|
*0: User need to register a callback with `lv_log_register_print_cb()`*/
|
||||||
# define LV_LOG_PRINTF 0
|
#define LV_LOG_PRINTF 0
|
||||||
|
|
||||||
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
||||||
# define LV_LOG_TRACE_MEM 1
|
#define LV_LOG_TRACE_MEM 1
|
||||||
# define LV_LOG_TRACE_TIMER 1
|
#define LV_LOG_TRACE_TIMER 1
|
||||||
# define LV_LOG_TRACE_INDEV 1
|
#define LV_LOG_TRACE_INDEV 1
|
||||||
# define LV_LOG_TRACE_DISP_REFR 1
|
#define LV_LOG_TRACE_DISP_REFR 1
|
||||||
# define LV_LOG_TRACE_EVENT 1
|
#define LV_LOG_TRACE_EVENT 1
|
||||||
# define LV_LOG_TRACE_OBJ_CREATE 1
|
#define LV_LOG_TRACE_OBJ_CREATE 1
|
||||||
# define LV_LOG_TRACE_LAYOUT 1
|
#define LV_LOG_TRACE_LAYOUT 1
|
||||||
# define LV_LOG_TRACE_ANIM 1
|
#define LV_LOG_TRACE_ANIM 1
|
||||||
|
|
||||||
#endif /*LV_USE_LOG*/
|
#endif /*LV_USE_LOG*/
|
||||||
|
|
||||||
@@ -222,14 +222,14 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
/*1: Show CPU usage and FPS count in the right bottom corner*/
|
/*1: Show CPU usage and FPS count in the right bottom corner*/
|
||||||
#define LV_USE_PERF_MONITOR 0
|
#define LV_USE_PERF_MONITOR 0
|
||||||
#if LV_USE_PERF_MONITOR
|
#if LV_USE_PERF_MONITOR
|
||||||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*1: Show the used memory and the memory fragmentation in the left bottom corner
|
/*1: Show the used memory and the memory fragmentation in the left bottom corner
|
||||||
* Requires LV_MEM_CUSTOM = 0*/
|
* Requires LV_MEM_CUSTOM = 0*/
|
||||||
#define LV_USE_MEM_MONITOR 0
|
#define LV_USE_MEM_MONITOR 0
|
||||||
#if LV_USE_PERF_MONITOR
|
#if LV_USE_PERF_MONITOR
|
||||||
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*1: Draw random colored rectangles over the redrawn areas*/
|
/*1: Draw random colored rectangles over the redrawn areas*/
|
||||||
@@ -238,11 +238,11 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
/*Change the built in (v)snprintf functions*/
|
/*Change the built in (v)snprintf functions*/
|
||||||
#define LV_SPRINTF_CUSTOM 0
|
#define LV_SPRINTF_CUSTOM 0
|
||||||
#if LV_SPRINTF_CUSTOM
|
#if LV_SPRINTF_CUSTOM
|
||||||
# define LV_SPRINTF_INCLUDE <stdio.h>
|
#define LV_SPRINTF_INCLUDE <stdio.h>
|
||||||
# define lv_snprintf snprintf
|
#define lv_snprintf snprintf
|
||||||
# define lv_vsnprintf vsnprintf
|
#define lv_vsnprintf vsnprintf
|
||||||
#else /*LV_SPRINTF_CUSTOM*/
|
#else /*LV_SPRINTF_CUSTOM*/
|
||||||
# define LV_SPRINTF_USE_FLOAT 0
|
#define LV_SPRINTF_USE_FLOAT 0
|
||||||
#endif /*LV_SPRINTF_CUSTOM*/
|
#endif /*LV_SPRINTF_CUSTOM*/
|
||||||
|
|
||||||
#define LV_USE_USER_DATA 1
|
#define LV_USE_USER_DATA 1
|
||||||
@@ -251,7 +251,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
||||||
#define LV_ENABLE_GC 0
|
#define LV_ENABLE_GC 0
|
||||||
#if LV_ENABLE_GC != 0
|
#if LV_ENABLE_GC != 0
|
||||||
# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
||||||
#endif /*LV_ENABLE_GC*/
|
#endif /*LV_ENABLE_GC*/
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
@@ -353,8 +353,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
/*Enable subpixel rendering*/
|
/*Enable subpixel rendering*/
|
||||||
#define LV_USE_FONT_SUBPX 0
|
#define LV_USE_FONT_SUBPX 0
|
||||||
#if LV_USE_FONT_SUBPX
|
#if LV_USE_FONT_SUBPX
|
||||||
/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
|
/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
|
||||||
#define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
|
#define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*=================
|
/*=================
|
||||||
@@ -369,7 +369,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
*/
|
*/
|
||||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||||
|
|
||||||
/*Can break (wrap) texts on these chars*/
|
/*Can break (wrap) texts on these chars*/
|
||||||
#define LV_TXT_BREAK_CHARS " ,.;:-_"
|
#define LV_TXT_BREAK_CHARS " ,.;:-_"
|
||||||
|
|
||||||
/*If a word is at least this long, will break wherever "prettiest"
|
/*If a word is at least this long, will break wherever "prettiest"
|
||||||
@@ -392,11 +392,11 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
*https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
*https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
||||||
#define LV_USE_BIDI 0
|
#define LV_USE_BIDI 0
|
||||||
#if LV_USE_BIDI
|
#if LV_USE_BIDI
|
||||||
/*Set the default direction. Supported values:
|
/*Set the default direction. Supported values:
|
||||||
*`LV_BASE_DIR_LTR` Left-to-Right
|
*`LV_BASE_DIR_LTR` Left-to-Right
|
||||||
*`LV_BASE_DIR_RTL` Right-to-Left
|
*`LV_BASE_DIR_RTL` Right-to-Left
|
||||||
*`LV_BASE_DIR_AUTO` detect texts base direction*/
|
*`LV_BASE_DIR_AUTO` detect texts base direction*/
|
||||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
|
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Enable Arabic/Persian processing
|
/*Enable Arabic/Persian processing
|
||||||
@@ -429,15 +429,15 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
|
|
||||||
#define LV_USE_LABEL 1
|
#define LV_USE_LABEL 1
|
||||||
#if LV_USE_LABEL
|
#if LV_USE_LABEL
|
||||||
# define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
|
#define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
|
||||||
# define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
|
#define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LV_USE_LINE 1
|
#define LV_USE_LINE 1
|
||||||
|
|
||||||
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
||||||
#if LV_USE_ROLLER
|
#if LV_USE_ROLLER
|
||||||
# define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
|
#define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
||||||
@@ -446,7 +446,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
|
|
||||||
#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
|
#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
|
||||||
#if LV_USE_TEXTAREA != 0
|
#if LV_USE_TEXTAREA != 0
|
||||||
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
|
#define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LV_USE_TABLE 1
|
#define LV_USE_TABLE 1
|
||||||
@@ -460,16 +460,16 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
*----------*/
|
*----------*/
|
||||||
#define LV_USE_CALENDAR 1
|
#define LV_USE_CALENDAR 1
|
||||||
#if LV_USE_CALENDAR
|
#if LV_USE_CALENDAR
|
||||||
# define LV_CALENDAR_WEEK_STARTS_MONDAY 0
|
#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
|
||||||
# if LV_CALENDAR_WEEK_STARTS_MONDAY
|
#if LV_CALENDAR_WEEK_STARTS_MONDAY
|
||||||
# define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
|
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
|
||||||
# else
|
#else
|
||||||
# define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
|
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
# define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
|
#define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
|
||||||
# define LV_USE_CALENDAR_HEADER_ARROW 1
|
#define LV_USE_CALENDAR_HEADER_ARROW 1
|
||||||
# define LV_USE_CALENDAR_HEADER_DROPDOWN 1
|
#define LV_USE_CALENDAR_HEADER_DROPDOWN 1
|
||||||
#endif /*LV_USE_CALENDAR*/
|
#endif /*LV_USE_CALENDAR*/
|
||||||
|
|
||||||
#define LV_USE_CHART 1
|
#define LV_USE_CHART 1
|
||||||
@@ -500,8 +500,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
|
|
||||||
#define LV_USE_SPAN 1
|
#define LV_USE_SPAN 1
|
||||||
#if LV_USE_SPAN
|
#if LV_USE_SPAN
|
||||||
/*A line text can contain maximum num of span descriptor */
|
/*A line text can contain maximum num of span descriptor */
|
||||||
# define LV_SPAN_SNIPPET_STACK_SIZE 64
|
#define LV_SPAN_SNIPPET_STACK_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-----------
|
/*-----------
|
||||||
@@ -512,18 +512,18 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
#define LV_USE_THEME_DEFAULT 1
|
#define LV_USE_THEME_DEFAULT 1
|
||||||
#if LV_USE_THEME_DEFAULT
|
#if LV_USE_THEME_DEFAULT
|
||||||
|
|
||||||
/*0: Light mode; 1: Dark mode*/
|
/*0: Light mode; 1: Dark mode*/
|
||||||
# define LV_THEME_DEFAULT_DARK 0
|
#define LV_THEME_DEFAULT_DARK 0
|
||||||
|
|
||||||
/*1: Enable grow on press*/
|
/*1: Enable grow on press*/
|
||||||
# define LV_THEME_DEFAULT_GROW 1
|
#define LV_THEME_DEFAULT_GROW 1
|
||||||
|
|
||||||
/*Default transition time in [ms]*/
|
/*Default transition time in [ms]*/
|
||||||
# define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
||||||
#endif /*LV_USE_THEME_DEFAULT*/
|
#endif /*LV_USE_THEME_DEFAULT*/
|
||||||
|
|
||||||
/*A very simple theme that is a good starting point for a custom theme*/
|
/*A very simple theme that is a good starting point for a custom theme*/
|
||||||
#define LV_USE_THEME_BASIC 1
|
#define LV_USE_THEME_BASIC 1
|
||||||
|
|
||||||
/*A theme designed for monochrome displays*/
|
/*A theme designed for monochrome displays*/
|
||||||
#define LV_USE_THEME_MONO 1
|
#define LV_USE_THEME_MONO 1
|
||||||
@@ -574,8 +574,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
/*FreeType library*/
|
/*FreeType library*/
|
||||||
#define LV_USE_FREETYPE 0
|
#define LV_USE_FREETYPE 0
|
||||||
#if LV_USE_FREETYPE
|
#if LV_USE_FREETYPE
|
||||||
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
||||||
# define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
#define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*Rlottie library*/
|
/*Rlottie library*/
|
||||||
@@ -585,8 +585,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
|
|||||||
*Supports all major image formats so do not enable other image decoder with it*/
|
*Supports all major image formats so do not enable other image decoder with it*/
|
||||||
#define LV_USE_FFMPEG 0
|
#define LV_USE_FFMPEG 0
|
||||||
#if LV_USE_FFMPEG
|
#if LV_USE_FFMPEG
|
||||||
/*Dump input information to stderr*/
|
/*Dump input information to stderr*/
|
||||||
#define LV_FFMPEG_AV_DUMP_FORMAT 0
|
#define LV_FFMPEG_AV_DUMP_FORMAT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-----------
|
/*-----------
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
--suffix=none
|
--suffix=none
|
||||||
--preserve-date
|
--preserve-date
|
||||||
--formatted
|
--formatted
|
||||||
--exclude=lv_conf_internal.h
|
|
||||||
--exclude=../src/font/lv_font_montserrat_12.c
|
--exclude=../src/font/lv_font_montserrat_12.c
|
||||||
--exclude=../src/font/lv_font_montserrat_14.c
|
--exclude=../src/font/lv_font_montserrat_14.c
|
||||||
--exclude=../src/font/lv_font_montserrat_16.c
|
--exclude=../src/font/lv_font_montserrat_16.c
|
||||||
|
|||||||
@@ -29,38 +29,38 @@ fout.write(
|
|||||||
|
|
||||||
/* Handle special Kconfig options */
|
/* Handle special Kconfig options */
|
||||||
#ifndef LV_KCONFIG_IGNORE
|
#ifndef LV_KCONFIG_IGNORE
|
||||||
# include "lv_conf_kconfig.h"
|
#include "lv_conf_kconfig.h"
|
||||||
# ifdef CONFIG_LV_CONF_SKIP
|
#ifdef CONFIG_LV_CONF_SKIP
|
||||||
# define LV_CONF_SKIP
|
#define LV_CONF_SKIP
|
||||||
# endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*If "lv_conf.h" is available from here try to use it later.*/
|
/*If "lv_conf.h" is available from here try to use it later.*/
|
||||||
#ifdef __has_include
|
#ifdef __has_include
|
||||||
# if __has_include("lv_conf.h")
|
#if __has_include("lv_conf.h")
|
||||||
# ifndef LV_CONF_INCLUDE_SIMPLE
|
#ifndef LV_CONF_INCLUDE_SIMPLE
|
||||||
# define LV_CONF_INCLUDE_SIMPLE
|
#define LV_CONF_INCLUDE_SIMPLE
|
||||||
# endif
|
#endif
|
||||||
# endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*If lv_conf.h is not skipped include it*/
|
/*If lv_conf.h is not skipped include it*/
|
||||||
#ifndef LV_CONF_SKIP
|
#ifndef LV_CONF_SKIP
|
||||||
# ifdef LV_CONF_PATH /*If there is a path defined for lv_conf.h use it*/
|
#ifdef LV_CONF_PATH /*If there is a path defined for lv_conf.h use it*/
|
||||||
# define __LV_TO_STR_AUX(x) #x
|
#define __LV_TO_STR_AUX(x) #x
|
||||||
# define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
|
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
|
||||||
# include __LV_TO_STR(LV_CONF_PATH)
|
#include __LV_TO_STR(LV_CONF_PATH)
|
||||||
# undef __LV_TO_STR_AUX
|
#undef __LV_TO_STR_AUX
|
||||||
# undef __LV_TO_STR
|
#undef __LV_TO_STR
|
||||||
# elif defined(LV_CONF_INCLUDE_SIMPLE) /*Or simply include lv_conf.h is enabled*/
|
#elif defined(LV_CONF_INCLUDE_SIMPLE) /*Or simply include lv_conf.h is enabled*/
|
||||||
# include "lv_conf.h"
|
#include "lv_conf.h"
|
||||||
# else
|
#else
|
||||||
# include "../../lv_conf.h" /*Else assume lv_conf.h is next to the lvgl folder*/
|
#include "../../lv_conf.h" /*Else assume lv_conf.h is next to the lvgl folder*/
|
||||||
# endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LV_COLOR_DEPTH
|
#ifdef CONFIG_LV_COLOR_DEPTH
|
||||||
# define _LV_KCONFIG_PRESENT
|
#define _LV_KCONFIG_PRESENT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*----------------------------------
|
/*----------------------------------
|
||||||
@@ -82,10 +82,12 @@ for line in fin.read().splitlines():
|
|||||||
if '/*--END OF LV_CONF_H--*/' in line: break
|
if '/*--END OF LV_CONF_H--*/' in line: break
|
||||||
|
|
||||||
#Is there a #define in this line?
|
#Is there a #define in this line?
|
||||||
r = re.search(r'^[\s]*#[\s]*define[\s]+([^\s]+).*$', line) # \s means any white space character
|
r = re.search(r'^([\s]*)#[\s]*define[\s]+([^\s]+).*$', line) # \s means any white space character
|
||||||
|
|
||||||
if r:
|
if r:
|
||||||
name = r[1]
|
indent = r[1]
|
||||||
|
|
||||||
|
name = r[2]
|
||||||
name = re.sub('\(.*?\)', '', name, 1) #remove parentheses from macros. E.g. MY_FUNC(5) -> MY_FUNC
|
name = re.sub('\(.*?\)', '', name, 1) #remove parentheses from macros. E.g. MY_FUNC(5) -> MY_FUNC
|
||||||
|
|
||||||
name_and_value = re.sub('[\s]*#[\s]*define', '', line, 1)
|
name_and_value = re.sub('[\s]*#[\s]*define', '', line, 1)
|
||||||
@@ -99,17 +101,17 @@ for line in fin.read().splitlines():
|
|||||||
#3. In not Kconfig environment use the LVGL's default value
|
#3. In not Kconfig environment use the LVGL's default value
|
||||||
|
|
||||||
fout.write(
|
fout.write(
|
||||||
f'#ifndef {name}\n'
|
f'{indent}#ifndef {name}\n'
|
||||||
f'# ifdef _LV_KCONFIG_PRESENT\n'
|
f'{indent} #ifdef _LV_KCONFIG_PRESENT\n'
|
||||||
f'# ifdef CONFIG_{name.upper()}\n'
|
f'{indent} #ifdef CONFIG_{name.upper()}\n'
|
||||||
f'# define {name} CONFIG_{name.upper()}\n'
|
f'{indent} #define {name} CONFIG_{name.upper()}\n'
|
||||||
f'# else\n'
|
f'{indent} #else\n'
|
||||||
f'# define {name} 0\n'
|
f'{indent} #define {name} 0\n'
|
||||||
f'# endif\n'
|
f'{indent} #endif\n'
|
||||||
f'# else\n'
|
f'{indent} #else\n'
|
||||||
f'# define{name_and_value}\n'
|
f'{indent} #define{name_and_value}\n'
|
||||||
f'# endif\n'
|
f'{indent} #endif\n'
|
||||||
f'#endif\n'
|
f'{indent}#endif\n'
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
#1. Use the value if already set from lv_conf.h or anything else (i.e. do nothing)
|
#1. Use the value if already set from lv_conf.h or anything else (i.e. do nothing)
|
||||||
@@ -117,13 +119,13 @@ for line in fin.read().splitlines():
|
|||||||
#3. Use the LVGL's default value
|
#3. Use the LVGL's default value
|
||||||
|
|
||||||
fout.write(
|
fout.write(
|
||||||
f'#ifndef {name}\n'
|
f'{indent}#ifndef {name}\n'
|
||||||
f'# ifdef CONFIG_{name.upper()}\n'
|
f'{indent} #ifdef CONFIG_{name.upper()}\n'
|
||||||
f'# define {name} CONFIG_{name.upper()}\n'
|
f'{indent} #define {name} CONFIG_{name.upper()}\n'
|
||||||
f'# else\n'
|
f'{indent} #else\n'
|
||||||
f'# define{name_and_value}\n'
|
f'{indent} #define{name_and_value}\n'
|
||||||
f'# endif\n'
|
f'{indent} #endif\n'
|
||||||
f'#endif\n'
|
f'{indent}#endif\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
elif re.search('^ *typedef .*;.*$', line):
|
elif re.search('^ *typedef .*;.*$', line):
|
||||||
@@ -144,9 +146,9 @@ LV_EXPORT_CONST_INT(LV_DPI_DEF);
|
|||||||
|
|
||||||
/*If running without lv_conf.h add typdesf with default value*/
|
/*If running without lv_conf.h add typdesf with default value*/
|
||||||
#ifdef LV_CONF_SKIP
|
#ifdef LV_CONF_SKIP
|
||||||
# if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /*Disable warnings for Visual Studio*/
|
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /*Disable warnings for Visual Studio*/
|
||||||
# define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
# endif
|
#endif
|
||||||
#endif /*defined(LV_CONF_SKIP)*/
|
#endif /*defined(LV_CONF_SKIP)*/
|
||||||
|
|
||||||
#endif /*LV_CONF_INTERNAL_H*/
|
#endif /*LV_CONF_INTERNAL_H*/
|
||||||
|
|||||||
+1278
-1278
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user