lv_img, lv_gauge: test depedencies

This commit is contained in:
Kiss-Vamosi Gabor
2017-01-15 21:52:21 +01:00
parent 79885c70fc
commit df47565bd9
2 changed files with 27 additions and 1 deletions

View File

@@ -10,8 +10,27 @@
* INCLUDES
*********************/
#include "lv_conf.h"
#include "misc_conf.h"
#if USE_LV_GAUGE != 0
/*Testing of dependencies*/
#if USE_LV_RECT == 0
#error "lv_gauge: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) "
#endif
#if USE_LV_LABEL == 0
#error "lv_gauge: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
#endif
#if USE_LV_RECT == 0
#error "lv_gauge: lv_line is required. Enable it in lv_conf.h (USE_LV_LINE 1) "
#endif
#if USE_TRIGO == 0
#error "lv_gauge: trigo is required. Enable it in misc_conf.h (USE_TRIGO 1) "
#endif
#include "../lv_obj/lv_obj.h"
#include "lv_rect.h"
#include "lv_label.h"

View File

@@ -13,6 +13,14 @@
#include "misc_conf.h"
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
#if USE_FSINT == 0
#error "lv_img: fsint is required. Enable it in misc_conf.h (USE_FSINT 1) "
#endif
#if USE_UFS == 0
#error "lv_img: ufs is required. Enable it in misc_conf.h (USE_UFS 1) "
#endif
#include "../lv_obj/lv_obj.h"
#include "misc/fs/fsint.h"
@@ -116,7 +124,6 @@ void lv_img_set_auto_size(lv_obj_t * img, bool en);
/**
* Enable the upscaling with LV_DOWNSCALE.
* If enabled the object size will be same as the picture size.
* @param img pointer to an image
* @param en true: upscale enable, false: upscale disable
*/