dev 6.0 fixes

adjusted lv_conf.h to new template.

change paths to new directory structure 'src/..'
This commit is contained in:
Amir Gonnen 2019-03-18 01:38:48 +02:00
parent c57ba5fb2d
commit c837bcfbc2
4 changed files with 159 additions and 199 deletions

@ -1 +1 @@
Subproject commit c0a4c8f0b2faf505434f3d2394d6993062eeee69 Subproject commit fd1b05d621405335075c80f0a5fd9d0fa4acd10e

View File

@ -3,11 +3,35 @@
* *
*/ */
#if 1 /*Set it to "1" to enable the content*/
#ifndef LV_CONF_H #ifndef LV_CONF_H
#define LV_CONF_H #define LV_CONF_H
/*===================
Graphical settings
*===================*/
/* Horizontal and vertical resolution of the library.*/
#define LV_HOR_RES_MAX (480)
#define LV_VER_RES_MAX (320)
/*Color settings*/
#define LV_COLOR_DEPTH 32 /*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)*/
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/
/*Screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/
#define LV_REFR_PERIOD 30 /*[ms]*/
/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI 100 /*[px]*/
/*=================== /*===================
Dynamic memory Dynamic memory
*===================*/ *===================*/
@ -16,111 +40,38 @@
* to store the graphical objects and other data */ * to store the graphical objects and other data */
#define LV_MEM_CUSTOM 1 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ #define LV_MEM_CUSTOM 1 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/
#if LV_MEM_CUSTOM == 0 #if LV_MEM_CUSTOM == 0
#define LV_MEM_SIZE (64U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ # define LV_MEM_SIZE (64U * 1024U) /*Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
#define LV_MEM_ATTR /*Complier prefix for big array declaration*/ # define LV_MEM_ATTR /*Complier prefix for big array declaration*/
#define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ # define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
#else /*LV_MEM_CUSTOM*/ #else /*LV_MEM_CUSTOM*/
#define LV_MEM_CUSTOM_INCLUDE "lv_mp_mem_custom_include.h" /*Header for the dynamic memory function*/ # define LV_MEM_CUSTOM_INCLUDE "lv_mp_mem_custom_include.h" /*Header for the dynamic memory function*/
#define LV_MEM_CUSTOM_ALLOC m_malloc /*Wrapper to malloc*/ # define LV_MEM_CUSTOM_ALLOC m_malloc /*Wrapper to malloc*/
#define LV_MEM_CUSTOM_FREE m_free /*Wrapper to free*/ # define LV_MEM_CUSTOM_FREE m_free /*Wrapper to free*/
#endif /*LV_MEM_CUSTOM*/ #endif /*LV_MEM_CUSTOM*/
/* Enable GC for Micropython */ /* Garbage Collector settings
#define LV_ENABLE_GC 1 * Used if lvgl is binded to higher language and the memory is managed by that language */
#if LV_ENABLE_GC == 1 #define LV_ENABLE_GC 1 /* Enable GC for Micropython */
# define LV_MEM_CUSTOM_REALLOC m_realloc /*Wrapper to realloc*/ #if LV_ENABLE_GC != 0
# define LV_MEM_CUSTOM_GET_SIZE gc_nbytes /*Wrapper to lv_mem_get_size*/ # define LV_MEM_CUSTOM_REALLOC m_realloc /*Wrapper to realloc*/
# define LV_GC_INCLUDE "py/mpstate.h" # define LV_MEM_CUSTOM_GET_SIZE gc_nbytes /*Wrapper to lv_mem_get_size*/
# define LV_GC_ROOT(x) MP_STATE_PORT(x) # define LV_GC_INCLUDE "py/mpstate.h"
# define LV_GC_ROOT(x) MP_STATE_PORT(x)
#endif /* LV_ENABLE_GC */ #endif /* LV_ENABLE_GC */
/*===================
Graphical settings
*===================*/
/* Horizontal and vertical resolution of the library.*/
#ifndef LV_HOR_RES
#define LV_HOR_RES (440)
#endif
#ifndef LV_VER_RES
#define LV_VER_RES (340)
#endif
/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI 100
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/
/*Screen refresh period in milliseconds*/
#define LV_REFR_PERIOD 30
/*-----------------
* VDB settings
*----------------*/
/* VDB (Virtual Display Buffer) is an internal graphics buffer.
* To images will be drawn into this buffer first and then
* the buffer will be passed to your `disp_drv.disp_flush` function to
* copy it to your frame buffer.
* VDB is required for: buffered drawing, opacity, anti-aliasing and shadows
* Learn more: https://docs.littlevgl.com/#Drawing*/
/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES
* Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions
* will be called to draw to the frame buffer directly*/
#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10)
/* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays.
* Special formats are handled with `disp_drv.vdb_wr`)*/
#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */
/* 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()`*/
#define LV_VDB_ADR 0
/* 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
/* 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()`*/
#define LV_VDB2_ADR 0
/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen.
* Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display.
* The best if you do in the blank period of you display to avoid tearing effect.
* Requires:
* - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES
* - LV_VDB_DOUBLE = 1
*/
#define LV_VDB_TRUE_DOUBLE_BUFFERED 0
/*================= /*=================
Misc. setting Misc. setting
*=================*/ *=================*/
/*Input device settings*/ /*Input device settings*/
#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/ #define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ #define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/
#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ #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_TIME 400 /*Long press time in milliseconds*/
#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ #define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
/*Color settings*/
#ifndef LV_COLOR_DEPTH
#define LV_COLOR_DEPTH 32 /*Color depth: 1/8/16/32*/
#endif
#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*/ /*Text settings*/
#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */ #define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */
#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
@ -129,12 +80,16 @@
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */
/*Feature usage*/ /*Feature usage*/
#define USE_LV_ANIMATION 1 /*1: Enable all animations*/ #define LV_USE_ANIMATION 1 /*1: Enable all animations*/
#define USE_LV_SHADOW 1 /*1: Enable shadows*/ #define LV_USE_SHADOW 1 /*1: Enable shadows*/
#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ #define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/
#define USE_LV_GPU 1 /*1: Enable GPU interface*/ #if LV_USE_GROUP
#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)*/ typedef void * lv_group_user_data_t;
#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #endif /*LV_USE_GROUP*/
#define LV_USE_GPU 1 /*1: Enable GPU interface*/
#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/
#define LV_USE_USER_DATA_SINGLE 0 /*1: Add a `user_data` to drivers and objects*/
#define LV_USE_USER_DATA_MULTI 1 /*1: Add separate `user_data` for every callback*/
/*Compiler settings*/ /*Compiler settings*/
#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */
@ -145,39 +100,41 @@
/*HAL settings*/ /*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`) */ #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 #if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the sys time function*/ #define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/ #endif /*LV_TICK_CUSTOM*/
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 display driver*/
/*Log settings*/ /*Log settings*/
#define USE_LV_LOG 1 /*Enable/disable the log module*/ #define LV_USE_LOG 1 /*Enable/disable the log module*/
#if USE_LV_LOG #if LV_USE_LOG
/* How important log should be added: /* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events * LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*/ */
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
#define LV_LOG_PRINTF 1 /* 1: Print the log with 'printf'; 0: user need to register a callback*/
#endif /*USE_LV_LOG*/ # define LV_LOG_PRINTF 0
#endif /*LV_USE_LOG*/
/*================ /*================
* THEME USAGE * THEME USAGE
*================*/ *================*/
#define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
#define USE_LV_THEME_TEMPL 0 /*Just for test*/ #define LV_USE_THEME_TEMPL 0 /*Just for test*/
#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ #define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/
#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/ #define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/
#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/ #define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/
#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/ #define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/
#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ #define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/
#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */ #define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */
#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ #define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/
/*================== /*==================
* FONT USAGE * FONT USAGE
@ -186,27 +143,27 @@
/* More info about fonts: https://docs.littlevgl.com/#Fonts /* More info about fonts: https://docs.littlevgl.com/#Fonts
* To enable a built-in font use 1,2,4 or 8 values * To enable a built-in font use 1,2,4 or 8 values
* which will determine the bit-per-pixel. Higher value means smoother fonts */ * which will determine the bit-per-pixel. Higher value means smoother fonts */
#define USE_LV_FONT_DEJAVU_10 4 #define LV_USE_FONT_DEJAVU_10 4
#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 4 #define LV_USE_FONT_DEJAVU_10_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_10_CYRILLIC 4 #define LV_USE_FONT_DEJAVU_10_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_10 4 #define LV_USE_FONT_SYMBOL_10 4
#define USE_LV_FONT_DEJAVU_20 4 #define LV_USE_FONT_DEJAVU_20 4
#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 #define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 #define LV_USE_FONT_DEJAVU_20_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_20 4 #define LV_USE_FONT_SYMBOL_20 4
#define USE_LV_FONT_DEJAVU_30 4 #define LV_USE_FONT_DEJAVU_30 4
#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 4 #define LV_USE_FONT_DEJAVU_30_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_30_CYRILLIC 4 #define LV_USE_FONT_DEJAVU_30_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_30 4 #define LV_USE_FONT_SYMBOL_30 4
#define USE_LV_FONT_DEJAVU_40 4 #define LV_USE_FONT_DEJAVU_40 4
#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 4 #define LV_USE_FONT_DEJAVU_40_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_40_CYRILLIC 4 #define LV_USE_FONT_DEJAVU_40_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_40 4 #define LV_USE_FONT_SYMBOL_40 4
#define USE_LV_FONT_MONOSPACE_8 1 #define LV_USE_FONT_MONOSPACE_8 1
/* Optionally declare your custom fonts here. /* Optionally declare your custom fonts here.
* You can use these fonts as default font too * You can use these fonts as default font too
@ -222,9 +179,8 @@
/*=================== /*===================
* LV_OBJ SETTINGS * LV_OBJ SETTINGS
*==================*/ *==================*/
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ typedef void * lv_obj_user_data_t; /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ #define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/
#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
/*================== /*==================
* LV OBJ X USAGE * LV OBJ X USAGE
@ -238,47 +194,47 @@
*****************/ *****************/
/*Label (dependencies: -*/ /*Label (dependencies: -*/
#define USE_LV_LABEL 1 #define LV_USE_LABEL 1
#if USE_LV_LABEL != 0 #if LV_USE_LABEL != 0
#define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ # define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#endif #endif
/*Image (dependencies: lv_label*/ /*Image (dependencies: lv_label*/
#define USE_LV_IMG 1 #define LV_USE_IMG 1
#if USE_LV_IMG != 0 #if LV_USE_IMG != 0
#define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ # define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/
#define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/ # define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/
#endif #endif
/*Line (dependencies: -*/ /*Line (dependencies: -*/
#define USE_LV_LINE 1 #define LV_USE_LINE 1
/*Arc (dependencies: -)*/ /*Arc (dependencies: -)*/
#define USE_LV_ARC 1 #define LV_USE_ARC 1
/******************* /*******************
* Container objects * Container objects
*******************/ *******************/
/*Container (dependencies: -*/ /*Container (dependencies: -*/
#define USE_LV_CONT 1 #define LV_USE_CONT 1
/*Page (dependencies: lv_cont)*/ /*Page (dependencies: lv_cont)*/
#define USE_LV_PAGE 1 #define LV_USE_PAGE 1
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
#define USE_LV_WIN 1 #define LV_USE_WIN 1
/*Tab (dependencies: lv_page, lv_btnm)*/ /*Tab (dependencies: lv_page, lv_btnm)*/
#define USE_LV_TABVIEW 1 #define LV_USE_TABVIEW 1
#if USE_LV_TABVIEW != 0 # if LV_USE_TABVIEW != 0
#define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ # define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif #endif
/*Tileview (dependencies: lv_page) */ /*Tileview (dependencies: lv_page) */
#define USE_LV_TILEVIEW 1 #define LV_USE_TILEVIEW 1
#if USE_LV_TILEVIEW #if LV_USE_TILEVIEW
#define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ # define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif #endif
/************************* /*************************
@ -286,108 +242,112 @@
*************************/ *************************/
/*Bar (dependencies: -)*/ /*Bar (dependencies: -)*/
#define USE_LV_BAR 1 #define LV_USE_BAR 1
/*Line meter (dependencies: *;)*/ /*Line meter (dependencies: *;)*/
#define USE_LV_LMETER 1 #define LV_USE_LMETER 1
/*Gauge (dependencies:lv_bar, lv_lmeter)*/ /*Gauge (dependencies:lv_bar, lv_lmeter)*/
#define USE_LV_GAUGE 1 #define LV_USE_GAUGE 1
/*Chart (dependencies: -)*/ /*Chart (dependencies: -)*/
#define USE_LV_CHART 1 #define LV_USE_CHART 1
/*Table (dependencies: lv_label)*/ /*Table (dependencies: lv_label)*/
#define USE_LV_TABLE 1 #define LV_USE_TABLE 1
#if USE_LV_TABLE #if LV_USE_TABLE
#define LV_TABLE_COL_MAX 12 # define LV_TABLE_COL_MAX 12
#endif #endif
/*LED (dependencies: -)*/ /*LED (dependencies: -)*/
#define USE_LV_LED 1 #define LV_USE_LED 1
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
#define USE_LV_MBOX 1 #define LV_USE_MBOX 1
/*Text area (dependencies: lv_label, lv_page)*/ /*Text area (dependencies: lv_label, lv_page)*/
#define USE_LV_TA 1 #define LV_USE_TA 1
#if USE_LV_TA != 0 #if LV_USE_TA != 0
#define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ # define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/
#define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ # define LV_TA_PWD_SHOW_TIME 1500 /*ms*/
#endif #endif
/*Spinbox (dependencies: lv_ta)*/ /*Spinbox (dependencies: lv_ta)*/
#define USE_LV_SPINBOX 1 #define LV_USE_SPINBOX 1
/*Calendar (dependencies: -)*/ /*Calendar (dependencies: -)*/
#define USE_LV_CALENDAR 1 #define LV_USE_CALENDAR 1
/*Preload (dependencies: lv_arc)*/ /*Preload (dependencies: lv_arc)*/
#define USE_LV_PRELOAD 1 #define LV_USE_PRELOAD 1
#if USE_LV_PRELOAD != 0 #if LV_USE_PRELOAD != 0
#define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
#define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ # define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
#define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC # define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
#endif #endif
/*Canvas (dependencies: lv_img)*/ /*Canvas (dependencies: lv_img)*/
#define USE_LV_CANVAS 1 #define LV_USE_CANVAS 1
/************************* /*************************
* User input objects * User input objects
*************************/ *************************/
/*Button (dependencies: lv_cont*/ /*Button (dependencies: lv_cont*/
#define USE_LV_BTN 1 #define LV_USE_BTN 1
#if USE_LV_BTN != 0 #if LV_USE_BTN != 0
#define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/ # define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
#endif #endif
/*Image Button (dependencies: lv_btn*/ /*Image Button (dependencies: lv_btn*/
#define USE_LV_IMGBTN 1 #define LV_USE_IMGBTN 1
#if USE_LV_IMGBTN #if LV_USE_IMGBTN
#define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ # define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
#endif #endif
/*Button matrix (dependencies: -)*/ /*Button matrix (dependencies: -)*/
#define USE_LV_BTNM 1 #define LV_USE_BTNM 1
/*Keyboard (dependencies: lv_btnm)*/ /*Keyboard (dependencies: lv_btnm)*/
#define USE_LV_KB 1 #define LV_USE_KB 1
/*Check box (dependencies: lv_btn, lv_label)*/ /*Check box (dependencies: lv_btn, lv_label)*/
#define USE_LV_CB 1 #define LV_USE_CB 1
/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
#define USE_LV_LIST 1 #define LV_USE_LIST 1
#if USE_LV_LIST != 0 #if LV_USE_LIST != 0
#define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ # define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */
#endif #endif
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
#define USE_LV_DDLIST 1 #define LV_USE_DDLIST 1
#if USE_LV_DDLIST != 0 #if LV_USE_DDLIST != 0
#define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ # define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/
#endif #endif
/*Roller (dependencies: lv_ddlist)*/ /*Roller (dependencies: lv_ddlist)*/
#define USE_LV_ROLLER 1 #define LV_USE_ROLLER 1
#if USE_LV_ROLLER != 0 #if LV_USE_ROLLER != 0
#define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/
#endif #endif
/*Slider (dependencies: lv_bar)*/ /*Slider (dependencies: lv_bar)*/
#define USE_LV_SLIDER 1 #define LV_USE_SLIDER 1
/*Switch (dependencies: lv_slider)*/ /*Switch (dependencies: lv_slider)*/
#define USE_LV_SW 1 #define LV_USE_SW 1
/************************* /*************************
* Non-user section * Non-user section
*************************/ *************************/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
#define _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS
#endif #endif
/*--END OF LV_CONF_H--*/
/*Be sure every define has a default value*/
#include "lv_conf_checker.h"
#endif /*LV_CONF_H*/ #endif /*LV_CONF_H*/
#endif /*End of "Content enable"*/

View File

@ -225,7 +225,7 @@ extern const struct _mp_obj_module_t mp_module_fb;
#define MICROPY_PY_USELECT_DEF #define MICROPY_PY_USELECT_DEF
#endif #endif
#if MICROPY_PY_LVGL #if MICROPY_PY_LVGL
#include "lib/lv_bindings/lvgl/lv_misc/lv_gc.h" #include "lib/lv_bindings/lvgl/src/lv_misc/lv_gc.h"
#define MICROPY_PY_LVGL_DEF \ #define MICROPY_PY_LVGL_DEF \
{ MP_OBJ_NEW_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl },\ { MP_OBJ_NEW_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl },\
{ MP_OBJ_NEW_QSTR(MP_QSTR_lvindev), (mp_obj_t)&mp_module_lvindev},\ { MP_OBJ_NEW_QSTR(MP_QSTR_lvindev), (mp_obj_t)&mp_module_lvindev},\

View File

@ -123,7 +123,7 @@ endif
LVGL_BINDING_DIR = $(TOP)/lib/lv_bindings LVGL_BINDING_DIR = $(TOP)/lib/lv_bindings
LVGL_DIR = $(LVGL_BINDING_DIR)/lvgl LVGL_DIR = $(LVGL_BINDING_DIR)/lvgl
LVGL_GENERIC_DRV_DIR = $(LVGL_BINDING_DIR)/driver/generic LVGL_GENERIC_DRV_DIR = $(LVGL_BINDING_DIR)/driver/generic
INC += -I$(LVGL_DIR) -I$(LVGL_BINDING_DIR)/include INC += -I$(LVGL_DIR)/src -I$(LVGL_BINDING_DIR)/include
ALL_LVGL_SRC = $(shell find $(LVGL_DIR) -type f) $(TOP)/lib/lv_conf.h ALL_LVGL_SRC = $(shell find $(LVGL_DIR) -type f) $(TOP)/lib/lv_conf.h
LVGL_PP = $(BUILD)/lvgl/lvgl.pp.c LVGL_PP = $(BUILD)/lvgl/lvgl.pp.c
LVGL_MPY = $(BUILD)/lvgl/lv_mpy.c LVGL_MPY = $(BUILD)/lvgl/lv_mpy.c
@ -137,7 +137,7 @@ $(LVGL_MPY): $(ALL_LVGL_SRC) $(LVGL_BINDING_DIR)/gen/gen_mpy.py
$(Q)$(PYTHON) $(LVGL_BINDING_DIR)/gen/gen_mpy.py -X anim -X group -X task -E $(LVGL_PP) $(LVGL_DIR)/lvgl.h > $@ $(Q)$(PYTHON) $(LVGL_BINDING_DIR)/gen/gen_mpy.py -X anim -X group -X task -E $(LVGL_PP) $(LVGL_DIR)/lvgl.h > $@
CFLAGS_MOD += -Wno-unused-function CFLAGS_MOD += -Wno-unused-function
SRC_MOD += $(subst $(TOP)/,,$(shell find $(LVGL_DIR) $(LVGL_GENERIC_DRV_DIR) -type f -name "*.c") $(LVGL_MPY)) SRC_MOD += $(subst $(TOP)/,,$(shell find $(LVGL_DIR)/src $(LVGL_GENERIC_DRV_DIR) -type f -name "*.c") $(LVGL_MPY))
# py object files # py object files
PY_CORE_O_BASENAME = $(addprefix py/,\ PY_CORE_O_BASENAME = $(addprefix py/,\