chore(conf) update lv_conf_template.h with demos

This commit is contained in:
Gabor Kiss-Vamosi
2021-12-16 20:52:18 +01:00
parent 5414652a41
commit 6f40db2752
3 changed files with 145 additions and 1 deletions

View File

@@ -618,6 +618,35 @@
/*Enable the examples to be built with the library*/ /*Enable the examples to be built with the library*/
#define LV_BUILD_EXAMPLES 1 #define LV_BUILD_EXAMPLES 1
/*===================
* DEMO USAGE
====================*/
/*Show some widget*/
#define LV_USE_DEMO_WIDGETS 1
#if LV_USE_DEMO_WIDGETS
#define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif
/*Demonstrate the usage of encoder and keyboard*/
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 1
/*Benchmark your system*/
#define LV_USE_DEMO_BENCHMARK 1
/*Stress test for LVGL*/
#define LV_USE_DEMO_STRESS 1
/*Music player demo*/
#define LV_USE_DEMO_MUSIC 1
#if LV_USE_DEMO_MUSIC
# define LV_DEMO_MUSIC_SQUARE 0
# define LV_DEMO_MUSIC_LANDSCAPE 0
# define LV_DEMO_MUSIC_ROUND 0
# define LV_DEMO_MUSIC_LARGE 0
# define LV_DEMO_MUSIC_AUTO_PLAY 0
#endif
/*--END OF LV_CONF_H--*/ /*--END OF LV_CONF_H--*/
#endif /*LV_CONF_H*/ #endif /*LV_CONF_H*/

View File

@@ -422,7 +422,7 @@ void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay)
lv_anim_t a; lv_anim_t a;
lv_anim_init(&a); lv_anim_init(&a);
lv_anim_set_var(&a, obj); lv_anim_set_var(&a, obj);
lv_anim_set_values(&a, lv_obj_get_style_opa(obj, 0), LV_OPA_COVER); lv_anim_set_values(&a, 0, LV_OPA_COVER);
lv_anim_set_exec_cb(&a, fade_anim_cb); lv_anim_set_exec_cb(&a, fade_anim_cb);
lv_anim_set_ready_cb(&a, fade_in_anim_ready); lv_anim_set_ready_cb(&a, fade_in_anim_ready);
lv_anim_set_time(&a, time); lv_anim_set_time(&a, time);

View File

@@ -1981,6 +1981,121 @@
#endif #endif
#endif #endif
/*===================
* DEMO USAGE
====================*/
/*Show some widget*/
#ifndef LV_USE_DEMO_WIDGETS
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DEMO_WIDGETS
#define LV_USE_DEMO_WIDGETS CONFIG_LV_USE_DEMO_WIDGETS
#else
#define LV_USE_DEMO_WIDGETS 0
#endif
#else
#define LV_USE_DEMO_WIDGETS 1
#endif
#endif
#if LV_USE_DEMO_WIDGETS
#ifndef LV_DEMO_WIDGETS_SLIDESHOW
#ifdef CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
#define LV_DEMO_WIDGETS_SLIDESHOW CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
#else
#define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif
#endif
#endif
/*Demonstrate the usage of encoder and keyboard*/
#ifndef LV_USE_DEMO_KEYPAD_AND_ENCODER
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
#define LV_USE_DEMO_KEYPAD_AND_ENCODER CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
#else
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
#endif
#else
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 1
#endif
#endif
/*Benchmark your system*/
#ifndef LV_USE_DEMO_BENCHMARK
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DEMO_BENCHMARK
#define LV_USE_DEMO_BENCHMARK CONFIG_LV_USE_DEMO_BENCHMARK
#else
#define LV_USE_DEMO_BENCHMARK 0
#endif
#else
#define LV_USE_DEMO_BENCHMARK 1
#endif
#endif
/*Stress test for LVGL*/
#ifndef LV_USE_DEMO_STRESS
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DEMO_STRESS
#define LV_USE_DEMO_STRESS CONFIG_LV_USE_DEMO_STRESS
#else
#define LV_USE_DEMO_STRESS 0
#endif
#else
#define LV_USE_DEMO_STRESS 1
#endif
#endif
/*Music player demo*/
#ifndef LV_USE_DEMO_MUSIC
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DEMO_MUSIC
#define LV_USE_DEMO_MUSIC CONFIG_LV_USE_DEMO_MUSIC
#else
#define LV_USE_DEMO_MUSIC 0
#endif
#else
#define LV_USE_DEMO_MUSIC 1
#endif
#endif
#if LV_USE_DEMO_MUSIC
#ifndef LV_DEMO_MUSIC_SQUARE
#ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
#define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
#else
#define LV_DEMO_MUSIC_SQUARE 0
#endif
#endif
#ifndef LV_DEMO_MUSIC_LANDSCAPE
#ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
#define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
#else
#define LV_DEMO_MUSIC_LANDSCAPE 0
#endif
#endif
#ifndef LV_DEMO_MUSIC_ROUND
#ifdef CONFIG_LV_DEMO_MUSIC_ROUND
#define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
#else
#define LV_DEMO_MUSIC_ROUND 0
#endif
#endif
#ifndef LV_DEMO_MUSIC_LARGE
#ifdef CONFIG_LV_DEMO_MUSIC_LARGE
#define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
#else
#define LV_DEMO_MUSIC_LARGE 0
#endif
#endif
#ifndef LV_DEMO_MUSIC_AUTO_PLAY
#ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
#define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
#else
#define LV_DEMO_MUSIC_AUTO_PLAY 0
#endif
#endif
#endif
/*---------------------------------- /*----------------------------------