fix(script): in lv_conf_internal fix some widget dependencies when using Kconfig (#3119)
* widgets: make dependencies internal handling consistent when using Kconfig * scripts/lv_conf_internal_gen.py: fix issue with widget with dependencies * scripts/lv_conf_internal_gen.py: allow to call it from other directory
This commit is contained in:
@@ -597,15 +597,23 @@
|
||||
/*Enable asserts if an operation is failed or an invalid data is found.
|
||||
*If LV_USE_LOG is enabled an error message will be printed on failure*/
|
||||
#ifndef LV_USE_ASSERT_NULL
|
||||
#ifdef CONFIG_LV_USE_ASSERT_NULL
|
||||
#define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_ASSERT_NULL
|
||||
#define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
|
||||
#else
|
||||
#define LV_USE_ASSERT_NULL 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
|
||||
#endif
|
||||
#endif
|
||||
#ifndef LV_USE_ASSERT_MALLOC
|
||||
#ifdef CONFIG_LV_USE_ASSERT_MALLOC
|
||||
#define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_ASSERT_MALLOC
|
||||
#define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
|
||||
#else
|
||||
#define LV_USE_ASSERT_MALLOC 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
|
||||
#endif
|
||||
@@ -1341,16 +1349,24 @@
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_DROPDOWN
|
||||
#ifdef CONFIG_LV_USE_DROPDOWN
|
||||
#define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_DROPDOWN
|
||||
#define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN
|
||||
#else
|
||||
#define LV_USE_DROPDOWN 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_IMG
|
||||
#ifdef CONFIG_LV_USE_IMG
|
||||
#define LV_USE_IMG CONFIG_LV_USE_IMG
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_IMG
|
||||
#define LV_USE_IMG CONFIG_LV_USE_IMG
|
||||
#else
|
||||
#define LV_USE_IMG 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_IMG 1 /*Requires: lv_label*/
|
||||
#endif
|
||||
@@ -1369,15 +1385,23 @@
|
||||
#endif
|
||||
#if LV_USE_LABEL
|
||||
#ifndef LV_LABEL_TEXT_SELECTION
|
||||
#ifdef CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
#define LV_LABEL_TEXT_SELECTION CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
#define LV_LABEL_TEXT_SELECTION CONFIG_LV_LABEL_TEXT_SELECTION
|
||||
#else
|
||||
#define LV_LABEL_TEXT_SELECTION 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
|
||||
#endif
|
||||
#endif
|
||||
#ifndef LV_LABEL_LONG_TXT_HINT
|
||||
#ifdef CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
#define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
#define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT
|
||||
#else
|
||||
#define LV_LABEL_LONG_TXT_HINT 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
|
||||
#endif
|
||||
@@ -1397,8 +1421,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_ROLLER
|
||||
#ifdef CONFIG_LV_USE_ROLLER
|
||||
#define LV_USE_ROLLER CONFIG_LV_USE_ROLLER
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_ROLLER
|
||||
#define LV_USE_ROLLER CONFIG_LV_USE_ROLLER
|
||||
#else
|
||||
#define LV_USE_ROLLER 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
||||
#endif
|
||||
@@ -1414,8 +1442,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_SLIDER
|
||||
#ifdef CONFIG_LV_USE_SLIDER
|
||||
#define LV_USE_SLIDER CONFIG_LV_USE_SLIDER
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_SLIDER
|
||||
#define LV_USE_SLIDER CONFIG_LV_USE_SLIDER
|
||||
#else
|
||||
#define LV_USE_SLIDER 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
||||
#endif
|
||||
@@ -1434,8 +1466,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef LV_USE_TEXTAREA
|
||||
#ifdef CONFIG_LV_USE_TEXTAREA
|
||||
#define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_USE_TEXTAREA
|
||||
#define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA
|
||||
#else
|
||||
#define LV_USE_TEXTAREA 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,11 @@ extern "C" {
|
||||
|
||||
#if LV_USE_IMG != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if LV_USE_LABEL == 0
|
||||
#error "lv_img: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1)"
|
||||
#endif
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../misc/lv_fs.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
|
||||
@@ -17,6 +17,11 @@ extern "C" {
|
||||
|
||||
#if LV_USE_ROLLER != 0
|
||||
|
||||
/*Testing of dependencies*/
|
||||
#if LV_USE_LABEL == 0
|
||||
#error "lv_roller: lv_label is required. Enable it in lv_conf.h (LV_USE_ROLLER 1)"
|
||||
#endif
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "lv_label.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user