diff --git a/lv_conf_template.h b/lv_conf_template.h index bfb04988f..bacbfd8e0 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -113,12 +113,12 @@ #define LV_OS_CUSTOM_INCLUDE #endif #if LV_USE_OS == LV_OS_FREERTOS - /* - * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM - * than unblocking a task using an intermediary object such as a binary semaphore. - * RTOS task notifications can only be used when there is only one task that can be the recipient of the event. - */ - #define LV_USE_FREERTOS_TASK_NOTIFY 1 + /* + * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM + * than unblocking a task using an intermediary object such as a binary semaphore. + * RTOS task notifications can only be used when there is only one task that can be the recipient of the event. + */ + #define LV_USE_FREERTOS_TASK_NOTIFY 1 #endif /*======================== @@ -538,7 +538,7 @@ #define LV_USE_MATRIX 0 /** Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default */ -#define LV_USE_PRIVATE_API 0 +#define LV_USE_PRIVATE_API 0 /*================== * FONT USAGE @@ -1102,7 +1102,7 @@ #endif /** Enable loading XML UIs runtime */ -#define LV_USE_XML 0 +#define LV_USE_XML 0 /*================== * DEVICES @@ -1297,9 +1297,9 @@ #define LV_USE_DEMO_VECTOR_GRAPHIC 0 /*E-bike demo with Lottie animations (if LV_USE_LOTTIE is enabled)*/ -#define LV_USE_DEMO_EBIKE 0 +#define LV_USE_DEMO_EBIKE 0 #if LV_USE_DEMO_EBIKE - #define LV_DEMO_EBIKE_PORTRAIT 0 /*0: for 480x270..480x320, 1: for 480x800..720x1280*/ + #define LV_DEMO_EBIKE_PORTRAIT 0 /*0: for 480x270..480x320, 1: for 480x800..720x1280*/ #endif /** High-resolution demo */ diff --git a/scripts/lv_conf_internal_gen.py b/scripts/lv_conf_internal_gen.py index 94d6ef86a..0b52de09e 100755 --- a/scripts/lv_conf_internal_gen.py +++ b/scripts/lv_conf_internal_gen.py @@ -16,6 +16,22 @@ if sys.version_info < (3,6,0): print("Python >=3.6 is required", file=sys.stderr) exit(1) +def check_for_tabs(file_path): + errors = [] + with open(file_path, 'r') as file: + for line_number, line in enumerate(file, 1): + if '\t' in line: + errors.append(f" {file_path}:{line_number}") + + if errors: + print(f"Tabs found in the following files:", file=sys.stderr) + for error in errors: + print(error, file=sys.stderr) + print("Please replace tabs with spaces.", file=sys.stderr) + exit(1) + +check_for_tabs(LV_CONF_TEMPLATE) + fin = open(LV_CONF_TEMPLATE) fout = open(LV_CONF_INTERNAL, "w", newline='') diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 3ed69a5ec..f0071467b 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -284,22 +284,22 @@ #endif #endif #if LV_USE_OS == LV_OS_FREERTOS - /* - * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM - * than unblocking a task using an intermediary object such as a binary semaphore. - * RTOS task notifications can only be used when there is only one task that can be the recipient of the event. - */ - #ifndef LV_USE_FREERTOS_TASK_NOTIFY - #ifdef LV_KCONFIG_PRESENT - #ifdef CONFIG_LV_USE_FREERTOS_TASK_NOTIFY - #define LV_USE_FREERTOS_TASK_NOTIFY CONFIG_LV_USE_FREERTOS_TASK_NOTIFY - #else - #define LV_USE_FREERTOS_TASK_NOTIFY 0 - #endif - #else - #define LV_USE_FREERTOS_TASK_NOTIFY 1 - #endif - #endif + /* + * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM + * than unblocking a task using an intermediary object such as a binary semaphore. + * RTOS task notifications can only be used when there is only one task that can be the recipient of the event. + */ + #ifndef LV_USE_FREERTOS_TASK_NOTIFY + #ifdef LV_KCONFIG_PRESENT + #ifdef CONFIG_LV_USE_FREERTOS_TASK_NOTIFY + #define LV_USE_FREERTOS_TASK_NOTIFY CONFIG_LV_USE_FREERTOS_TASK_NOTIFY + #else + #define LV_USE_FREERTOS_TASK_NOTIFY 0 + #endif + #else + #define LV_USE_FREERTOS_TASK_NOTIFY 1 + #endif + #endif #endif /*======================== @@ -1531,7 +1531,7 @@ #ifdef CONFIG_LV_USE_PRIVATE_API #define LV_USE_PRIVATE_API CONFIG_LV_USE_PRIVATE_API #else - #define LV_USE_PRIVATE_API 0 + #define LV_USE_PRIVATE_API 0 #endif #endif @@ -3507,7 +3507,7 @@ #ifdef CONFIG_LV_USE_XML #define LV_USE_XML CONFIG_LV_USE_XML #else - #define LV_USE_XML 0 + #define LV_USE_XML 0 #endif #endif @@ -4176,17 +4176,17 @@ #ifdef CONFIG_LV_USE_DEMO_EBIKE #define LV_USE_DEMO_EBIKE CONFIG_LV_USE_DEMO_EBIKE #else - #define LV_USE_DEMO_EBIKE 0 + #define LV_USE_DEMO_EBIKE 0 #endif #endif #if LV_USE_DEMO_EBIKE - #ifndef LV_DEMO_EBIKE_PORTRAIT - #ifdef CONFIG_LV_DEMO_EBIKE_PORTRAIT - #define LV_DEMO_EBIKE_PORTRAIT CONFIG_LV_DEMO_EBIKE_PORTRAIT - #else - #define LV_DEMO_EBIKE_PORTRAIT 0 /*0: for 480x270..480x320, 1: for 480x800..720x1280*/ - #endif - #endif + #ifndef LV_DEMO_EBIKE_PORTRAIT + #ifdef CONFIG_LV_DEMO_EBIKE_PORTRAIT + #define LV_DEMO_EBIKE_PORTRAIT CONFIG_LV_DEMO_EBIKE_PORTRAIT + #else + #define LV_DEMO_EBIKE_PORTRAIT 0 /*0: for 480x270..480x320, 1: for 480x800..720x1280*/ + #endif + #endif #endif /** High-resolution demo */