From 47e29bed8e4b4e881fa6cc710968f8ebc4b03a35 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 22 Dec 2019 23:21:09 +0100 Subject: [PATCH 1/5] lv_mem: fix defines for 64 bit environment --- src/lv_misc/lv_mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index 9b7345ab3..9e18310fe 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -23,7 +23,7 @@ #define LV_MEM_ADD_JUNK 0 #endif -#ifdef LV_MEM_ENV64 +#ifdef LV_ARCH_64 #define MEM_UNIT uint64_t #else #define MEM_UNIT uint32_t @@ -128,7 +128,7 @@ void * lv_mem_alloc(size_t size) return &zero_mem; } -#ifdef LV_MEM_ENV64 +#ifdef LV_ARCH_64 /*Round the size up to 8*/ if(size & 0x7) { size = size & (~0x7); @@ -447,7 +447,7 @@ static void * ent_alloc(lv_mem_ent_t * e, size_t size) */ static void ent_trunc(lv_mem_ent_t * e, size_t size) { -#ifdef LV_MEM_ENV64 +#ifdef LV_ARCH_64 /*Round the size up to 8*/ if(size & 0x7) { size = size & (~0x7); From 68984828c3ad98f1f4f21d5cd84b2e760b9af478 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 26 Dec 2019 02:49:30 +0100 Subject: [PATCH 2/5] add tests and lv_conf_internal.h to use LV_CONF_PATH --- lvgl.mk | 14 +- src/{lv_conf_checker.h => lv_conf_internal.h} | 26 +- src/lv_core/lv_core.mk | 6 +- src/lv_core/lv_group.h | 5 - src/lv_core/lv_obj.h | 6 +- src/lv_draw/lv_draw.h | 6 +- src/lv_draw/lv_draw.mk | 6 +- src/lv_draw/lv_img_decoder.h | 6 +- src/lv_font/lv_font.h | 7 +- src/lv_font/lv_font.mk | 6 +- src/lv_font/lv_font_fmt_txt.h | 6 - src/lv_font/lv_symbol_def.h | 7 +- src/lv_hal/lv_hal.mk | 6 +- src/lv_hal/lv_hal_indev.h | 6 +- src/lv_hal/lv_hal_tick.c | 6 - src/lv_hal/lv_hal_tick.h | 7 +- src/lv_misc/lv_anim.h | 6 +- src/lv_misc/lv_area.c | 6 +- src/lv_misc/lv_area.h | 6 +- src/lv_misc/lv_bidi.h | 6 +- src/lv_misc/lv_color.h | 6 +- src/lv_misc/lv_fs.h | 9 +- src/lv_misc/lv_gc.h | 7 - src/lv_misc/lv_log.h | 6 +- src/lv_misc/lv_mem.h | 6 +- src/lv_misc/lv_misc.mk | 6 +- src/lv_misc/lv_printf.h | 7 +- src/lv_misc/lv_task.h | 6 +- src/lv_misc/lv_txt.h | 6 +- src/lv_objx/lv_arc.h | 6 +- src/lv_objx/lv_bar.h | 6 +- src/lv_objx/lv_btn.h | 6 +- src/lv_objx/lv_btnm.h | 6 +- src/lv_objx/lv_calendar.h | 6 +- src/lv_objx/lv_canvas.h | 6 +- src/lv_objx/lv_cb.h | 6 +- src/lv_objx/lv_chart.h | 6 +- src/lv_objx/lv_cont.h | 6 +- src/lv_objx/lv_cpicker.h | 6 +- src/lv_objx/lv_ddlist.h | 6 +- src/lv_objx/lv_gauge.h | 6 +- src/lv_objx/lv_img.h | 6 +- src/lv_objx/lv_imgbtn.h | 6 +- src/lv_objx/lv_kb.h | 6 +- src/lv_objx/lv_label.h | 6 +- src/lv_objx/lv_led.h | 6 +- src/lv_objx/lv_line.h | 6 +- src/lv_objx/lv_list.h | 6 +- src/lv_objx/lv_lmeter.h | 6 +- src/lv_objx/lv_mbox.h | 6 +- src/lv_objx/lv_objmask.h | 6 +- src/lv_objx/lv_objx.mk | 6 +- src/lv_objx/lv_objx_templ.h | 6 +- src/lv_objx/lv_page.h | 6 +- src/lv_objx/lv_preload.h | 6 +- src/lv_objx/lv_roller.h | 6 +- src/lv_objx/lv_slider.h | 6 +- src/lv_objx/lv_spinbox.h | 6 +- src/lv_objx/lv_sw.h | 6 +- src/lv_objx/lv_ta.h | 6 +- src/lv_objx/lv_table.h | 6 +- src/lv_objx/lv_tabview.h | 6 +- src/lv_objx/lv_tileview.h | 6 +- src/lv_objx/lv_win.h | 6 +- src/lv_themes/lv_theme.h | 6 +- src/lv_themes/lv_theme_alien.h | 6 +- src/lv_themes/lv_theme_default.h | 6 +- src/lv_themes/lv_theme_material.h | 6 +- src/lv_themes/lv_theme_mono.h | 6 +- src/lv_themes/lv_theme_nemo.h | 6 +- src/lv_themes/lv_theme_night.h | 6 +- src/lv_themes/lv_theme_templ.h | 6 +- src/lv_themes/lv_theme_zen.h | 6 +- src/lv_themes/lv_themes.mk | 6 +- tests/Makefile | 45 +++ tests/build.py | 325 ++++++++++++++++++ tests/lv_test_conf.h | 46 +++ tests/test_main.c | 16 + 78 files changed, 538 insertions(+), 373 deletions(-) rename src/{lv_conf_checker.h => lv_conf_internal.h} (98%) create mode 100644 tests/Makefile create mode 100644 tests/build.py create mode 100644 tests/lv_test_conf.h create mode 100644 tests/test_main.c diff --git a/lvgl.mk b/lvgl.mk index 830fe1194..1d2ebf1db 100644 --- a/lvgl.mk +++ b/lvgl.mk @@ -1,8 +1,8 @@ -include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk -include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk -include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk -include $(LVGL_DIR)/lvgl/src/lv_font/lv_font.mk -include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk -include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk -include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk +include $(LVGL_DIR)/src/lv_core/lv_core.mk +include $(LVGL_DIR)/src/lv_hal/lv_hal.mk +include $(LVGL_DIR)/src/lv_objx/lv_objx.mk +include $(LVGL_DIR)/src/lv_font/lv_font.mk +include $(LVGL_DIR)/src/lv_misc/lv_misc.mk +include $(LVGL_DIR)/src/lv_themes/lv_themes.mk +include $(LVGL_DIR)/src/lv_draw/lv_draw.mk diff --git a/src/lv_conf_checker.h b/src/lv_conf_internal.h similarity index 98% rename from src/lv_conf_checker.h rename to src/lv_conf_internal.h index 4b0d9a67d..5de614627 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_internal.h @@ -1,15 +1,25 @@ /** * GENERATED FILE, DO NOT EDIT IT! - * @file lv_conf_checker.h + * @file lv_conf_internal.h * Make sure all the defines of lv_conf.h have a default value **/ -#ifndef LV_CONF_CHECKER_H -#define LV_CONF_CHECKER_H +#ifndef LV_CONF_INTERNAL_H +#define LV_CONF_INTERNAL_H /* clang-format off */ #include +#ifdef LV_CONF_PATH +#define __LV_TO_STR_AUX(x) #x +#define __LV_TO_STR(x) __LV_TO_STR_AUX(x) +#include __LV_TO_STR(LV_CONF_PATH) +#undef __LV_TO_STR_AUX +#undef __LV_TO_STR +#else +#include "../../lv_conf.h" +#endif + /*==================== Graphical settings *====================*/ @@ -218,16 +228,6 @@ * Image decoder and cache *========================*/ -/* 1: Enable indexed (palette) images */ -#ifndef LV_IMG_CF_INDEXED -#define LV_IMG_CF_INDEXED 1 -#endif - -/* 1: Enable alpha indexed images */ -#ifndef LV_IMG_CF_ALPHA -#define LV_IMG_CF_ALPHA 1 -#endif - /* Default image cache size. Image caching keeps the images opened. * If only the built-in image formats are used there is no real advantage of caching. * (I.e. no new image decoder is added) diff --git a/src/lv_core/lv_core.mk b/src/lv_core/lv_core.mk index eb1c5e0ca..b07d23290 100644 --- a/src/lv_core/lv_core.mk +++ b/src/lv_core/lv_core.mk @@ -6,7 +6,7 @@ CSRCS += lv_refr.c CSRCS += lv_style.c CSRCS += lv_debug.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_core -VPATH += :$(LVGL_DIR)/lvgl/src/lv_core +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_core +VPATH += :$(LVGL_DIR)/src/lv_core -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_core" +CFLAGS += "-I$(LVGL_DIR)/src/lv_core" diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index c27f76939..19a8b4802 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -13,11 +13,6 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif #include "lv_obj.h" diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2854c7c9b..ff3d0d6c4 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index 8beabd53b..c9f0339a6 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include "../lv_core/lv_style.h" #include "../lv_misc/lv_txt.h" diff --git a/src/lv_draw/lv_draw.mk b/src/lv_draw/lv_draw.mk index ea09d6cac..133a4a45a 100644 --- a/src/lv_draw/lv_draw.mk +++ b/src/lv_draw/lv_draw.mk @@ -10,7 +10,7 @@ CSRCS += lv_img_decoder.c CSRCS += lv_img_cache.c CSRCS += lv_img_buf.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw -VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_draw +VPATH += :$(LVGL_DIR)/src/lv_draw -CFLAGS += "-I$(LVGL_DIR)lvgl/src/lv_draw" +CFLAGS += "-I$(LVGL_DIR)/src/lv_draw" diff --git a/src/lv_draw/lv_img_decoder.h b/src/lv_draw/lv_img_decoder.h index a1713e0c0..66918189f 100644 --- a/src/lv_draw/lv_img_decoder.h +++ b/src/lv_draw/lv_img_decoder.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include "lv_img_buf.h" diff --git a/src/lv_font/lv_font.h b/src/lv_font/lv_font.h index 27936274e..392516d9f 100644 --- a/src/lv_font/lv_font.h +++ b/src/lv_font/lv_font.h @@ -13,12 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - +#include "../lv_conf_internal.h" #include #include #include diff --git a/src/lv_font/lv_font.mk b/src/lv_font/lv_font.mk index 836d86a6c..14477ffb6 100644 --- a/src/lv_font/lv_font.mk +++ b/src/lv_font/lv_font.mk @@ -6,7 +6,7 @@ CSRCS += lv_font_roboto_22.c CSRCS += lv_font_roboto_28.c CSRCS += lv_font_unscii_8.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_font -VPATH += :$(LVGL_DIR)/lvgl/src/lv_font +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_font +VPATH += :$(LVGL_DIR)/src/lv_font -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_font" +CFLAGS += "-I$(LVGL_DIR)/src/lv_font" diff --git a/src/lv_font/lv_font_fmt_txt.h b/src/lv_font/lv_font_fmt_txt.h index 46b9d3985..1bae3f7f6 100644 --- a/src/lv_font/lv_font_fmt_txt.h +++ b/src/lv_font/lv_font_fmt_txt.h @@ -13,12 +13,6 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - #include #include #include diff --git a/src/lv_font/lv_symbol_def.h b/src/lv_font/lv_symbol_def.h index 6fe823b72..43a6a29ca 100644 --- a/src/lv_font/lv_symbol_def.h +++ b/src/lv_font/lv_symbol_def.h @@ -5,11 +5,8 @@ #ifdef __cplusplus extern "C" { #endif -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif + +#include "../lv_conf_internal.h" /* In the font converter use this list as range: 61441, 61448, 61451, 61452, 61452, 61453, 61457, 61459, 61461, 61465, diff --git a/src/lv_hal/lv_hal.mk b/src/lv_hal/lv_hal.mk index 05af078ce..20bfb7d18 100644 --- a/src/lv_hal/lv_hal.mk +++ b/src/lv_hal/lv_hal.mk @@ -2,7 +2,7 @@ CSRCS += lv_hal_disp.c CSRCS += lv_hal_indev.c CSRCS += lv_hal_tick.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_hal -VPATH += :$(LVGL_DIR)/lvgl/src/lv_hal +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_hal +VPATH += :$(LVGL_DIR)/src/lv_hal -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_hal" +CFLAGS += "-I$(LVGL_DIR)/src/lv_hal" diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index ee39e6e95..38b9b5214 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -15,11 +15,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_hal/lv_hal_tick.c b/src/lv_hal/lv_hal_tick.c index cdfec32c3..388cdf63c 100644 --- a/src/lv_hal/lv_hal_tick.c +++ b/src/lv_hal/lv_hal_tick.c @@ -6,12 +6,6 @@ /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - #include "lv_hal_tick.h" #include diff --git a/src/lv_hal/lv_hal_tick.h b/src/lv_hal/lv_hal_tick.h index a4de881f5..f99d5188c 100644 --- a/src/lv_hal/lv_hal_tick.h +++ b/src/lv_hal/lv_hal_tick.h @@ -13,11 +13,8 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" + #include #include diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 95fd6acea..a0f94b73d 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index 174e4f860..0c43b3a5d 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -6,11 +6,7 @@ /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include "lv_area.h" #include "lv_math.h" diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index 375fa009f..bff022309 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -13,14 +13,10 @@ extern "C" { /********************* * INCLUDES *********************/ +#include "../lv_conf_internal.h" #include #include #include -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif /********************* * DEFINES diff --git a/src/lv_misc/lv_bidi.h b/src/lv_misc/lv_bidi.h index dfa6565bd..dd9bd2bb6 100644 --- a/src/lv_misc/lv_bidi.h +++ b/src/lv_misc/lv_bidi.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index 4ba833d8c..0dce299f8 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" /*Error checking*/ #if LV_COLOR_DEPTH == 24 diff --git a/src/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h index f18242820..9731458dd 100644 --- a/src/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_FILESYSTEM @@ -34,8 +30,9 @@ extern "C" { /********************** * TYPEDEFS **********************/ + /** - * Errors in the filesystem module. + * Errors in the file system module. */ enum { LV_FS_RES_OK = 0, diff --git a/src/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h index a2acec5ab..a706f2c1c 100644 --- a/src/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -13,13 +13,6 @@ extern "C" { /********************* * INCLUDES *********************/ - -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - #include #include #include "lv_mem.h" diff --git a/src/lv_misc/lv_log.h b/src/lv_misc/lv_log.h index 62c613b43..d43db790b 100644 --- a/src/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include /********************* diff --git a/src/lv_misc/lv_mem.h b/src/lv_misc/lv_mem.h index 0aba248ce..729cd2465 100644 --- a/src/lv_misc/lv_mem.h +++ b/src/lv_misc/lv_mem.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_misc/lv_misc.mk b/src/lv_misc/lv_misc.mk index d0b682ab2..29fb82a0e 100644 --- a/src/lv_misc/lv_misc.mk +++ b/src/lv_misc/lv_misc.mk @@ -15,7 +15,7 @@ CSRCS += lv_async.c CSRCS += lv_printf.c CSRCS += lv_bidi.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_misc -VPATH += :$(LVGL_DIR)/lvgl/src/lv_misc +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_misc +VPATH += :$(LVGL_DIR)/src/lv_misc -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_misc" +CFLAGS += "-I$(LVGL_DIR)/src/lv_misc" diff --git a/src/lv_misc/lv_printf.h b/src/lv_misc/lv_printf.h index b3b8598dd..4a8bd609b 100644 --- a/src/lv_misc/lv_printf.h +++ b/src/lv_misc/lv_printf.h @@ -37,12 +37,7 @@ extern "C" { #endif - -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_SPRINTF_CUSTOM == 0 diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 05ff02b60..a48b9c29c 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -14,11 +14,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index 6dbce5d44..1a6ff4fc8 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include #include "lv_area.h" diff --git a/src/lv_objx/lv_arc.h b/src/lv_objx/lv_arc.h index 89800958b..1579f8baa 100644 --- a/src/lv_objx/lv_arc.h +++ b/src/lv_objx/lv_arc.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_ARC != 0 diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index 86747c43c..d0b02e2c0 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_BAR != 0 diff --git a/src/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h index f7bd85faa..d68392b84 100644 --- a/src/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_BTN != 0 diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 44bc4efbb..3e91f2b23 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_BTNM != 0 diff --git a/src/lv_objx/lv_calendar.h b/src/lv_objx/lv_calendar.h index 21317bbd7..b415aa344 100644 --- a/src/lv_objx/lv_calendar.h +++ b/src/lv_objx/lv_calendar.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CALENDAR != 0 diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 9a648e5c1..c25541427 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CANVAS != 0 diff --git a/src/lv_objx/lv_cb.h b/src/lv_objx/lv_cb.h index a6b1e74ad..57aa80478 100644 --- a/src/lv_objx/lv_cb.h +++ b/src/lv_objx/lv_cb.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CB != 0 diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index e775970f9..4af6b6f3e 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CHART != 0 diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index a2346c6ff..5b29c073a 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CONT != 0 diff --git a/src/lv_objx/lv_cpicker.h b/src/lv_objx/lv_cpicker.h index a9feee5ae..70193f0ea 100644 --- a/src/lv_objx/lv_cpicker.h +++ b/src/lv_objx/lv_cpicker.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_CPICKER != 0 diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index e4d918b17..43c802ccf 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_DDLIST != 0 diff --git a/src/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h index a80ad1df2..012cdfa4b 100644 --- a/src/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_GAUGE != 0 diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index a784e8711..f4fcc7a04 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_IMG != 0 diff --git a/src/lv_objx/lv_imgbtn.h b/src/lv_objx/lv_imgbtn.h index b28b74ff4..37be25d6d 100644 --- a/src/lv_objx/lv_imgbtn.h +++ b/src/lv_objx/lv_imgbtn.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_IMGBTN != 0 diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 8e25eab7a..97de1ae5c 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_KB != 0 diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 976854235..287888658 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_LABEL != 0 diff --git a/src/lv_objx/lv_led.h b/src/lv_objx/lv_led.h index a0c9125e8..abe5a627c 100644 --- a/src/lv_objx/lv_led.h +++ b/src/lv_objx/lv_led.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_LED != 0 diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index cfea7368e..7c456596e 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_LINE != 0 diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index e17bc87d5..12f3f7d24 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_LIST != 0 diff --git a/src/lv_objx/lv_lmeter.h b/src/lv_objx/lv_lmeter.h index 6deac8ce8..bf6ce959e 100644 --- a/src/lv_objx/lv_lmeter.h +++ b/src/lv_objx/lv_lmeter.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_LMETER != 0 diff --git a/src/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h index 2068b3735..5d194de22 100644 --- a/src/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_MBOX != 0 diff --git a/src/lv_objx/lv_objmask.h b/src/lv_objx/lv_objmask.h index 18a0506f7..71c1371d7 100644 --- a/src/lv_objx/lv_objmask.h +++ b/src/lv_objx/lv_objmask.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_OBJMASK != 0 diff --git a/src/lv_objx/lv_objx.mk b/src/lv_objx/lv_objx.mk index 5879b420e..ae8d8e4e9 100644 --- a/src/lv_objx/lv_objx.mk +++ b/src/lv_objx/lv_objx.mk @@ -32,7 +32,7 @@ CSRCS += lv_sw.c CSRCS += lv_win.c CSRCS += lv_objmask.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_objx -VPATH += :$(LVGL_DIR)/lvgl/src/lv_objx +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_objx +VPATH += :$(LVGL_DIR)/src/lv_objx -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_objx" +CFLAGS += "-I$(LVGL_DIR)/src/lv_objx" diff --git a/src/lv_objx/lv_objx_templ.h b/src/lv_objx/lv_objx_templ.h index 82918253b..fa5a32cf1 100644 --- a/src/lv_objx/lv_objx_templ.h +++ b/src/lv_objx/lv_objx_templ.h @@ -20,11 +20,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_TEMPL != 0 diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 86e1b0a4d..f11ce0158 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_PAGE != 0 diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 22b87f32f..03a34e4f9 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_PRELOAD != 0 diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index 6375d34c1..2d25ab520 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_ROLLER != 0 diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 34398889c..a8e634442 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_SLIDER != 0 diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index ea60169e3..d22be5622 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_SPINBOX != 0 diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index da988b0c8..480ff4ed3 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_SW != 0 diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index afbb94bc2..8ad840c80 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_TA != 0 diff --git a/src/lv_objx/lv_table.h b/src/lv_objx/lv_table.h index d6a0be7d1..e6856e08e 100644 --- a/src/lv_objx/lv_table.h +++ b/src/lv_objx/lv_table.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_TABLE != 0 diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index e1383140b..826226e1e 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_TABVIEW != 0 diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index aca10f76a..cdef9b003 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_TILEVIEW != 0 diff --git a/src/lv_objx/lv_win.h b/src/lv_objx/lv_win.h index 28560cf6c..0603f567c 100644 --- a/src/lv_objx/lv_win.h +++ b/src/lv_objx/lv_win.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_WIN != 0 diff --git a/src/lv_themes/lv_theme.h b/src/lv_themes/lv_theme.h index 28b532c61..f277eb076 100644 --- a/src/lv_themes/lv_theme.h +++ b/src/lv_themes/lv_theme.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #include "../lv_core/lv_style.h" #include "../lv_core/lv_group.h" diff --git a/src/lv_themes/lv_theme_alien.h b/src/lv_themes/lv_theme_alien.h index a3d5851fb..4498db64c 100644 --- a/src/lv_themes/lv_theme_alien.h +++ b/src/lv_themes/lv_theme_alien.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_ALIEN diff --git a/src/lv_themes/lv_theme_default.h b/src/lv_themes/lv_theme_default.h index 4a2ecc080..dfd7b62f8 100644 --- a/src/lv_themes/lv_theme_default.h +++ b/src/lv_themes/lv_theme_default.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_DEFAULT diff --git a/src/lv_themes/lv_theme_material.h b/src/lv_themes/lv_theme_material.h index 1f2e1b7e1..7915f54a6 100644 --- a/src/lv_themes/lv_theme_material.h +++ b/src/lv_themes/lv_theme_material.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_MATERIAL diff --git a/src/lv_themes/lv_theme_mono.h b/src/lv_themes/lv_theme_mono.h index 6730d1e9b..a24b1bf48 100644 --- a/src/lv_themes/lv_theme_mono.h +++ b/src/lv_themes/lv_theme_mono.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_MONO diff --git a/src/lv_themes/lv_theme_nemo.h b/src/lv_themes/lv_theme_nemo.h index 5464cbfd1..5bf74c578 100644 --- a/src/lv_themes/lv_theme_nemo.h +++ b/src/lv_themes/lv_theme_nemo.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_NEMO diff --git a/src/lv_themes/lv_theme_night.h b/src/lv_themes/lv_theme_night.h index a009bed00..4a4ea0c4c 100644 --- a/src/lv_themes/lv_theme_night.h +++ b/src/lv_themes/lv_theme_night.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_NIGHT diff --git a/src/lv_themes/lv_theme_templ.h b/src/lv_themes/lv_theme_templ.h index 7d1e3ec69..020eacade 100644 --- a/src/lv_themes/lv_theme_templ.h +++ b/src/lv_themes/lv_theme_templ.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_TEMPL diff --git a/src/lv_themes/lv_theme_zen.h b/src/lv_themes/lv_theme_zen.h index 4a497fe3a..995038c1f 100644 --- a/src/lv_themes/lv_theme_zen.h +++ b/src/lv_themes/lv_theme_zen.h @@ -13,11 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif +#include "../lv_conf_internal.h" #if LV_USE_THEME_ZEN diff --git a/src/lv_themes/lv_themes.mk b/src/lv_themes/lv_themes.mk index fce41e4e1..ee87a0943 100644 --- a/src/lv_themes/lv_themes.mk +++ b/src/lv_themes/lv_themes.mk @@ -8,7 +8,7 @@ CSRCS += lv_theme_material.c CSRCS += lv_theme_nemo.c CSRCS += lv_theme_mono.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_themes -VPATH += :$(LVGL_DIR)/lvgl/src/lv_themes +DEPPATH += --dep-path $(LVGL_DIR)/src/lv_themes +VPATH += :$(LVGL_DIR)/src/lv_themes -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_themes" +CFLAGS += "-I$(LVGL_DIR)/src/lv_themes" diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 000000000..5fc4b6732 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,45 @@ +# +# Makefile +# +CC ?= gcc +LVGL_DIR ?= ${shell pwd}/.. + +WARNINGS ?= -Wall -Wextra +OPTIMIZATION ?= -O3 -g0 + + +CFLAGS ?= -I$(LVGL_DIR)/ $(DEFINES) $(WARNINGS) $(OPTIMIZATION) -I$(LVGL_DIR) -I. + +LDFLAGS ?= +BIN ?= demo + + +#Collect the files to compile +MAINSRC = ./test_main.c + +include $(LVGL_DIR)/lvgl.mk + +OBJEXT ?= .o + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) + +## MAINOBJ -> OBJFILES + +all: default + +%.o: %.c + @$(CC) $(CFLAGS) -c $< -o $@ + @echo "CC $<" + +default: $(AOBJS) $(COBJS) $(MAINOBJ) + $(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS) + +clean: + rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ) + diff --git a/tests/build.py b/tests/build.py new file mode 100644 index 000000000..46e8d5756 --- /dev/null +++ b/tests/build.py @@ -0,0 +1,325 @@ +import os + +warnings = '"-Wall"' +base_defines = '"-DLV_CONF_PATH=tests/lv_test_conf.h -DLV_BUILD_TEST"' +optimization = '"-O3 -g0"' + + +def build(name, defines): + global warnings, base_defines, optimization + + print("=============================") + print(name) + print("=============================") + + d_all = base_defines[:-1] + " "; + + for d in defines: + d_all += " -D" + d + "=" + str(defines[d]) + + d_all += '"' + cmd = "make -j8 BIN=test.bin DEFINES=" + d_all + " WARNINGS=" + warnings + " OPTIMIZATION=" + optimization + + print("---------------------------") + print("Clean") + print("---------------------------") + os.system("make clean") + os.system("rm -f ./test.bin") + print("---------------------------") + print("Build") + print("---------------------------") + ret = os.system(cmd) + if(ret != 0): + print("BUILD ERROR! (error code " + str(ret) + ")") + exit(1) + + print("---------------------------") + print("Run") + print("---------------------------") + ret = os.system("./test.bin") + if(ret != 0): + print("RUN ERROR! (error code " + str(ret) + ")") + exit(1) + + print("---------------------------") + print("Finished") + print("---------------------------") + + +minimal_monochrome = { + "LV_DPI":40, + "LV_MEM_SIZE":4*1024, + "LV_HOR_RES_MAX":128, + "LV_VER_RES_MAX":64, + "LV_COLOR_DEPTH":1, + "LV_USE_GROUP":0, + "LV_USE_ANIMATION":0, + "LV_ANTIALAIS":0, + "LV_GPU":0, + "LV_USE_FILESYSTEM":0, + "LV_USE_USER_DATA":0, + "LV_USE_LOG":0, + "LV_USE_DEBUG":0, + "LV_THEME_LIVE_UPDATE":0, + "LV_FONT_ROBOTO_12":0, + "LV_FONT_ROBOTO_16":0, + "LV_FONT_ROBOTO_22":0, + "LV_FONT_ROBOTO_28":0, + "LV_FONT_ROBOTO_12_SUBPX":0, + "LV_FONT_ROBOTO_28_COMPRESSED":0, + "LV_FONT_UNSCII_8":1, + "LV_FONT_DEFAULT":"\\\"&lv_font_unscii_8\\\"", + "LV_USE_BIDI": 0, + "LV_USE_OBJ_REALIGN": 0, + "LV_USE_ARC":0, + "LV_USE_BAR":1, + "LV_USE_BTN":1, + "LV_USE_BTNM":0, + "LV_USE_CALENDAR":0, + "LV_USE_CANVAS":0, + "LV_USE_CB":0, + "LV_USE_CHART":0, + "LV_USE_CONT":1, + "LV_USE_CPICKER":0, + "LV_USE_DDLIST":0, + "LV_USE_GAUGE":0, + "LV_USE_IMG":1, + "LV_USE_IMGBTN":0, + "LV_USE_KB":0, + "LV_USE_LABEL":1, + "LV_USE_LED":0, + "LV_USE_LINE":0, + "LV_USE_LIST":0, + "LV_USE_LMETER":0, + "LV_USE_OBJMASK":0, + "LV_USE_MBOX":0, + "LV_USE_PAGE":0, + "LV_USE_PRELOAD":0, + "LV_USE_ROLLER":0, + "LV_USE_SLIDER":0, + "LV_USE_SPINBOX":0, + "LV_USE_SW":0, + "LV_USE_TA":0, + "LV_USE_TABLE":0, + "LV_USE_TABVIEW":0, + "LV_USE_TILEVIEW":0, + "LV_USE_WIN":0 +} + +all_obj_minimal_features = { + "LV_DPI":60, + "LV_MEM_SIZE":12*1024, + "LV_HOR_RES_MAX":320, + "LV_VER_RES_MAX":240, + "LV_COLOR_DEPTH":8, + "LV_USE_GROUP":0, + "LV_USE_ANIMATION":0, + "LV_ANTIALAIS":0, + "LV_GPU":0, + "LV_USE_FILESYSTEM":0, + "LV_USE_USER_DATA":0, + "LV_USE_LOG":0, + "LV_USE_DEBUG":0, + "LV_THEME_LIVE_UPDATE":0, + "LV_FONT_ROBOTO_12":0, + "LV_FONT_ROBOTO_16":1, + "LV_FONT_ROBOTO_22":0, + "LV_FONT_ROBOTO_28":0, + "LV_FONT_ROBOTO_12_SUBPX":0, + "LV_FONT_ROBOTO_28_COMPRESSED":0, + "LV_FONT_UNSCII_8":0, + "LV_FONT_DEFAULT":"\\\"&lv_font_roboto_16\\\"", + "LV_USE_BIDI": 0, + "LV_USE_OBJ_REALIGN": 0, + "LV_USE_EXT_CLICK_AREA":"LV_EXT_CLICK_AREA_TINY", + "LV_USE_ARC":1, + "LV_USE_BAR":1, + "LV_USE_BTN":1, + "LV_USE_BTNM":1, + "LV_USE_CALENDAR":1, + "LV_USE_CANVAS":1, + "LV_USE_CB":1, + "LV_USE_CHART":1, + "LV_USE_CONT":1, + "LV_USE_CPICKER":1, + "LV_USE_DDLIST":1, + "LV_USE_GAUGE":1, + "LV_USE_IMG":1, + "LV_USE_IMGBTN":1, + "LV_USE_KB":1, + "LV_USE_LABEL":1, + "LV_USE_LED":1, + "LV_USE_LINE":1, + "LV_USE_LIST":1, + "LV_USE_LMETER":1, + "LV_USE_OBJMASK":1, + "LV_USE_MBOX":1, + "LV_USE_PAGE":1, + "LV_USE_PRELOAD":0, #Disabled beacsue needs anim + "LV_USE_ROLLER":1, + "LV_USE_SLIDER":1, + "LV_USE_SPINBOX":1, + "LV_USE_SW":1, + "LV_USE_TA":1, + "LV_USE_TABLE":1, + "LV_USE_TABVIEW":1, + "LV_USE_TILEVIEW":1, + "LV_USE_WIN":1 +} + +all_obj_all_features = { + "LV_DPI":100, + "LV_MEM_SIZE":32*1024, + "LV_HOR_RES_MAX":480, + "LV_VER_RES_MAX":320, + "LV_COLOR_DEPTH":16, + "LV_USE_GROUP":1, + "LV_USE_ANIMATION":1, + "LV_ANTIALAIS":1, + "LV_GPU":1, + "LV_USE_FILESYSTEM":1, + "LV_USE_USER_DATA":1, + "LV_USE_LOG":1, + "LV_THEME_LIVE_UPDATE":1, + "LV_USE_THEME_TEMPL":1, + "LV_USE_THEME_DEFAULT":1, + "LV_USE_THEME_ALIEN":1, + "LV_USE_THEME_NIGHT":1, + "LV_USE_THEME_MONO":1, + "LV_USE_THEME_MATERIAL":1, + "LV_USE_THEME_ZEN":1, + "LV_USE_THEME_NEMO": 1, + "LV_FONT_ROBOTO_12":1, + "LV_FONT_ROBOTO_16":1, + "LV_FONT_ROBOTO_22":1, + "LV_FONT_ROBOTO_28":1, + "LV_FONT_ROBOTO_12_SUBPX":1, + "LV_FONT_ROBOTO_28_COMPRESSED":1, + "LV_FONT_UNSCII_8":1, + "LV_FONT_DEFAULT":"\\\"&lv_font_roboto_16\\\"", + "LV_USE_ARC":1, + "LV_USE_BAR":1, + "LV_USE_BTN":1, + "LV_USE_BTNM":1, + "LV_USE_CALENDAR":1, + "LV_USE_CANVAS":1, + "LV_USE_CB":1, + "LV_USE_CHART":1, + "LV_USE_CONT":1, + "LV_USE_CPICKER":1, + "LV_USE_DDLIST":1, + "LV_USE_GAUGE":1, + "LV_USE_IMG":1, + "LV_USE_IMGBTN":1, + "LV_USE_KB":1, + "LV_USE_LABEL":1, + "LV_USE_LED":1, + "LV_USE_LINE":1, + "LV_USE_LIST":1, + "LV_USE_LMETER":1, + "LV_USE_OBJMASK":1, + "LV_USE_MBOX":1, + "LV_USE_PAGE":1, + "LV_USE_PRELOAD":1, + "LV_USE_ROLLER":1, + "LV_USE_SLIDER":1, + "LV_USE_SPINBOX":1, + "LV_USE_SW":1, + "LV_USE_TA":1, + "LV_USE_TABLE":1, + "LV_USE_TABVIEW":1, + "LV_USE_TILEVIEW":1, + "LV_USE_WIN":1 +} + + +advanced_features = { + "LV_DPI":100, + "LV_MEM_SIZE":4*1024*1024, + "LV_MEM_CUSTOM":1, + "LV_HOR_RES_MAX":800, + "LV_VER_RES_MAX":480, + "LV_COLOR_DEPTH":16, + "LV_COLOR_SCREEN_TRANSP":1, + "LV_USE_GROUP":1, + "LV_USE_ANIMATION":1, + "LV_ANTIALAIS":1, + "LV_GPU":1, + "LV_USE_FILESYSTEM":1, + "LV_USE_USER_DATA":1, + "LV_IMG_CACHE_DEF_SIZE":32, + "LV_USE_LOG":1, + "LV_LOG_PRINTF":1, + "LV_USE_DEBUG":1, + "LV_USE_ASSERT_NULL":1, + "LV_USE_ASSERT_MEM":1, + "LV_USE_ASSERT_STR":1, + "LV_USE_ASSERT_OBJ":1, + "LV_USE_ASSERT_STYLE":1, + "LV_THEME_LIVE_UPDATE":1, + "LV_USE_THEME_TEMPL":1, + "LV_USE_THEME_DEFAULT":1, + "LV_USE_THEME_ALIEN":1, + "LV_USE_THEME_NIGHT":1, + "LV_USE_THEME_MONO":1, + "LV_USE_THEME_MATERIAL":1, + "LV_USE_THEME_ZEN":1, + "LV_USE_THEME_NEMO": 1, + "LV_FONT_ROBOTO_12":1, + "LV_FONT_ROBOTO_16":1, + "LV_FONT_ROBOTO_22":1, + "LV_FONT_ROBOTO_28":1, + "LV_FONT_ROBOTO_12_SUBPX":1, + "LV_FONT_ROBOTO_28_COMPRESSED":1, + "LV_FONT_UNSCII_8":1, + "LV_FONT_DEFAULT":"\\\"&lv_font_roboto_16\\\"", + "LV_USE_BIDI": 1, + "LV_USE_OBJ_REALIGN": 1, + "LV_FONT_FMT_TXT_LARGE":1, + "LV_FONT_SUBPX_BGR":1, + "LV_USE_BIDI": 1, + "LV_USE_OBJ_REALIGN": 1, + "LV_USE_EXT_CLICK_AREA":"LV_EXT_CLICK_AREA_FULL", + "LV_USE_ARC":1, + "LV_USE_BAR":1, + "LV_USE_BTN":1, + "LV_USE_BTNM":1, + "LV_USE_CALENDAR":1, + "LV_USE_CANVAS":1, + "LV_USE_CB":1, + "LV_USE_CHART":1, + "LV_USE_CONT":1, + "LV_USE_CPICKER":1, + "LV_USE_DDLIST":1, + "LV_USE_GAUGE":1, + "LV_USE_IMG":1, + "LV_USE_IMGBTN":1, + "LV_USE_KB":1, + "LV_USE_LABEL":1, + "LV_USE_LED":1, + "LV_USE_LINE":1, + "LV_USE_LIST":1, + "LV_USE_LMETER":1, + "LV_USE_OBJMASK":1, + "LV_USE_MBOX":1, + "LV_USE_PAGE":1, + "LV_USE_PRELOAD":1, + "LV_USE_ROLLER":1, + "LV_USE_SLIDER":1, + "LV_USE_SPINBOX":1, + "LV_USE_SW":1, + "LV_USE_TA":1, + "LV_USE_TABLE":1, + "LV_USE_TABVIEW":1, + "LV_USE_TILEVIEW":1, + "LV_USE_WIN":1 +} + + +build("Minimal monochrome", minimal_monochrome) +build("All objects, minimal features", all_obj_minimal_features) +build("All objects, all features", all_obj_all_features) + + + + diff --git a/tests/lv_test_conf.h b/tests/lv_test_conf.h new file mode 100644 index 000000000..faa940876 --- /dev/null +++ b/tests/lv_test_conf.h @@ -0,0 +1,46 @@ +/** + * @file lv_test_conf.h + * + */ + +#ifndef LV_TEST_CONF_H +#define LV_TEST_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ +typedef int16_t lv_coord_t; +typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/ +typedef void * lv_font_user_data_t; +typedef void * lv_obj_user_data_t; +typedef void * lv_anim_user_data_t; +typedef void * lv_group_user_data_t; +typedef void * lv_fs_drv_user_data_t; +typedef void * lv_img_decoder_user_data_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * MACROS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_TEST_CONF_H*/ diff --git a/tests/test_main.c b/tests/test_main.c new file mode 100644 index 000000000..f837fc069 --- /dev/null +++ b/tests/test_main.c @@ -0,0 +1,16 @@ +#include "../lvgl.h" +#include + +#if LV_BUILD_TEST + +int main(void) +{ + printf("Call lv_init...\n"); + lv_init(); + + printf("Exit with success!\n"); + return 0; +} + +#endif + From de1228630448194be20bb289a7e3f1043ffd722b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 26 Dec 2019 03:37:13 +0100 Subject: [PATCH 3/5] temprarly remove _lv_mem_buf from GC roots to fix build error --- src/lv_misc/lv_gc.c | 3 +++ src/lv_misc/lv_gc.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lv_misc/lv_gc.c b/src/lv_misc/lv_gc.c index 94bf532ac..c192057c7 100644 --- a/src/lv_misc/lv_gc.c +++ b/src/lv_misc/lv_gc.c @@ -29,6 +29,9 @@ /********************** * STATIC VARIABLES **********************/ +lv_mem_buf_t _lv_mem_buf[LV_MEM_BUF_MAX_NUM]; + + #if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0 LV_ROOTS #endif /* LV_ENABLE_GC */ diff --git a/src/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h index a706f2c1c..d4ef5a9ac 100644 --- a/src/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -24,6 +24,7 @@ extern "C" { * DEFINES *********************/ +extern lv_mem_buf_t _lv_mem_buf[LV_MEM_BUF_MAX_NUM]; #define LV_ITERATE_ROOTS(f) \ f(lv_ll_t, _lv_task_ll) /*Linked list to store the lv_tasks*/ \ @@ -36,7 +37,6 @@ extern "C" { f(lv_ll_t, _lv_img_defoder_ll) \ f(lv_img_cache_entry_t*, _lv_img_cache_array) \ f(void*, _lv_task_act) \ - f(lv_mem_buf_t, _lv_mem_buf[LV_MEM_BUF_MAX_NUM]) \ #define LV_DEFINE_ROOT(root_type, root_name) root_type root_name; #define LV_ROOTS LV_ITERATE_ROOTS(LV_DEFINE_ROOT) From 0a53c0501161e000bf1e7cc3db2d1aa03fd60886 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 26 Dec 2019 03:37:28 +0100 Subject: [PATCH 4/5] fix warnings --- .gitignore | 1 + src/lv_core/lv_obj.c | 5 ++++- src/lv_core/lv_obj.h | 1 - src/lv_draw/lv_draw_blend.c | 5 +++++ src/lv_objx/lv_bar.c | 32 +++++++++++++++++--------------- src/lv_objx/lv_objmask.c | 2 +- src/lv_objx/lv_spinbox.c | 2 +- tests/build.py | 2 +- 8 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 0d4f282ca..9269e4761 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ **/*.o +**/*bin **/*.swp **/*.swo tags diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 9e1a36879..65a223796 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -22,6 +22,7 @@ #include "../lv_misc/lv_math.h" #include "../lv_misc/lv_gc.h" #include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_log.h" #include "../lv_hal/lv_hal.h" #include #include @@ -127,10 +128,12 @@ void lv_init(void) void lv_deinit(void) { lv_gc_clear_roots(); - lv_log_register_print_cb(NULL); lv_disp_set_default(NULL); lv_mem_deinit(); lv_initialized = false; +#if LV_USE_LOG + lv_log_register_print_cb(NULL); +#endif LV_LOG_INFO("lv_deinit done"); } #endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index ff3d0d6c4..cd99382e6 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -23,7 +23,6 @@ extern "C" { #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_ll.h" #include "../lv_misc/lv_color.h" -#include "../lv_misc/lv_log.h" #include "../lv_misc/lv_bidi.h" #include "../lv_hal/lv_hal.h" diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index 7df70c477..b46ce272c 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -707,6 +707,10 @@ static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color if(opa <= LV_OPA_MIN) return bg; uint16_t tmp; +#if LV_COLOR_DEPTH == 1 + tmp = bg.full + fg.full; + fg.full = LV_MATH_MIN(tmp, 1); +#else tmp = bg.ch.red + fg.ch.red; #if LV_COLOR_DEPTH == 8 fg.ch.red = LV_MATH_MIN(tmp, 7); @@ -740,6 +744,7 @@ static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color fg.ch.blue = LV_MATH_MIN(tmp, 31); #elif LV_COLOR_DEPTH == 32 fg.ch.blue = LV_MATH_MIN(tmp, 255); +#endif #endif if(opa == LV_OPA_COVER) return fg; diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index f8f992135..7afdc9ec8 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -34,13 +34,15 @@ **********************/ static lv_design_res_t lv_bar_design(lv_obj_t * bar, const lv_area_t * clip_area, lv_design_mode_t mode); static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); -static void lv_bar_set_value_with_anim(lv_obj_t * bar, int16_t new_value, int16_t *value_ptr, lv_bar_anim_t *anim_info, lv_anim_enable_t en); -static void lv_bar_init_anim(lv_obj_t * bar, lv_bar_anim_t * bar_anim); + static void draw_bg(lv_obj_t * bar, const lv_area_t * clip_area, lv_design_mode_t mode, lv_opa_t opa); static void draw_indic(lv_obj_t * bar, const lv_area_t * clip_area, lv_design_mode_t mode, lv_opa_t opa); + #if LV_USE_ANIMATION +static void lv_bar_set_value_with_anim(lv_obj_t * bar, int16_t new_value, int16_t *value_ptr, lv_bar_anim_t *anim_info, lv_anim_enable_t en); +static void lv_bar_init_anim(lv_obj_t * bar, lv_bar_anim_t * bar_anim); static void lv_bar_anim(lv_bar_anim_t * bar, lv_anim_value_t value); static void lv_bar_anim_ready(lv_anim_t * a); #endif @@ -146,9 +148,6 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim) { LV_ASSERT_OBJ(bar, LV_OBJX_NAME); -#if LV_USE_ANIMATION == 0 - anim = false; -#endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); if(ext->cur_value == value) return; @@ -157,9 +156,12 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim) new_value = new_value < ext->min_value ? ext->min_value : new_value; if(ext->cur_value == new_value) return; - +#if LV_USE_ANIMATION == 0 + ext->cur_value = new_value; + lv_obj_invalidate(bar); +#else lv_bar_set_value_with_anim(bar, new_value, &ext->cur_value, &ext->cur_value_anim, anim); - +#endif } /** @@ -172,9 +174,6 @@ void lv_bar_set_start_value(lv_obj_t * bar, int16_t start_value, lv_anim_enable_ { LV_ASSERT_OBJ(bar, LV_OBJX_NAME); -#if LV_USE_ANIMATION == 0 - anim = false; -#endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); if(ext->start_value == start_value) return; @@ -183,8 +182,11 @@ void lv_bar_set_start_value(lv_obj_t * bar, int16_t start_value, lv_anim_enable_ new_value = new_value < ext->min_value ? ext->min_value : start_value; if(ext->start_value == new_value) return; - - lv_bar_set_value_with_anim(bar, start_value, &ext->start_value, &ext->start_value_anim, anim); +#if LV_USE_ANIMATION == 0 + ext->start_value = new_value; +#else + lv_bar_set_value_with_anim(bar, new_value, &ext->start_value, &ext->start_value_anim, anim); +#endif } /** @@ -647,9 +649,11 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) } if(sign == LV_SIGNAL_CLEANUP) { +#if LV_USE_ANIMATION lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); lv_anim_del(&ext->cur_value_anim, NULL); lv_anim_del(&ext->start_value_anim, NULL); +#endif } return res; @@ -673,14 +677,12 @@ static void lv_bar_anim_ready(lv_anim_t * a) ext->start_value = var->anim_end; lv_obj_invalidate(var->bar); } -#endif static void lv_bar_set_value_with_anim(lv_obj_t * bar, int16_t new_value, int16_t *value_ptr, lv_bar_anim_t *anim_info, lv_anim_enable_t en) { if(en == LV_ANIM_OFF) { *value_ptr = new_value; lv_obj_invalidate(bar); } else { -#if LV_USE_ANIMATION lv_bar_ext_t *ext = lv_obj_get_ext_attr(bar); /*No animation in progress -> simply set the values*/ if(!anim_info->is_animating) { @@ -711,7 +713,6 @@ static void lv_bar_set_value_with_anim(lv_obj_t * bar, int16_t new_value, int16_ lv_anim_create(&a); anim_info->is_animating = true; -#endif } } @@ -722,5 +723,6 @@ static void lv_bar_init_anim(lv_obj_t * bar, lv_bar_anim_t * bar_anim) bar_anim->anim_end = 0; bar_anim->is_animating = false; } +#endif #endif diff --git a/src/lv_objx/lv_objmask.c b/src/lv_objx/lv_objmask.c index 1d426e92d..3ad689873 100644 --- a/src/lv_objx/lv_objmask.c +++ b/src/lv_objx/lv_objmask.c @@ -106,7 +106,7 @@ lv_obj_t * lv_objmask_create(lv_obj_t * par, const lv_obj_t * copy) lv_objmask_mask_t * lv_objmask_add_mask(lv_obj_t * objmask, void * param) { LV_ASSERT_OBJ(objmask, LV_OBJX_NAME); - LV_ASSERT_NULL(param) + LV_ASSERT_NULL(param); lv_objmask_ext_t * ext = lv_obj_get_ext_attr(objmask); diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 66b50b2f3..25a319bd3 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -344,7 +344,6 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME); - lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { @@ -357,6 +356,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p } else if(sign == LV_SIGNAL_RELEASED) { /*If released with an ENCODER then move to the next digit*/ #if LV_USE_GROUP + lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { if(lv_group_get_editing(lv_obj_get_group(spinbox))) { diff --git a/tests/build.py b/tests/build.py index 46e8d5756..a633a1953 100644 --- a/tests/build.py +++ b/tests/build.py @@ -1,6 +1,6 @@ import os -warnings = '"-Wall"' +warnings = '"-Wall -Werror"' base_defines = '"-DLV_CONF_PATH=tests/lv_test_conf.h -DLV_BUILD_TEST"' optimization = '"-O3 -g0"' From 921b1911247d3fba83a4e42a44c99f4645d66065 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 26 Dec 2019 03:44:06 +0100 Subject: [PATCH 5/5] add azure-pipeline.yml --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..142ed080a --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: + - script: echo Hello, world! + displayName: 'Run a one-line script' + + - script: | + echo Start build + echo root content: + ls + cd tests + echo tests content: + python build.py + displayName: 'Build' \ No newline at end of file