update lvgl 5.2 +update example + update configuration

This commit is contained in:
zaltora 2018-10-07 12:11:24 +02:00
parent 20b0b22cb0
commit be8c8c84b6
4 changed files with 58 additions and 36 deletions

View file

@ -2,15 +2,15 @@
* @file lv_conf.h
*
*/
#if 1 /*Remove this to enable the content (Delete the last #endif too!)*/
#ifndef LV_CONF_H
#define LV_CONF_H
/*----------------
* Dynamic memory
*----------------*/
//include complement to LV_TICK_CUSTOM_INCLUDE.
#include "FreeRTOS.h"
/*===================
Dynamic memory
*===================*/
/* Memory size which will be used by the library
* to store the graphical objects and other data */
@ -39,12 +39,13 @@
* VDB makes the double buffering, you don't need to deal with it!
* Typical size: ~1/10 screen */
#define LV_VDB_SIZE (0 * LV_HOR_RES) /*Size of VDB in pixel count (1/10 screen size is good for first)*/
#define LV_VDB_ADR 0 /*Place VDB to a specific address (e.g. in external RAM) (0: allocate automatically into RAM)*/
#define LV_VDB_PX_BPP LV_COLOR_SIZE /*Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays. (Set `disp_drv->vdb_wr` and `disp_drv->vdb_rd` too)*/
#define LV_VDB_ADR 0 /*Place VDB to a specific address (e.g. in external RAM) (0: allocate automatically into RAM; LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`)*/
/* Use two Virtual Display buffers (VDB) parallelize rendering and flushing (optional)
* The flushing should use DMA to write the frame buffer in the background*/
#define LV_VDB_DOUBLE 0 /*1: Enable the use of 2 VDBs*/
#define LV_VDB2_ADR 0 /*Place VDB2 to a specific address (e.g. in external RAM) (0: allocate automatically into RAM)*/
#define LV_VDB2_ADR 0 /*Place VDB2 to a specific address (e.g. in external RAM) (0: allocate automatically into RAM; LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`)*/
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 0 /*1: Enable anti-aliasing*/
@ -66,46 +67,57 @@
#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
/*Color settings*/
#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/24*/
#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/
#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/
#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/
/*Text settings*/
#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */
#define LV_TXT_UTF8 0 /*Enable UTF-8 coded Unicode character usage */
#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
/*Graphics feature usage*/
#define USE_LV_ANIMATION 1 /*1: Enable all animations*/
#define USE_LV_SHADOW 1 /*1: Enable shadows*/
#define USE_LV_SHADOW 0 /*1: Enable shadows*/
#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/
#define USE_LV_GPU 1 /*1: Enable GPU interface*/
#define USE_LV_GPU 0 /*1: Enable GPU interface*/
#define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/
#define USE_LV_FILESYSTEM 1 /*1: Enable file system (required by images*/
/*Compiler settings*/
#define LV_ATTRIBUTE_TICK_INC __attribute__((section(".iram1.text"))) /* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TASK_HANDLER __attribute__((section(".iram1.text"))) /* Define a custom attribute to `lv_task_handler` function */
#define LV_COMPILER_VLA_SUPPORTED 0 /* 1: Variable length array is supported. (In Visual studio it is not supported)*/
#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 0 /* 1: Initialization with non constant values are supported (In Visual studio it is not supported)*/
//#define _CRT_SECURE_NO_WARNINGS /* Visual Studio needs it to use `strcpy`, `sprintf` etc*/
#define LV_ATTRIBUTE_TICK_INC __attribute__((section(".iram1.text"))) /* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TASK_HANDLER __attribute__((section(".iram1.text"))) /* Define a custom attribute to `lv_task_handler` function */
#define LV_COMPILER_VLA_SUPPORTED 0 /* 1: Variable length array is supported*/
#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 0 /* 1: Initialization with non constant values are supported */
/*HAL settings*/
#define LV_TICK_CUSTOM 1 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */
#if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "task.h"
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (xTaskGetTickCount()*10) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/
/*Log settings*/
#define USE_LV_LOG 1 /*Enable/disable the log module*/
#define USE_LV_LOG 0 /*Enable/disable the log module*/
#if USE_LV_LOG
/* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*/
#define LV_LOG_LEVEL LV_LOG_LEVEL_INFO
#define LV_LOG_LEVEL LV_LOG_LEVEL_INFO
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
#define LV_LOG_PRINTF 0
#define LV_LOG_PRINTF 0
#endif /*USE_LV_LOG*/
/*================
* THEME USAGE
*================*/
#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
#define USE_LV_THEME_TEMPL 0 /*Just for test*/
#define USE_LV_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/
#define USE_LV_THEME_ALIEN 0 /*Dark futuristic theme*/
@ -113,6 +125,7 @@
#define USE_LV_THEME_MONO 0 /*Mono color theme for monochrome displays*/
#define USE_LV_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/
#define USE_LV_THEME_ZEN 0 /*Peaceful, mainly light theme */
#define USE_LV_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
/*==================
* FONT USAGE
@ -141,18 +154,18 @@
#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0
#define USE_LV_FONT_SYMBOL_40 0
#define USE_LV_FONT_MONOSPACE_8 0
#define USE_LV_FONT_MONOSPACE_8 0
/* Optionally declare your custom fonts here.
* You can use these fonts as defult font too
* and they will be avialale globally. E.g.
* You can use these fonts as default font too
* and they will be available globally. E.g.
* #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
* LV_FONT_DECLARE(my_font_2) \
* LV_FONT_DECLARE(my_font_2) \
*/
#define LV_FONT_CUSTOM_DECLARE
#ifndef LV_FONT_DEFAULT
#define LV_FONT_DEFAULT &lv_font_dejavu_10 /*Always set a default font from the built-in fonts*/
#endif
/*===================
* LV_OBJ SETTINGS
*==================*/
@ -178,6 +191,10 @@
/*Image (dependencies: lv_label*/
#define USE_LV_IMG 1
#if USE_LV_IMG != 0
#define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/
#define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/
#endif
/*Line (dependencies: -*/
#define USE_LV_LINE 1
@ -249,6 +266,12 @@
/*Button (dependencies: lv_cont*/
#define USE_LV_BTN 1
#if USE_LV_BTN != 0
#define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/
#endif
/*Image Button (dependencies: lv_btn*/
#define USE_LV_IMGBTN 1
/*Button matrix (dependencies: -)*/
#define USE_LV_BTNM 1
@ -291,6 +314,3 @@
#endif
#endif /*LV_CONF_H*/
#endif /*Remove this to enable the content*/

View file

@ -118,6 +118,7 @@ void font_timer(TimerHandle_t h)
}
#if (!LV_TICK_CUSTOM)
#if (TICK_HANDLER)
void IRAM vApplicationTickHook(void) {
lv_tick_inc(portTICK_PERIOD_MS);
@ -128,6 +129,7 @@ void lvgl_timer(TimerHandle_t xTimerHandle)
lv_tick_inc(TICK_INC_MS);
}
#endif
#endif
void user_init(void)
{
@ -194,7 +196,7 @@ void user_init(void)
font_timer_handle = xTimerCreate("font_timer", 5 * SECOND, pdTRUE, NULL, font_timer);
xTimerStart(font_timer_handle, 0);
#if (!TICK_HANDLER)
#if (!TICK_HANDLER && !LV_TICK_CUSTOM)
lvgl_timer_handle = xTimerCreate("lvgl_timer", TICK_INC_MS/portTICK_PERIOD_MS, pdTRUE, NULL, lvgl_timer);
xTimerStart(lvgl_timer_handle, 0);
#endif

@ -1 +1 @@
Subproject commit 6e005d978c0323426943d25e25082be922958506
Subproject commit c3afbc9819f5492a7fe7e7e18a37df95fb60f449

@ -1 +1 @@
Subproject commit 675715a917d9a6c35e4bd331d6600e829e361238
Subproject commit 41695bf9ac758ae3276424e06308e1bb89c4c019