2016-06-08 07:25:08 +02:00
/**
* @ file lv_conf . h
2018-06-19 09:49:58 +02:00
*
2016-06-08 07:25:08 +02:00
*/
2018-10-05 10:38:49 +02:00
/*
* COPY THIS FILE AS lv_conf . h
*/
#if 0 /*Set it to "1" to enable content*/
2017-01-02 15:00:21 +01:00
2017-11-19 21:54:07 +01:00
# ifndef LV_CONF_H
# define LV_CONF_H
2018-09-19 16:52:40 +03:00
/*===================
Dynamic memory
* = = = = = = = = = = = = = = = = = = = */
2018-02-23 17:07:02 +01:00
/* Memory size which will be used by the library
* to store the graphical objects and other data */
2017-11-26 13:13:45 +01:00
# define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/
# if LV_MEM_CUSTOM == 0
2018-03-01 12:52:35 +01:00
# define LV_MEM_SIZE (32U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
2017-11-26 13:13:45 +01:00
# define LV_MEM_ATTR /*Complier prefix for big array declaration*/
2017-12-03 00:36:31 +01:00
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
2017-11-26 13:13:45 +01:00
# else /*LV_MEM_CUSTOM*/
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
2017-12-07 19:27:13 +01:00
# endif /*LV_MEM_CUSTOM*/
2017-11-19 21:54:07 +01:00
2017-01-02 15:00:21 +01:00
/*===================
2016-06-08 07:25:08 +02:00
Graphical settings
2018-03-01 12:52:35 +01:00
* = = = = = = = = = = = = = = = = = = = */
2016-06-08 07:25:08 +02:00
2017-12-07 19:27:13 +01:00
/* Horizontal and vertical resolution of the library.*/
2017-12-22 15:47:12 +01:00
# define LV_HOR_RES (320)
# define LV_VER_RES (240)
2017-12-07 19:22:23 +01:00
# define LV_DPI 100
2017-04-24 16:16:36 +02:00
2018-02-23 13:56:04 +01:00
/* Size of VDB (Virtual Display Buffer: the internal graphics buffer).
* Required for buffered drawing , opacity and anti - aliasing
* VDB makes the double buffering , you don ' t need to deal with it !
* Typical size : ~ 1 / 10 screen */
2018-09-12 09:03:48 +02:00
# define LV_VDB_SIZE (30 * LV_HOR_RES) /*Size of VDB in pixel count (1/10 screen size is good for first)*/
# 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()`)*/
2017-11-19 21:54:07 +01:00
2018-01-02 12:40:09 +01:00
/* Use two Virtual Display buffers (VDB) parallelize rendering and flushing (optional)
2017-11-29 15:41:57 +01:00
* The flushing should use DMA to write the frame buffer in the background */
2018-01-02 12:40:09 +01:00
# define LV_VDB_DOUBLE 0 /*1: Enable the use of 2 VDBs*/
2018-09-12 09:03:48 +02:00
# 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()`)*/
2017-11-29 15:41:57 +01:00
2018-02-23 13:56:04 +01:00
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
2018-09-21 14:15:26 +02:00
# define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/
2017-12-07 19:27:13 +01:00
/*Screen refresh settings*/
2018-10-05 10:38:49 +02:00
# define LV_REFR_PERIOD 30 /*Screen refresh period in milliseconds*/
2017-12-07 19:27:13 +01:00
# define LV_INV_FIFO_SIZE 32 /*The average count of objects on a screen */
2018-02-23 13:56:04 +01:00
2016-06-08 07:25:08 +02:00
/*=================
Misc . setting
* = = = = = = = = = = = = = = = = = */
2017-11-19 21:54:07 +01:00
/*Input device settings*/
2017-11-26 13:13:45 +01:00
# define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/
2018-03-04 17:03:37 +01:00
# define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/
2017-12-07 19:22:23 +01:00
# define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
2017-11-26 13:13:45 +01:00
# define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */
# define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
# define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
/*Color settings*/
2018-09-21 07:23:44 +02:00
# define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/
2018-09-02 23:04:12 +02:00
# 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)*/
2018-09-20 22:16:30 +02:00
# define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/
2018-09-21 07:23:44 +02:00
# define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/
2017-11-19 21:54:07 +01:00
2017-11-26 13:13:45 +01:00
/*Text settings*/
2018-01-02 12:40:09 +01:00
# define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */
# define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
2017-11-27 17:48:54 +01:00
2017-12-21 00:19:59 +01:00
/*Graphics feature usage*/
2018-01-02 12:40:09 +01:00
# define USE_LV_ANIMATION 1 /*1: Enable all animations*/
# define USE_LV_SHADOW 1 /*1: Enable shadows*/
2017-12-07 19:27:13 +01:00
# define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/
2017-12-22 15:47:12 +01:00
# define USE_LV_GPU 1 /*1: Enable GPU interface*/
2018-02-23 13:56:04 +01:00
# 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)*/
2018-01-02 12:40:09 +01:00
# define USE_LV_FILESYSTEM 1 /*1: Enable file system (required by images*/
2017-11-19 21:54:07 +01:00
2018-03-22 10:09:00 +01:00
/*Compiler settings*/
2018-09-19 16:52:40 +03:00
# define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */
# define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */
2018-10-03 09:00:32 +02:00
# define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/
# define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */
2018-01-15 11:03:50 +01:00
2018-09-06 01:28:58 +02:00
/*HAL settings*/
# define LV_TICK_CUSTOM 0 /*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 "Arduino.h" /*Header for the sys time function*/
# define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
# endif /*LV_TICK_CUSTOM*/
2018-07-07 08:54:40 +02:00
/*Log settings*/
2018-09-19 16:52:40 +03:00
# define USE_LV_LOG 1 /*Enable/disable the log module*/
2018-07-07 08:54:40 +02:00
# if USE_LV_LOG
2018-07-25 17:58:34 +02:00
/* How important log should be added:
2018-09-19 16:52:40 +03:00
* 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
2018-07-25 17:58:34 +02:00
*/
2018-09-19 16:52:40 +03:00
# define LV_LOG_LEVEL LV_LOG_LEVEL_INFO
2018-07-25 17:58:34 +02:00
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
2018-09-19 16:52:40 +03:00
# define LV_LOG_PRINTF 0
2018-07-07 08:54:40 +02:00
# endif /*USE_LV_LOG*/
2017-12-21 00:19:59 +01:00
/*================
2017-11-19 21:54:07 +01:00
* THEME USAGE
2017-11-26 13:13:45 +01:00
* = = = = = = = = = = = = = = = = */
2018-09-19 16:52:40 +03:00
# define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
2018-09-06 01:28:58 +02:00
2017-11-19 22:24:57 +01:00
# define USE_LV_THEME_TEMPL 0 /*Just for test*/
2017-12-22 15:47:12 +01:00
# 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*/
# define USE_LV_THEME_NIGHT 0 /*Dark elegant theme*/
# 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 */
2018-09-18 07:50:05 +02:00
# define USE_LV_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
2017-12-03 00:38:08 +01:00
2017-11-26 13:13:45 +01:00
/*==================
* FONT USAGE
* = = = = = = = = = = = = = = = = = = = */
2018-02-23 17:07:02 +01:00
/* More info about fonts: https://littlevgl.com/basics#fonts
* To enable a built - in font use 1 , 2 , 4 or 8 values
* which will determine the bit - per - pixel */
2018-09-19 16:52:40 +03:00
# define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/
2017-11-26 13:13:45 +01:00
# define USE_LV_FONT_DEJAVU_10 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0
2017-11-26 13:13:45 +01:00
# define USE_LV_FONT_DEJAVU_10_CYRILLIC 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_SYMBOL_10 0
# define USE_LV_FONT_DEJAVU_20 4
# define USE_LV_FONT_DEJAVU_20_LATIN_SUP 0
2017-11-26 13:13:45 +01:00
# define USE_LV_FONT_DEJAVU_20_CYRILLIC 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_SYMBOL_20 4
2017-11-26 13:13:45 +01:00
# define USE_LV_FONT_DEJAVU_30 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0
2017-11-26 13:13:45 +01:00
# define USE_LV_FONT_DEJAVU_30_CYRILLIC 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_SYMBOL_30 0
# define USE_LV_FONT_DEJAVU_40 0
# define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0
2018-01-19 15:21:51 +01:00
# define USE_LV_FONT_DEJAVU_40_CYRILLIC 0
2018-02-23 13:56:04 +01:00
# define USE_LV_FONT_SYMBOL_40 0
2017-11-26 13:13:45 +01:00
2018-09-19 16:52:40 +03:00
# define USE_LV_FONT_MONOSPACE_8 0
2018-07-25 22:57:36 +02:00
2018-07-07 11:26:24 +02:00
/* Optionally declare your custom fonts here.
2018-10-05 10:38:49 +02:00
* You can use these fonts as default font too
* and they will be available globally . E . g .
2018-07-07 11:26:24 +02:00
* # define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE ( my_font_1 ) \
2018-09-19 16:52:40 +03:00
* LV_FONT_DECLARE ( my_font_2 ) \
2018-07-07 11:26:24 +02:00
*/
# define LV_FONT_CUSTOM_DECLARE
# define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/
2017-12-07 19:27:13 +01:00
/*===================
2017-11-26 14:39:22 +01:00
* LV_OBJ SETTINGS
* = = = = = = = = = = = = = = = = = = */
2017-11-26 13:13:45 +01:00
# define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/
# define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
2016-06-08 07:25:08 +02:00
/*==================
2018-06-19 09:49:58 +02:00
* LV OBJ X USAGE
2017-11-26 13:13:45 +01:00
* = = = = = = = = = = = = = = = = */
2018-01-02 12:40:09 +01:00
/*
* Documentation of the object types : https : //littlevgl.com/object-types
*/
2017-01-02 15:00:21 +01:00
2017-04-24 16:16:36 +02:00
/*****************
* Simple object
* * * * * * * * * * * * * * * * */
2016-06-08 07:25:08 +02:00
2017-01-02 15:29:05 +01:00
/*Label (dependencies: -*/
2016-06-08 07:25:08 +02:00
# define USE_LV_LABEL 1
2016-12-17 21:22:16 +01:00
# if USE_LV_LABEL != 0
2018-03-01 13:17:29 +01:00
# define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
2016-12-17 21:22:16 +01:00
# endif
2016-06-08 07:25:08 +02:00
2018-02-23 13:56:04 +01:00
/*Image (dependencies: lv_label*/
2017-01-02 15:29:05 +01:00
# define USE_LV_IMG 1
2018-09-25 11:16:37 +02:00
# 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
2016-06-08 07:25:08 +02:00
2017-04-24 16:16:36 +02:00
/*Line (dependencies: -*/
# define USE_LV_LINE 1
2018-06-08 10:26:10 +02:00
/*Arc (dependencies: -)*/
# define USE_LV_ARC 1
2017-04-24 16:16:36 +02:00
/*******************
2017-11-30 11:35:33 +01:00
* Container objects
2017-04-24 16:16:36 +02:00
* * * * * * * * * * * * * * * * * * */
/*Container (dependencies: -*/
# define USE_LV_CONT 1
2017-05-15 09:14:48 +02:00
/*Page (dependencies: lv_cont)*/
2016-06-08 07:25:08 +02:00
# define USE_LV_PAGE 1
2018-02-23 13:56:04 +01:00
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
2017-04-24 16:16:36 +02:00
# define USE_LV_WIN 1
2017-01-02 15:00:21 +01:00
2018-02-23 13:56:04 +01:00
/*Tab (dependencies: lv_page, lv_btnm)*/
2017-08-23 14:23:07 +02:00
# define USE_LV_TABVIEW 1
# if USE_LV_TABVIEW != 0
2018-01-02 12:40:09 +01:00
# define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
2017-08-23 14:23:07 +02:00
# endif
2017-04-24 16:16:36 +02:00
/*************************
2017-11-30 11:35:33 +01:00
* Data visualizer objects
2017-04-24 16:16:36 +02:00
* * * * * * * * * * * * * * * * * * * * * * * * */
/*Bar (dependencies: -)*/
2017-11-19 21:54:07 +01:00
# define USE_LV_BAR 1
2017-04-24 16:16:36 +02:00
2018-02-23 13:56:04 +01:00
/*Line meter (dependencies: *;)*/
2017-04-24 16:16:36 +02:00
# define USE_LV_LMETER 1
2017-12-21 00:19:59 +01:00
/*Gauge (dependencies:bar, lmeter)*/
2017-04-24 16:16:36 +02:00
# define USE_LV_GAUGE 1
2016-06-08 07:25:08 +02:00
2017-04-24 16:16:36 +02:00
/*Chart (dependencies: -)*/
# define USE_LV_CHART 1
2016-09-30 13:35:54 +02:00
2017-05-15 09:14:48 +02:00
/*LED (dependencies: -)*/
2017-01-02 15:00:21 +01:00
# define USE_LV_LED 1
2016-09-30 13:35:54 +02:00
2018-02-23 13:56:04 +01:00
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
2017-04-24 16:16:36 +02:00
# define USE_LV_MBOX 1
2016-09-30 13:35:54 +02:00
2017-01-02 15:29:05 +01:00
/*Text area (dependencies: lv_label, lv_page)*/
2017-01-02 15:00:21 +01:00
# define USE_LV_TA 1
# if USE_LV_TA != 0
2017-12-21 00:19:59 +01:00
# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/
# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/
2017-01-02 15:00:21 +01:00
# endif
2016-09-30 13:35:54 +02:00
2018-06-08 09:51:11 +02:00
/*Calendar (dependencies: -)*/
# define USE_LV_CALENDAR 1
2018-06-11 10:36:36 +02:00
/*Preload (dependencies: arc)*/
# define USE_LV_PRELOAD 1
# if USE_LV_PRELOAD != 0
2018-06-19 09:49:58 +02:00
# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
2018-06-11 10:36:36 +02:00
# endif
2017-04-24 16:16:36 +02:00
/*************************
2017-11-30 11:35:33 +01:00
* User input objects
2017-04-24 16:16:36 +02:00
* * * * * * * * * * * * * * * * * * * * * * * * */
/*Button (dependencies: lv_cont*/
# define USE_LV_BTN 1
2018-09-21 06:56:37 +02:00
# if USE_LV_BTN != 0
2018-09-21 14:16:10 +02:00
# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/
2018-09-21 06:56:37 +02:00
# endif
2018-09-21 14:16:10 +02:00
2018-09-06 20:57:59 +02:00
/*Image Button (dependencies: lv_btn*/
# define USE_LV_IMGBTN 1
2017-04-24 16:16:36 +02:00
/*Button matrix (dependencies: -)*/
2017-01-02 15:00:21 +01:00
# define USE_LV_BTNM 1
2016-09-30 13:35:54 +02:00
2018-02-23 13:56:04 +01:00
/*Keyboard (dependencies: lv_btnm)*/
2017-11-19 21:54:07 +01:00
# define USE_LV_KB 1
2017-08-23 14:23:07 +02:00
2017-04-24 16:16:36 +02:00
/*Check box (dependencies: lv_btn, lv_label)*/
# define USE_LV_CB 1
2017-11-19 21:54:07 +01:00
/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
2017-04-24 16:16:36 +02:00
# define USE_LV_LIST 1
2017-07-20 12:26:34 +02:00
# if USE_LV_LIST != 0
2017-11-19 21:54:07 +01:00
# define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */
2017-07-20 12:26:34 +02:00
# endif
2017-04-24 16:16:36 +02:00
/*Drop down list (dependencies: lv_page, lv_label)*/
# define USE_LV_DDLIST 1
2017-11-19 21:54:07 +01:00
# if USE_LV_DDLIST != 0
2017-12-11 15:42:23 +01:00
# define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/
2017-05-15 09:14:48 +02:00
# endif
2017-12-21 00:19:59 +01:00
/*Roller (dependencies: lv_ddlist)*/
2017-11-19 21:54:07 +01:00
# define USE_LV_ROLLER 1
2017-12-21 00:19:59 +01:00
# if USE_LV_ROLLER != 0
# define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/
# endif
2017-02-06 10:07:25 +01:00
2017-05-15 09:14:48 +02:00
/*Slider (dependencies: lv_bar)*/
2017-04-24 16:16:36 +02:00
# define USE_LV_SLIDER 1
2017-01-02 15:00:21 +01:00
2017-12-21 00:19:59 +01:00
/*Switch (dependencies: lv_slider)*/
# define USE_LV_SW 1
2018-03-22 14:41:55 +01:00
/*************************
* Non - user section
* * * * * * * * * * * * * * * * * * * * * * * * */
# ifdef _MSC_VER /* Disable warnings for Visual Studio*/
# define _CRT_SECURE_NO_WARNINGS
# endif
2017-01-02 15:00:21 +01:00
# endif /*LV_CONF_H*/
2018-02-23 13:56:04 +01:00
2016-06-08 07:25:08 +02:00
# endif /*Remove this to enable the content*/