add tests and lv_conf_internal.h to use LV_CONF_PATH

This commit is contained in:
Gabor Kiss-Vamosi
2019-12-26 02:49:30 +01:00
parent abb4eb147d
commit 68984828c3
78 changed files with 538 additions and 373 deletions

14
lvgl.mk
View File

@@ -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

View File

@@ -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 <stdint.h>
#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)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 <stddef.h>
#include <stdbool.h>

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 <stdint.h>
#include "lv_img_buf.h"

View File

@@ -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 <stdint.h>
#include <stddef.h>
#include <stdbool.h>

View File

@@ -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"

View File

@@ -13,12 +13,6 @@ extern "C" {
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../../lv_conf.h"
#endif
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

View File

@@ -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,

View File

@@ -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"

View File

@@ -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 <stdbool.h>
#include <stdint.h>

View File

@@ -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 <stddef.h>

View File

@@ -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 <stdint.h>
#include <stdbool.h>

View File

@@ -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 <stdint.h>
#include <stdbool.h>

View File

@@ -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"

View File

@@ -13,14 +13,10 @@ extern "C" {
/*********************
* INCLUDES
*********************/
#include "../lv_conf_internal.h"
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../../lv_conf.h"
#endif
/*********************
* DEFINES

View File

@@ -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 <stdbool.h>
#include <stdint.h>

View File

@@ -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

View File

@@ -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,

View File

@@ -13,13 +13,6 @@ extern "C" {
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../../lv_conf.h"
#endif
#include <stdint.h>
#include <stdbool.h>
#include "lv_mem.h"

View File

@@ -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 <stdint.h>
/*********************

View File

@@ -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 <stdint.h>
#include <stddef.h>

View File

@@ -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"

View File

@@ -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

View File

@@ -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 <stdint.h>
#include <stdbool.h>

View File

@@ -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 <stdbool.h>
#include "lv_area.h"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

45
tests/Makefile Normal file
View File

@@ -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)

325
tests/build.py Normal file
View File

@@ -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)

46
tests/lv_test_conf.h Normal file
View File

@@ -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*/

16
tests/test_main.c Normal file
View File

@@ -0,0 +1,16 @@
#include "../lvgl.h"
#include <stdio.h>
#if LV_BUILD_TEST
int main(void)
{
printf("Call lv_init...\n");
lv_init();
printf("Exit with success!\n");
return 0;
}
#endif