diff --git a/lv_conf_templ.h b/lv_conf_templ.h index b39d73bcc..f58594882 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -86,6 +86,16 @@ #define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */ #define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/ +/*Log settings*/ +#define USE_LV_LOG 1 /*Enable/disable the log module*/ +#if USE_LV_LOG +#define LV_LOG_INFO 0 /*1: Log a lot of runtime information*/ +#define LV_LOG_WARN 0 /*1: Log is something unexpected happens but succesfully handled*/ +#define LV_LOG_ERROR 1 /*1: Log critical error*/ +#define LV_LOG_USER 1 /*1: Log user defined/user level things */ +#define LV_LOG_PRINTF 0 /*1: Print the log with 'printf'; 0: user need to register a callback*/ +#endif /*USE_LV_LOG*/ + /*================ * THEME USAGE *================*/ diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 1914d6016..fbe3e9556 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -13,7 +13,12 @@ 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/lv_core/lv_indev.c b/lv_core/lv_indev.c index a0153598c..c68f897b7 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -7,7 +7,6 @@ * INCLUDES ********************/ #include "lv_indev.h" -#include "../../lv_conf.h" #include "../lv_hal/lv_hal_tick.h" #include "../lv_core/lv_group.h" diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 9dbbfda08..68fe51069 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -62,6 +62,10 @@ static lv_ll_t scr_ll; /*Linked list of screens*/ */ void lv_init(void) { +#if USE_LV_LOG + lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "lv_init called"); +#endif + /*Initialize the lv_misc modules*/ lv_mem_init(); lv_task_init(); @@ -101,6 +105,10 @@ void lv_init(void) /*Init the input device handling*/ lv_indev_init(); #endif + +#if USE_LV_LOG + lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, "lv_init finished"); +#endif } /*-------------------- diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index f6a96dc23..8616c8415 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #include #include #include "lv_style.h" @@ -21,6 +26,7 @@ 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" /********************* * DEFINES diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index d0ba37d17..d3f78d1b1 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -6,7 +6,6 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" #include #include "lv_refr.h" #include "lv_vdb.h" diff --git a/lv_core/lv_refr.h b/lv_core/lv_refr.h index 50b710e0f..b6195cc85 100644 --- a/lv_core/lv_refr.h +++ b/lv_core/lv_refr.h @@ -16,7 +16,6 @@ extern "C" { #include "lv_obj.h" #include - /********************* * DEFINES *********************/ diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 08f18d125..3866a2da7 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -6,8 +6,6 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" -#include "lv_style.h" #include "lv_obj.h" #include "../lv_misc/lv_mem.h" diff --git a/lv_core/lv_vdb.c b/lv_core/lv_vdb.c index 4cf7fbffb..7894fcea8 100644 --- a/lv_core/lv_vdb.c +++ b/lv_core/lv_vdb.c @@ -2,12 +2,12 @@ * @file lv_vdb.c * */ -#include "../../lv_conf.h" + +#include "lv_vdb.h" #if LV_VDB_SIZE != 0 #include "../lv_hal/lv_hal_disp.h" #include -#include "lv_vdb.h" /********************* * INCLUDES diff --git a/lv_core/lv_vdb.h b/lv_core/lv_vdb.h index 478b66fd2..5ca1ccf12 100644 --- a/lv_core/lv_vdb.h +++ b/lv_core/lv_vdb.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if LV_VDB_SIZE != 0 diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index 6aa820caa..eea5af823 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -6,7 +6,6 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" #include #include diff --git a/lv_draw/lv_draw.h b/lv_draw/lv_draw.h index 2b1b0dc2a..7056b0256 100644 --- a/lv_draw/lv_draw.h +++ b/lv_draw/lv_draw.h @@ -13,6 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + #include "../lv_core/lv_style.h" #include "../lv_misc/lv_txt.h" diff --git a/lv_draw/lv_draw_arc.c b/lv_draw/lv_draw_arc.c index 63bb17fa0..7cb47d135 100644 --- a/lv_draw/lv_draw_arc.c +++ b/lv_draw/lv_draw_arc.c @@ -70,15 +70,11 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons if(start_angle <= end_angle) deg_test = deg_test_norm; else deg_test = deg_test_inv; - // Good, may not be the fastest - // Does not draw overlapping pixels if(deg_test(270, start_angle, end_angle)) hor_line(center_x - r_out + 1, center_y, mask, thickness - 1, color, opa); // Left Middle if(deg_test(90, start_angle, end_angle)) hor_line(center_x + r_in, center_y, mask, thickness - 1, color, opa); // Right Middle if(deg_test(180, start_angle, end_angle)) ver_line(center_x, center_y - r_out + 1, mask, thickness - 1, color, opa); // Top Middle if(deg_test(0, start_angle, end_angle)) ver_line(center_x, center_y + r_in, mask, thickness - 1, color, opa); // Bottom middle - - lv_point_t last_corner_out = { -r_out, -r_out}; uint32_t r_out_sqr = r_out * r_out; uint32_t r_in_sqr = r_in * r_in; int16_t xi; @@ -153,7 +149,7 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons #if LV_ANTIALIAS - + /*TODO*/ #endif diff --git a/lv_draw/lv_draw_rbasic.h b/lv_draw/lv_draw_rbasic.h index 1dbc0ea47..b1d62f3fb 100644 --- a/lv_draw/lv_draw_rbasic.h +++ b/lv_draw/lv_draw_rbasic.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_REAL_DRAW != 0 #include "../lv_misc/lv_color.h" diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_vbasic.c index 4185cef85..f94faf57c 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_vbasic.c @@ -3,7 +3,7 @@ * */ -#include "../../lv_conf.h" +#include "lv_draw_vbasic.h" #include #include diff --git a/lv_draw/lv_draw_vbasic.h b/lv_draw/lv_draw_vbasic.h index 6c2a594e5..b619d928b 100644 --- a/lv_draw/lv_draw_vbasic.h +++ b/lv_draw/lv_draw_vbasic.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if LV_VDB_SIZE != 0 diff --git a/lv_fonts/lv_font_builtin.c b/lv_fonts/lv_font_builtin.c new file mode 100644 index 000000000..bce3c87bd --- /dev/null +++ b/lv_fonts/lv_font_builtin.c @@ -0,0 +1,165 @@ +/** + * @file lv_font_built_in.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_font_builtin.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Initialize the built-in fonts + */ +void lv_font_builtin_init(void) +{ + /*DEJAVU 10*/ +#if USE_LV_FONT_DEJAVU_10 != 0 + lv_font_add(&lv_font_dejavu_10, NULL); +#endif + +#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 +#if USE_LV_FONT_DEJAVU_10 != 0 + lv_font_add(&lv_font_dejavu_10_latin_sup, &lv_font_dejavu_10); +#else + lv_font_add(&lv_font_dejavu_10_latin_sup, NULL); +#endif +#endif + +#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 +#if USE_LV_FONT_DEJAVU_10 != 0 + lv_font_add(&lv_font_dejavu_10_cyrillic, &lv_font_dejavu_10); +#else + lv_font_add(&lv_font_dejavu_10_cyrillic, NULL); +#endif +#endif + + /*SYMBOL 10*/ +#if USE_LV_FONT_SYMBOL_10 != 0 +#if USE_LV_FONT_DEJAVU_10 != 0 + lv_font_add(&lv_font_symbol_10, &lv_font_dejavu_10); +#else + lv_font_add(&lv_font_symbol_10, NULL); +#endif +#endif + + + /*DEJAVU 20*/ +#if USE_LV_FONT_DEJAVU_20 != 0 + lv_font_add(&lv_font_dejavu_20, NULL); +#endif + +#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 +#if USE_LV_FONT_DEJAVU_20 != 0 + lv_font_add(&lv_font_dejavu_20_latin_sup, &lv_font_dejavu_20); +#else + lv_font_add(&lv_font_symbol_20_latin_sup, NULL); +#endif +#endif + +#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 +#if USE_LV_FONT_DEJAVU_20 != 0 + lv_font_add(&lv_font_dejavu_20_cyrillic, &lv_font_dejavu_20); +#else + lv_font_add(&lv_font_dejavu_20_cyrillic, NULL); +#endif +#endif + + /*SYMBOL 20*/ +#if USE_LV_FONT_SYMBOL_20 != 0 +#if USE_LV_FONT_DEJAVU_20 != 0 + lv_font_add(&lv_font_symbol_20, &lv_font_dejavu_20); +#else + lv_font_add(&lv_font_symbol_20, NULL); +#endif +#endif + + + /*DEJAVU 30*/ +#if USE_LV_FONT_DEJAVU_30 != 0 + lv_font_add(&lv_font_dejavu_30, NULL); +#endif + +#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 +#if USE_LV_FONT_DEJAVU_30 != 0 + lv_font_add(&lv_font_dejavu_30_latin_sup, &lv_font_dejavu_30); +#else + lv_font_add(&lv_font_dejavu_30_latin_sup, NULL); +#endif +#endif + +#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 +#if USE_LV_FONT_DEJAVU_30 != 0 + lv_font_add(&lv_font_dejavu_30_cyrillic, &lv_font_dejavu_30); +#else + lv_font_add(&lv_font_dejavu_30_cyrillic, NULL); +#endif +#endif + + /*SYMBOL 30*/ +#if USE_LV_FONT_SYMBOL_30 != 0 +#if USE_LV_FONT_DEJAVU_30 != 0 + lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30); +#else + lv_font_add(&lv_font_symbol_30_basic, NULL); +#endif +#endif + + /*DEJAVU 40*/ +#if USE_LV_FONT_DEJAVU_40 != 0 + lv_font_add(&lv_font_dejavu_40, NULL); +#endif + +#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 +#if USE_LV_FONT_DEJAVU_40 != 0 + lv_font_add(&lv_font_dejavu_40_latin_sup, &lv_font_dejavu_40); +#else + lv_font_add(&lv_font_dejavu_40_latin_sup, NULL); +#endif +#endif + +#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 +#if USE_LV_FONT_DEJAVU_40 != 0 + lv_font_add(&lv_font_dejavu_40_cyrillic, &lv_font_dejavu_40); +#else + lv_font_add(&lv_font_dejavu_40_cyrillic, NULL); +#endif +#endif + + /*SYMBOL 40*/ +#if USE_LV_FONT_SYMBOL_40 != 0 +#if USE_LV_FONT_DEJAVU_40 != 0 + lv_font_add(&lv_font_symbol_40, &lv_font_dejavu_40); +#else + lv_font_add(&lv_font_symbol_40, NULL); +#endif +#endif +} + +/********************** + * STATIC FUNCTIONS + **********************/ diff --git a/lv_fonts/lv_font_builtin.h b/lv_fonts/lv_font_builtin.h new file mode 100644 index 000000000..c216cd2ce --- /dev/null +++ b/lv_fonts/lv_font_builtin.h @@ -0,0 +1,121 @@ +/** + * @file lv_font_builtin.h + * + */ + +#ifndef LV_FONT_BUILTIN_H +#define LV_FONT_BUILTIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + +#include "../lv_misc/lv_font.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Initialize the built-in fonts + */ +void lv_font_builtin_init(void); + +/********************** + * MACROS + **********************/ + +/********************** + * FONT DECLARATIONS + **********************/ + +/*10 px */ +#if USE_LV_FONT_DEJAVU_10 +LV_FONT_DECLARE(lv_font_dejavu_10); +#endif + +#if USE_LV_FONT_DEJAVU_10_LATIN_SUP +LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup); +#endif + +#if USE_LV_FONT_DEJAVU_10_CYRILLIC +LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic); +#endif + +#if USE_LV_FONT_SYMBOL_10 +LV_FONT_DECLARE(lv_font_symbol_10); +#endif + +/*20 px */ +#if USE_LV_FONT_DEJAVU_20 +LV_FONT_DECLARE(lv_font_dejavu_20); +#endif + +#if USE_LV_FONT_DEJAVU_20_LATIN_SUP +LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup); +#endif + +#if USE_LV_FONT_DEJAVU_20_CYRILLIC +LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic); +#endif + +#if USE_LV_FONT_SYMBOL_20 +LV_FONT_DECLARE(lv_font_symbol_20); +#endif + +/*30 px */ +#if USE_LV_FONT_DEJAVU_30 +LV_FONT_DECLARE(lv_font_dejavu_30); +#endif + +#if USE_LV_FONT_DEJAVU_30_LATIN_SUP +LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup); +#endif + +#if USE_LV_FONT_DEJAVU_30_CYRILLIC +LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic); +#endif + +#if USE_LV_FONT_SYMBOL_30 +LV_FONT_DECLARE(lv_font_symbol_30); +#endif + +/*40 px */ +#if USE_LV_FONT_DEJAVU_40 +LV_FONT_DECLARE(lv_font_dejavu_40); +#endif + +#if USE_LV_FONT_DEJAVU_40_LATIN_SUP +LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup); +#endif + +#if USE_LV_FONT_DEJAVU_40_CYRILLIC +LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic); +#endif + +#if USE_LV_FONT_SYMBOL_40 +LV_FONT_DECLARE(lv_font_symbol_40); +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_FONT_BUILTIN_H*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10.c b/lv_fonts/lv_font_dejavu_10.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10.c rename to lv_fonts/lv_font_dejavu_10.c index d67400e6b..958581780 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10.c +++ b/lv_fonts/lv_font_dejavu_10.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c b/lv_fonts/lv_font_dejavu_10_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c rename to lv_fonts/lv_font_dejavu_10_cyrillic.c index 2e76258f7..711408d0d 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_10_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c b/lv_fonts/lv_font_dejavu_10_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c rename to lv_fonts/lv_font_dejavu_10_latin_sup.c index e57a147e3..563171091 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_10_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_10_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20.c b/lv_fonts/lv_font_dejavu_20.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20.c rename to lv_fonts/lv_font_dejavu_20.c index 8c4028d26..63e098d95 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20.c +++ b/lv_fonts/lv_font_dejavu_20.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c b/lv_fonts/lv_font_dejavu_20_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c rename to lv_fonts/lv_font_dejavu_20_cyrillic.c index 0006e30e7..106c87a22 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_20_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c b/lv_fonts/lv_font_dejavu_20_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c rename to lv_fonts/lv_font_dejavu_20_latin_sup.c index 733fadb75..0d62c8b38 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_20_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_20_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30.c b/lv_fonts/lv_font_dejavu_30.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30.c rename to lv_fonts/lv_font_dejavu_30.c index 310110a9f..346d34774 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30.c +++ b/lv_fonts/lv_font_dejavu_30.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c b/lv_fonts/lv_font_dejavu_30_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c rename to lv_fonts/lv_font_dejavu_30_cyrillic.c index 616ac9d84..a9e3c8f59 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_30_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c b/lv_fonts/lv_font_dejavu_30_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c rename to lv_fonts/lv_font_dejavu_30_latin_sup.c index 2e754bcbd..4ec5b3236 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_30_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_30_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40.c b/lv_fonts/lv_font_dejavu_40.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40.c rename to lv_fonts/lv_font_dejavu_40.c index 4c9ce1cb2..53fc8b845 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40.c +++ b/lv_fonts/lv_font_dejavu_40.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c b/lv_fonts/lv_font_dejavu_40_cyrillic.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c rename to lv_fonts/lv_font_dejavu_40_cyrillic.c index 1b8b39bf0..0a174300d 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_40_cyrillic.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c b/lv_fonts/lv_font_dejavu_40_latin_sup.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c rename to lv_fonts/lv_font_dejavu_40_latin_sup.c index 3b0332c8a..bea148ff1 100644 --- a/lv_misc/lv_fonts/lv_font_dejavu_40_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_40_latin_sup.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_10.c b/lv_fonts/lv_font_symbol_10.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_10.c rename to lv_fonts/lv_font_symbol_10.c index 074a95328..959a24792 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_10.c +++ b/lv_fonts/lv_font_symbol_10.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_20.c b/lv_fonts/lv_font_symbol_20.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_20.c rename to lv_fonts/lv_font_symbol_20.c index 700d90815..f4db8d5a2 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_20.c +++ b/lv_fonts/lv_font_symbol_20.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_30.c b/lv_fonts/lv_font_symbol_30.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_30.c rename to lv_fonts/lv_font_symbol_30.c index 7ba222f64..ae110cc1d 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_30.c +++ b/lv_fonts/lv_font_symbol_30.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_font_symbol_40.c b/lv_fonts/lv_font_symbol_40.c similarity index 99% rename from lv_misc/lv_fonts/lv_font_symbol_40.c rename to lv_fonts/lv_font_symbol_40.c index f79767229..f7400a224 100644 --- a/lv_misc/lv_fonts/lv_font_symbol_40.c +++ b/lv_fonts/lv_font_symbol_40.c @@ -1,5 +1,5 @@ -#include "../lv_font.h" +#include "../lv_misc/lv_font.h" #if USE_LV_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ diff --git a/lv_misc/lv_fonts/lv_fonts.mk b/lv_fonts/lv_fonts.mk similarity index 81% rename from lv_misc/lv_fonts/lv_fonts.mk rename to lv_fonts/lv_fonts.mk index 936301ab8..ba59d0f27 100644 --- a/lv_misc/lv_fonts/lv_fonts.mk +++ b/lv_fonts/lv_fonts.mk @@ -15,7 +15,7 @@ CSRCS += lv_font_symbol_20.c CSRCS += lv_font_symbol_30.c CSRCS += lv_font_symbol_40.c -DEPPATH += --dep-path lvgl/lv_misc/lv_fonts -VPATH += :lvgl/lv_misc/lv_fonts +DEPPATH += --dep-path lvgl/lv_fonts +VPATH += :lvgl/lv_fonts -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_misc/lv_fonts" +CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_fonts" diff --git a/lv_hal/lv_hal_tick.c b/lv_hal/lv_hal_tick.c index a90c86095..f02e5d6bb 100644 --- a/lv_hal/lv_hal_tick.c +++ b/lv_hal/lv_hal_tick.c @@ -6,9 +6,14 @@ /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + #include "lv_hal_tick.h" #include -#include "../../lv_conf.h" /********************* * DEFINES diff --git a/lv_misc/lv_anim.h b/lv_misc/lv_anim.h index 471ee6a99..9c98402b8 100644 --- a/lv_misc/lv_anim.h +++ b/lv_misc/lv_anim.h @@ -14,7 +14,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_ANIMATION #include diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index e2f30a5d6..a2611c595 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #include diff --git a/lv_misc/lv_font.c b/lv_misc/lv_font.c index ab02484f5..1e5c19cd3 100644 --- a/lv_misc/lv_font.c +++ b/lv_misc/lv_font.c @@ -6,8 +6,6 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" - #include #include "lv_font.h" @@ -40,132 +38,11 @@ **********************/ /** - * Initialize the built-in fonts + * Initialize the fonts */ void lv_font_init(void) { - /*DEJAVU 10*/ -#if USE_LV_FONT_DEJAVU_10 != 0 - lv_font_add(&lv_font_dejavu_10, NULL); -#endif - -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 - lv_font_add(&lv_font_dejavu_10_latin_sup, &lv_font_dejavu_10); -#else - lv_font_add(&lv_font_dejavu_10_latin_sup, NULL); -#endif -#endif - -#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 - lv_font_add(&lv_font_dejavu_10_cyrillic, &lv_font_dejavu_10); -#else - lv_font_add(&lv_font_dejavu_10_cyrillic, NULL); -#endif -#endif - - /*SYMBOL 10*/ -#if USE_LV_FONT_SYMBOL_10 != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 - lv_font_add(&lv_font_symbol_10, &lv_font_dejavu_10); -#else - lv_font_add(&lv_font_symbol_10, NULL); -#endif -#endif - - - /*DEJAVU 20*/ -#if USE_LV_FONT_DEJAVU_20 != 0 - lv_font_add(&lv_font_dejavu_20, NULL); -#endif - -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 - lv_font_add(&lv_font_dejavu_20_latin_sup, &lv_font_dejavu_20); -#else - lv_font_add(&lv_font_symbol_20_latin_sup, NULL); -#endif -#endif - -#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 - lv_font_add(&lv_font_dejavu_20_cyrillic, &lv_font_dejavu_20); -#else - lv_font_add(&lv_font_dejavu_20_cyrillic, NULL); -#endif -#endif - - /*SYMBOL 20*/ -#if USE_LV_FONT_SYMBOL_20 != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 - lv_font_add(&lv_font_symbol_20, &lv_font_dejavu_20); -#else - lv_font_add(&lv_font_symbol_20, NULL); -#endif -#endif - - - /*DEJAVU 30*/ -#if USE_LV_FONT_DEJAVU_30 != 0 - lv_font_add(&lv_font_dejavu_30, NULL); -#endif - -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 - lv_font_add(&lv_font_dejavu_30_latin_sup, &lv_font_dejavu_30); -#else - lv_font_add(&lv_font_dejavu_30_latin_sup, NULL); -#endif -#endif - -#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 - lv_font_add(&lv_font_dejavu_30_cyrillic, &lv_font_dejavu_30); -#else - lv_font_add(&lv_font_dejavu_30_cyrillic, NULL); -#endif -#endif - - /*SYMBOL 30*/ -#if USE_LV_FONT_SYMBOL_30 != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 - lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30); -#else - lv_font_add(&lv_font_symbol_30_basic, NULL); -#endif -#endif - - /*DEJAVU 40*/ -#if USE_LV_FONT_DEJAVU_40 != 0 - lv_font_add(&lv_font_dejavu_40, NULL); -#endif - -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 - lv_font_add(&lv_font_dejavu_40_latin_sup, &lv_font_dejavu_40); -#else - lv_font_add(&lv_font_dejavu_40_latin_sup, NULL); -#endif -#endif - -#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 - lv_font_add(&lv_font_dejavu_40_cyrillic, &lv_font_dejavu_40); -#else - lv_font_add(&lv_font_dejavu_40_cyrillic, NULL); -#endif -#endif - - /*SYMBOL 40*/ -#if USE_LV_FONT_SYMBOL_40 != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 - lv_font_add(&lv_font_symbol_40, &lv_font_dejavu_40); -#else - lv_font_add(&lv_font_symbol_40, NULL); -#endif -#endif - + lv_font_builtin_init(); } /** diff --git a/lv_misc/lv_font.h b/lv_misc/lv_font.h index b806df429..969963a8c 100644 --- a/lv_misc/lv_font.h +++ b/lv_misc/lv_font.h @@ -14,13 +14,17 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #include #include #include -#include "lv_fonts/lv_symbol_def.h" +#include "lv_symbol_def.h" /********************* * DEFINES @@ -62,7 +66,7 @@ typedef struct _lv_font_struct **********************/ /** - * Initialize the built-in fonts + * Initialize the fonts */ void lv_font_init(void); @@ -98,6 +102,14 @@ const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter); uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter); +/** + * Get the width of the letter without overwriting it with the `monospace` attribute + * @param font_p pointer to a font + * @param letter an UNICODE character code + * @return the width of a letter + */ +uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter); + /** * Get the height of a font * @param font_p pointer to a font @@ -150,79 +162,14 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter /********************** * MACROS **********************/ + #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; + /********************** - * FONT DECLARATION + * ADD BUILT IN FONTS **********************/ - -/*10 px */ -#if USE_LV_FONT_DEJAVU_10 -LV_FONT_DECLARE(lv_font_dejavu_10); -#endif - -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup); -#endif - -#if USE_LV_FONT_DEJAVU_10_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic); -#endif - -#if USE_LV_FONT_SYMBOL_10 -LV_FONT_DECLARE(lv_font_symbol_10); -#endif - -/*20 px */ -#if USE_LV_FONT_DEJAVU_20 -LV_FONT_DECLARE(lv_font_dejavu_20); -#endif - -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup); -#endif - -#if USE_LV_FONT_DEJAVU_20_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic); -#endif - -#if USE_LV_FONT_SYMBOL_20 -LV_FONT_DECLARE(lv_font_symbol_20); -#endif - -/*30 px */ -#if USE_LV_FONT_DEJAVU_30 -LV_FONT_DECLARE(lv_font_dejavu_30); -#endif - -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup); -#endif - -#if USE_LV_FONT_DEJAVU_30_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic); -#endif - -#if USE_LV_FONT_SYMBOL_30 -LV_FONT_DECLARE(lv_font_symbol_30); -#endif - -/*40 px */ -#if USE_LV_FONT_DEJAVU_40 -LV_FONT_DECLARE(lv_font_dejavu_40); -#endif - -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup); -#endif - -#if USE_LV_FONT_DEJAVU_40_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic); -#endif - -#if USE_LV_FONT_SYMBOL_40 -LV_FONT_DECLARE(lv_font_symbol_40); -#endif +#include "../lv_fonts/lv_font_builtin.h" /*Declare the custom (user defined) fonts*/ LV_FONT_CUSTOM_DECLARE diff --git a/lv_misc/lv_log.c b/lv_misc/lv_log.c new file mode 100644 index 000000000..b920cb57c --- /dev/null +++ b/lv_misc/lv_log.c @@ -0,0 +1,80 @@ +/** + * @file lv_log.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_log.h" +#if USE_LV_LOG + +#if LV_LOG_PRINTF +#include +#endif +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ +static void (*print_cb)(lv_log_level_t , const char *, uint32_t , const char *); + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Register custom print (or anything else) function to call when log is added + * @param f a function pointer: + * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)` + */ +void lv_log_register_print(void f(lv_log_level_t , const char *, uint32_t , const char *)) +{ + print_cb = f; +} + +/** + * Add a log + * @param level the level of log. (From `lv_log_level_t` enum) + * @param file name of the file when the log added + * @param line line number in the source code where the log added + * @param dsc description of the log + */ +void lv_log_add(lv_log_level_t level, const char * file, uint32_t line, const char * dsc) +{ + if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/ + + if((level == LV_LOG_LEVEL_INFO && LV_LOG_INFO) || + (level == LV_LOG_LEVEL_WARN && LV_LOG_WARN) || + (level == LV_LOG_LEVEL_ERROR && LV_LOG_ERROR) || + (level == LV_LOG_LEVEL_USER && LV_LOG_USER)) + { + +#if LV_LOG_PRINTF + static const char * lvl_prefix[] = {"Info", "Warn", "Error", "User"}; + printf("%s %s:%d: %s\n", lvl_prefix[level], file, line, dsc); +#else + if(print_cb) print_cb(level, file, line, dsc); +#endif + } +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +#endif /*USE_LV_LOG*/ diff --git a/lv_misc/lv_log.h b/lv_misc/lv_log.h new file mode 100644 index 000000000..228ca6fac --- /dev/null +++ b/lv_misc/lv_log.h @@ -0,0 +1,74 @@ +/** + * @file lv_log.h + * + */ + +#ifndef LV_LOG_H +#define LV_LOG_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#include "../../lv_conf.h" +#include + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ +typedef enum +{ + LV_LOG_LEVEL_INFO = 0, + LV_LOG_LEVEL_WARN, + LV_LOG_LEVEL_ERROR, + LV_LOG_LEVEL_USER, + _LV_LOG_LEVEL_NUM +}lv_log_level_t; + +#if USE_LV_LOG + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Register custom print (or anything else) function to call when log is added + * @param f a function pointer: + * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)` + */ +void lv_log_register_print(void f(lv_log_level_t , const char *, uint32_t , const char *)); + +/** + * Add a log + * @param level the level of log. (From `lv_log_level_t` enum) + * @param file name of the file when the log added + * @param line line number in the source code where the log added + * @param dsc description of the log + */ +void lv_log_add(lv_log_level_t level, const char * file, uint32_t line, const char * dsc); + +/********************** + * MACROS + **********************/ + +#else /*USE_LV_LOG*/ + +/*Do nothing if `USE_LV_LOG 0`*/ +#define lv_log_add(level, file, line, dsc) {;} + +#endif /*USE_LV_LOG*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_LOG_H*/ diff --git a/lv_misc/lv_mem.c b/lv_misc/lv_mem.c index f3f4c8e1a..196fd62c7 100644 --- a/lv_misc/lv_mem.c +++ b/lv_misc/lv_mem.c @@ -7,7 +7,6 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" #include "lv_mem.h" #include "lv_math.h" #include diff --git a/lv_misc/lv_mem.h b/lv_misc/lv_mem.h index e67ed54a7..ae224cfbd 100644 --- a/lv_misc/lv_mem.h +++ b/lv_misc/lv_mem.h @@ -14,6 +14,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + #include #include diff --git a/lv_misc/lv_misc.mk b/lv_misc/lv_misc.mk index fc07f49af..e6034070c 100644 --- a/lv_misc/lv_misc.mk +++ b/lv_misc/lv_misc.mk @@ -10,6 +10,7 @@ CSRCS += lv_color.c CSRCS += lv_txt.c CSRCS += lv_ufs.c CSRCS += lv_math.c +CSRCS += lv_log.c DEPPATH += --dep-path lvgl/lv_misc VPATH += :lvgl/lv_misc diff --git a/lv_misc/lv_fonts/lv_symbol_def.h b/lv_misc/lv_symbol_def.h similarity index 98% rename from lv_misc/lv_fonts/lv_symbol_def.h rename to lv_misc/lv_symbol_def.h index 925b9886d..9d46d7792 100644 --- a/lv_misc/lv_fonts/lv_symbol_def.h +++ b/lv_misc/lv_symbol_def.h @@ -4,8 +4,11 @@ #ifdef __cplusplus extern "C" { #endif - -#include "../../../lv_conf.h" +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif /* * With no UTF-8 support (192-255) diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index 296a1352b..9e1488f54 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -10,7 +10,6 @@ #include #include "lv_task.h" #include "../lv_hal/lv_hal_tick.h" -#include "../../lv_conf.h" /********************* * DEFINES diff --git a/lv_misc/lv_task.h b/lv_misc/lv_task.h index 9e3964e16..d4106c0d0 100644 --- a/lv_misc/lv_task.h +++ b/lv_misc/lv_task.h @@ -14,6 +14,12 @@ 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/lv_misc/lv_txt.c b/lv_misc/lv_txt.c index da0006860..ce73bf889 100644 --- a/lv_misc/lv_txt.c +++ b/lv_misc/lv_txt.c @@ -7,7 +7,6 @@ * INCLUDES *********************/ #include "lv_txt.h" -#include "../../lv_conf.h" #include "lv_math.h" /********************* diff --git a/lv_misc/lv_txt.h b/lv_misc/lv_txt.h index ba1f8f826..56664ecbe 100644 --- a/lv_misc/lv_txt.h +++ b/lv_misc/lv_txt.h @@ -13,6 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + #include #include "lv_area.h" #include "lv_font.h" diff --git a/lv_misc/lv_ufs.h b/lv_misc/lv_ufs.h index ebd9271d2..3ee1fa3fc 100644 --- a/lv_misc/lv_ufs.h +++ b/lv_misc/lv_ufs.h @@ -15,7 +15,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_FILESYSTEM diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index f60feb1d8..7cc84c951 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -8,10 +8,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_bar.h" #if USE_LV_BAR != 0 -#include "lv_bar.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_anim.h" diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index 7e498b36b..1a9ef5c2f 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_BAR != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index 3eff36e38..176ec171f 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -7,11 +7,10 @@ * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_btn.h" #if USE_LV_BTN != 0 #include -#include "lv_btn.h" #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index ee138b739..6804ba8f4 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_BTN != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 0f3ed1875..da82be8c8 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_btnm.h" #if USE_LV_BTNM != 0 -#include "lv_btnm.h" #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_refr.h" diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 0bae7927d..03e62ade6 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -14,7 +14,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_BTNM != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 3d12ce935..604aa7573 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_cb.h" #if USE_LV_CB != 0 -#include "lv_cb.h" #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index 1d25b7617..f80b300d3 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_CB != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 6615ac422..e5b448d97 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_chart.h" #if USE_LV_CHART != 0 -#include "lv_chart.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index 60cec31e8..84a393142 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_CHART != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 08a8f264d..cbe3fce65 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -6,15 +6,14 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_cont.h" #if USE_LV_CONT != 0 #include #include #include -#include "lv_cont.h" #include "../lv_draw/lv_draw.h" #include "../lv_draw/lv_draw_vbasic.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index 491b8dbbc..335b8c282 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_CONT != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 000b8d2e9..c73010387 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -7,15 +7,14 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_ddlist.h" #if USE_LV_DDLIST != 0 -#include "lv_ddlist.h" #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" #include "../lv_core/lv_indev.h" #include "../lv_themes/lv_theme.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" #include "../lv_misc/lv_anim.h" /********************* diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 25dac8db1..e6f27b194 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_DDLIST != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index 429c6f9ca..4cf73e65a 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -7,10 +7,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_gauge.h" #if USE_LV_GAUGE != 0 -#include "lv_gauge.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_txt.h" diff --git a/lv_objx/lv_gauge.h b/lv_objx/lv_gauge.h index 112567c3c..3ac1908fc 100644 --- a/lv_objx/lv_gauge.h +++ b/lv_objx/lv_gauge.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_GAUGE != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 28a3d941c..f26b479e9 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_img.h" #if USE_LV_IMG != 0 /*Testing of dependencies*/ @@ -14,7 +14,6 @@ #error "lv_img: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " #endif -#include "lv_img.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_ufs.h" diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 44f05ded1..4922af074 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -13,12 +13,17 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_IMG != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_fs.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" #include "lv_label.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index d73e7892a..455b25b20 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -7,10 +7,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_kb.h" #if USE_LV_KB != 0 -#include "lv_kb.h" #include "lv_ta.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_kb.h b/lv_objx/lv_kb.h index 722e24bb6..5042432c5 100644 --- a/lv_objx/lv_kb.h +++ b/lv_objx/lv_kb.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_KB != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index 3ab0892d8..0cda61a08 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_label.h" #if USE_LV_LABEL != 0 -#include "lv_label.h" #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index 3f7eb1f85..d30110ab5 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -13,13 +13,18 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_LABEL != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_font.h" #include "../lv_misc/lv_txt.h" -#include "../lv_misc/lv_fonts/lv_symbol_def.h" +#include "../lv_misc/lv_symbol_def.h" /********************* * DEFINES diff --git a/lv_objx/lv_led.c b/lv_objx/lv_led.c index 57b33bdbf..985534da9 100644 --- a/lv_objx/lv_led.c +++ b/lv_objx/lv_led.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_led.h" #if USE_LV_LED != 0 -#include "lv_led.h" #include "../lv_themes/lv_theme.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_led.h b/lv_objx/lv_led.h index f262c751c..63f7898fb 100644 --- a/lv_objx/lv_led.h +++ b/lv_objx/lv_led.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_LED != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_line.c b/lv_objx/lv_line.c index ae548a541..cef87180e 100644 --- a/lv_objx/lv_line.c +++ b/lv_objx/lv_line.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_line.h" #if USE_LV_LINE != 0 -#include "lv_line.h" #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_math.h" #include diff --git a/lv_objx/lv_line.h b/lv_objx/lv_line.h index 3ffebf6a0..70883bac5 100644 --- a/lv_objx/lv_line.h +++ b/lv_objx/lv_line.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_LINE != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index b3dfceff9..1c6c5917f 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_list.h" #if USE_LV_LIST != 0 -#include "lv_list.h" #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_anim.h" diff --git a/lv_objx/lv_list.h b/lv_objx/lv_list.h index 14e5e5b24..2b40f7ffe 100644 --- a/lv_objx/lv_list.h +++ b/lv_objx/lv_list.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_LIST != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index 67ba8c0d7..adc5879f7 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_lmeter.h" #if USE_LV_LMETER != 0 -#include "lv_lmeter.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" #include "../lv_core/lv_group.h" diff --git a/lv_objx/lv_lmeter.h b/lv_objx/lv_lmeter.h index 12ec82941..f33acbe57 100644 --- a/lv_objx/lv_lmeter.h +++ b/lv_objx/lv_lmeter.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_LMETER != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 4692f1d1a..7ecd1f7fb 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -7,10 +7,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_mbox.h" #if USE_LV_MBOX != 0 -#include "lv_mbox.h" #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_anim.h" diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index 459d0930b..66588b3c3 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_MBOX != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_objx.mk b/lv_objx/lv_objx.mk index 2100ee5a2..65553680e 100644 --- a/lv_objx/lv_objx.mk +++ b/lv_objx/lv_objx.mk @@ -5,7 +5,7 @@ CSRCS += lv_ddlist.c CSRCS += lv_kb.c CSRCS += lv_line.c CSRCS += lv_mbox.c -CSRCS += lv_preloader.c +CSRCS += lv_preload.c CSRCS += lv_roller.c CSRCS += lv_tabview.c CSRCS += lv_btn.c diff --git a/lv_objx/lv_objx_templ.c b/lv_objx/lv_objx_templ.c index 5afb3a4d0..3a97803eb 100644 --- a/lv_objx/lv_objx_templ.c +++ b/lv_objx/lv_objx_templ.c @@ -13,10 +13,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +//#include "lv_templ.h" /*TODO uncomment this*/ #if USE_LV_TEMPL != 0 -#include "lv_templ.h" /********************* * DEFINES diff --git a/lv_objx/lv_objx_templ.h b/lv_objx/lv_objx_templ.h index 0521ebfff..b921a24c0 100644 --- a/lv_objx/lv_objx_templ.h +++ b/lv_objx/lv_objx_templ.h @@ -21,7 +21,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_TEMPL != 0 #include "../lv_core/lv_obj.h" diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index d475ec7de..18081d910 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -6,11 +6,10 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "../lv_objx/lv_page.h" #if USE_LV_PAGE != 0 #include "../lv_core/lv_group.h" -#include "../lv_objx/lv_page.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" #include "../lv_core/lv_refr.h" diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index 84ffe4928..f6c746516 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_PAGE != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 04a98830f..d8ceacd58 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_roller.h" #if USE_LV_ROLLER != 0 -#include "lv_roller.h" #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index a789ea8de..71c5d9543 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_ROLLER != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 034187749..5d907d0f8 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -7,10 +7,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_slider.h" #if USE_LV_SLIDER != 0 -#include "lv_slider.h" #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index 2685d0230..1cae9b00e 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_SLIDER != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index f2e5efa9f..48746d341 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -6,7 +6,7 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_sw.h" #if USE_LV_SW != 0 /*Testing of dependencies*/ @@ -14,7 +14,6 @@ #error "lv_sw: lv_slider is required. Enable it in lv_conf.h (USE_LV_SLIDER 1) " #endif -#include "lv_sw.h" #include "../lv_themes/lv_theme.h" /********************* diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index 64c40754e..898b4efe0 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_SW != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index a10660470..11a94e115 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -7,10 +7,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_ta.h" #if USE_LV_TA != 0 -#include "lv_ta.h" #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index faa19508c..a89383d7c 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_TA != 0 /*Testing of dependencies*/ diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index b0fa9e302..ffd1dd496 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_tabview.h" #if USE_LV_TABVIEW != 0 -#include "lv_tabview.h" #include "lv_btnm.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_anim.h" diff --git a/lv_objx/lv_tabview.h b/lv_objx/lv_tabview.h index 9e9d75031..beee8e112 100644 --- a/lv_objx/lv_tabview.h +++ b/lv_objx/lv_tabview.h @@ -13,9 +13,13 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" -#if USE_LV_TABVIEW != 0 +#endif +#if USE_LV_TABVIEW != 0 /*Testing of dependencies*/ #if USE_LV_BTNM == 0 diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 2beebd9a8..23546938c 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -6,10 +6,9 @@ /********************* * INCLUDES *********************/ -#include "../../lv_conf.h" +#include "lv_win.h" #if USE_LV_WIN != 0 -#include "lv_win.h" #include "../lv_themes/lv_theme.h" /********************* diff --git a/lv_objx/lv_win.h b/lv_objx/lv_win.h index 8eca3d194..94be309de 100644 --- a/lv_objx/lv_win.h +++ b/lv_objx/lv_win.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #if USE_LV_WIN != 0 /*Testing of dependencies*/ diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 97bff38fc..65f34b7fa 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -13,7 +13,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif + #include "../lv_core/lv_style.h" /********************* diff --git a/lv_themes/lv_theme_alien.h b/lv_themes/lv_theme_alien.h index a9506e369..7d97cb8c6 100644 --- a/lv_themes/lv_theme_alien.h +++ b/lv_themes/lv_theme_alien.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_ALIEN diff --git a/lv_themes/lv_theme_default.h b/lv_themes/lv_theme_default.h index e807ac7bd..9ec74a951 100644 --- a/lv_themes/lv_theme_default.h +++ b/lv_themes/lv_theme_default.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_DEFAULT diff --git a/lv_themes/lv_theme_material.h b/lv_themes/lv_theme_material.h index b7f1a2d71..306f0957e 100644 --- a/lv_themes/lv_theme_material.h +++ b/lv_themes/lv_theme_material.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_MATERIAL diff --git a/lv_themes/lv_theme_mono.h b/lv_themes/lv_theme_mono.h index 79293a572..a7c8c8c2f 100644 --- a/lv_themes/lv_theme_mono.h +++ b/lv_themes/lv_theme_mono.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_MONO diff --git a/lv_themes/lv_theme_night.h b/lv_themes/lv_theme_night.h index 5780b3462..3c760c319 100644 --- a/lv_themes/lv_theme_night.h +++ b/lv_themes/lv_theme_night.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_NIGHT diff --git a/lv_themes/lv_theme_templ.h b/lv_themes/lv_theme_templ.h index 28ab0d280..e70af4fe1 100644 --- a/lv_themes/lv_theme_templ.h +++ b/lv_themes/lv_theme_templ.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_TEMPL diff --git a/lv_themes/lv_theme_zen.h b/lv_themes/lv_theme_zen.h index 49080767c..27b190922 100644 --- a/lv_themes/lv_theme_zen.h +++ b/lv_themes/lv_theme_zen.h @@ -13,7 +13,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else #include "../../lv_conf.h" +#endif #if USE_LV_THEME_ZEN