From d5fb7ac93c16ab8078b463e621437c9e14c501b9 Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Sun, 13 Jun 2021 12:33:23 +0200 Subject: [PATCH 1/6] port to v7.11.0 --- lv_conf.h | 96 ++++++++++++++++++++++++++------------------------- lv_drivers | 2 +- lv_drv_conf.h | 13 ++++--- lvgl | 2 +- 4 files changed, 59 insertions(+), 54 deletions(-) diff --git a/lv_conf.h b/lv_conf.h index 5d3adae..ec3518c 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v7.7.0-dev + * Configuration file for v7.11.0 */ /* @@ -29,7 +29,7 @@ * - 16: RGB565 * - 32: ARGB8888 */ -#define LV_COLOR_DEPTH 32 +#define LV_COLOR_DEPTH 32 /* Swap the 2 bytes of RGB565 color. * Useful if the display has a 8 bit interface (e.g. SPI)*/ @@ -69,6 +69,9 @@ /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ typedef int16_t lv_coord_t; +/* Maximum buffer size to allocate for rotation. Only used if software rotation is enabled. */ +#define LV_DISP_ROT_MAX_BUF (10U * 1024U) + /*========================= Memory manager settings *=========================*/ @@ -80,9 +83,9 @@ typedef int16_t lv_coord_t; #define LV_MEM_CUSTOM 0 #if LV_MEM_CUSTOM == 0 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ -# define LV_MEM_SIZE (256 * 1024) +# define LV_MEM_SIZE (256U * 1024U) -/* Complier prefix for a big array declaration */ +/* Compiler prefix for a big array declaration */ # define LV_MEM_ATTR /* Set an address for the memory pool instead of allocating it as an array. @@ -127,14 +130,13 @@ typedef int16_t lv_coord_t; #define LV_INDEV_DEF_DRAG_THROW 10 /* Long press time in milliseconds. - * Time to send `LV_EVENT_LONG_PRESSSED`) */ + * Time to send `LV_EVENT_LONG_PRESSED`) */ #define LV_INDEV_DEF_LONG_PRESS_TIME 400 /* Repeated trigger period in long press [ms] * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ #define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 - /* Gesture threshold in pixels */ #define LV_INDEV_DEF_GESTURE_LIMIT 50 @@ -216,7 +218,7 @@ typedef void * lv_fs_drv_user_data_t; #endif /*1: Add a `user_data` to drivers and objects*/ -#define LV_USE_USER_DATA 1 +#define LV_USE_USER_DATA 1 /*1: Show CPU usage and FPS count in the right bottom corner*/ #define LV_USE_PERF_MONITOR 0 @@ -240,7 +242,7 @@ typedef void * lv_fs_drv_user_data_t; * (I.e. no new image decoder is added) * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. * However the opened images might consume additional RAM. - * LV_IMG_CACHE_DEF_SIZE must be >= 1 */ + * Set it to 0 to disable caching */ #define LV_IMG_CACHE_DEF_SIZE 1 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ @@ -312,7 +314,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i *===============*/ /*1: Enable the log module*/ -#define LV_USE_LOG 1 +#define LV_USE_LOG 1 #if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information @@ -325,7 +327,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i /* 1: Print the log with 'printf'; * 0: user need to register a callback with `lv_log_register_print_cb`*/ -# define LV_LOG_PRINTF 1 +# define LV_LOG_PRINTF 1 #endif /*LV_USE_LOG*/ /*================= @@ -336,7 +338,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * If an invalid parameter is found an error log message is printed and * the MCU halts at the error. (`LV_USE_LOG` should be enabled) * If you are debugging the MCU you can pause - * the debugger to see exactly where the issue is. + * the debugger to see exactly where the issue is. * * The behavior of asserts can be overwritten by redefining them here. * E.g. #define LV_ASSERT_MEM(p) @@ -351,19 +353,19 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i #define LV_USE_ASSERT_MEM 1 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ -#define LV_USE_ASSERT_MEM_INTEGRITY 1 +#define LV_USE_ASSERT_MEM_INTEGRITY 1 /* Check the strings. * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow) * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ -#define LV_USE_ASSERT_STR 1 +#define LV_USE_ASSERT_STR 1 /* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow) * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ -#define LV_USE_ASSERT_OBJ 1 +#define LV_USE_ASSERT_OBJ 1 /*Check if the styles are properly initialized. (Fast)*/ -#define LV_USE_ASSERT_STYLE 1 +#define LV_USE_ASSERT_STYLE 1 #endif /*LV_USE_DEBUG*/ @@ -371,7 +373,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * FONT USAGE *===================*/ -/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. * The symbols are available via `LV_SYMBOL_...` defines * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html * To create a new font go to: https://lvgl.com/ttf-font-to-c-array @@ -381,35 +383,36 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * https://fonts.google.com/specimen/Montserrat */ #define LV_FONT_MONTSERRAT_8 0 #define LV_FONT_MONTSERRAT_10 0 -#define LV_FONT_MONTSERRAT_12 1 -#define LV_FONT_MONTSERRAT_14 1 -#define LV_FONT_MONTSERRAT_16 1 -#define LV_FONT_MONTSERRAT_18 1 -#define LV_FONT_MONTSERRAT_20 1 -#define LV_FONT_MONTSERRAT_22 1 -#define LV_FONT_MONTSERRAT_24 1 -#define LV_FONT_MONTSERRAT_26 1 -#define LV_FONT_MONTSERRAT_28 1 -#define LV_FONT_MONTSERRAT_30 1 -#define LV_FONT_MONTSERRAT_32 1 -#define LV_FONT_MONTSERRAT_34 1 -#define LV_FONT_MONTSERRAT_36 1 -#define LV_FONT_MONTSERRAT_38 1 -#define LV_FONT_MONTSERRAT_40 1 -#define LV_FONT_MONTSERRAT_42 1 -#define LV_FONT_MONTSERRAT_44 1 -#define LV_FONT_MONTSERRAT_46 1 -#define LV_FONT_MONTSERRAT_48 1 +#define LV_FONT_MONTSERRAT_12 1 +#define LV_FONT_MONTSERRAT_14 1 +#define LV_FONT_MONTSERRAT_16 1 +#define LV_FONT_MONTSERRAT_18 1 +#define LV_FONT_MONTSERRAT_20 1 +#define LV_FONT_MONTSERRAT_22 1 +#define LV_FONT_MONTSERRAT_24 1 +#define LV_FONT_MONTSERRAT_26 1 +#define LV_FONT_MONTSERRAT_28 1 +#define LV_FONT_MONTSERRAT_30 1 +#define LV_FONT_MONTSERRAT_32 1 +#define LV_FONT_MONTSERRAT_34 1 +#define LV_FONT_MONTSERRAT_36 1 +#define LV_FONT_MONTSERRAT_38 1 +#define LV_FONT_MONTSERRAT_40 1 +#define LV_FONT_MONTSERRAT_42 1 +#define LV_FONT_MONTSERRAT_44 1 +#define LV_FONT_MONTSERRAT_46 1 +#define LV_FONT_MONTSERRAT_48 1 /* Demonstrate special features */ -#define LV_FONT_MONTSERRAT_12_SUBPX 1 -#define LV_FONT_MONTSERRAT_28_COMPRESSED 1 -#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1 -#define LV_FONT_SIMSUN_16_CJK 1 +#define LV_FONT_MONTSERRAT_12_SUBPX 1 +#define LV_FONT_MONTSERRAT_28_COMPRESSED 1 /*bpp = 3*/ +#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1 /*Hebrew, Arabic, PErisan letters and all their forms*/ +#define LV_FONT_SIMSUN_16_CJK 1 /*1000 most common CJK radicals*/ /*Pixel perfect monospace font * http://pelulamu.net/unscii/ */ -#define LV_FONT_UNSCII_8 1 +#define LV_FONT_UNSCII_8 1 +#define LV_FONT_UNSCII_16 0 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -477,10 +480,10 @@ typedef void * lv_font_user_data_t; #define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0x01a2b1) #define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0x44d1b6) #define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT -#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12 -#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14 -#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_16 -#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_18 +#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_14 +#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14 +#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_14 +#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_14 /*================= * Text settings @@ -513,7 +516,7 @@ typedef void * lv_font_user_data_t; /* Support bidirectional texts. * Allows mixing Left-to-Right and Right-to-Left texts. - * The direction will be processed according to the Unicode Bidirectioanl Algorithm: + * The direction will be processed according to the Unicode Bidirectional Algorithm: * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ #define LV_USE_BIDI 0 #if LV_USE_BIDI @@ -563,7 +566,7 @@ typedef void * lv_obj_user_data_t; * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) */ -#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY /*================== * LV OBJ X USAGE @@ -730,7 +733,6 @@ typedef void * lv_obj_user_data_t; # define LV_TABLE_CELL_STYLE_CNT 4 #endif - /*Tab (dependencies: lv_page, lv_btnm)*/ #define LV_USE_TABVIEW 1 # if LV_USE_TABVIEW != 0 diff --git a/lv_drivers b/lv_drivers index 6a39767..8c96359 160000 --- a/lv_drivers +++ b/lv_drivers @@ -1 +1 @@ -Subproject commit 6a39767f0676cbb8ed28ae9f6d82caf3c6ef1ea7 +Subproject commit 8c96359f4199297809ab205870eb603b03d98b4e diff --git a/lv_drv_conf.h b/lv_drv_conf.h index 39a8c2d..8949282 100644 --- a/lv_drv_conf.h +++ b/lv_drv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_drv_conf.h - * + * Configuration file for v7.11.0 */ /* @@ -100,9 +100,6 @@ /*Eclipse: Visual Studio: */ # define MONITOR_SDL_INCLUDE_PATH -/*Different rendering might be used if running in a Virtual machine*/ -# define MONITOR_VIRTUAL_MACHINE 0 - /*Open two windows to test multi display support*/ # define MONITOR_DUAL 0 #endif @@ -114,12 +111,18 @@ # define USE_WINDOWS 0 #endif -#define USE_WINDOWS 0 #if USE_WINDOWS # define WINDOW_HOR_RES 480 # define WINDOW_VER_RES 320 #endif +/*---------------------------- + * Native Windows (win32drv) + *---------------------------*/ +#ifndef USE_WIN32DRV +# define USE_WIN32DRV 0 +#endif + /*---------------------------------------- * GTK drivers (monitor, mouse, keyboard *---------------------------------------*/ diff --git a/lvgl b/lvgl index 43771fa..ec9de51 160000 --- a/lvgl +++ b/lvgl @@ -1 +1 @@ -Subproject commit 43771fa2f71d5323ef9dffc1ff0aee326d59f5ce +Subproject commit ec9de515b36641be565d7bace5863ab631ce3b69 From 99a0f24211cc569aef207ef983347fe79d934a2f Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Sun, 13 Jun 2021 12:49:14 +0200 Subject: [PATCH 2/6] use examples project at v7.11.0 --- lv_conf.h | 2 +- lv_ex_conf.h | 14 ++++++++++++++ lv_examples | 2 +- main/src/main.c | 5 +++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lv_conf.h b/lv_conf.h index ec3518c..bd2b724 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -382,7 +382,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i /* Montserrat fonts with bpp = 4 * https://fonts.google.com/specimen/Montserrat */ #define LV_FONT_MONTSERRAT_8 0 -#define LV_FONT_MONTSERRAT_10 0 +#define LV_FONT_MONTSERRAT_10 1 #define LV_FONT_MONTSERRAT_12 1 #define LV_FONT_MONTSERRAT_14 1 #define LV_FONT_MONTSERRAT_16 1 diff --git a/lv_ex_conf.h b/lv_ex_conf.h index 2af3a1e..cbd1164 100644 --- a/lv_ex_conf.h +++ b/lv_ex_conf.h @@ -1,7 +1,13 @@ /** * @file lv_ex_conf.h + * Configuration file for v7.11.0 * */ +/* + * COPY THIS FILE AS lv_ex_conf.h + */ + +#if 1 /*Set it to "1" to enable the content*/ #ifndef LV_EX_CONF_H #define LV_EX_CONF_H @@ -35,5 +41,13 @@ /*Stress test for LVGL*/ #define LV_USE_DEMO_STRESS 1 +/*Music player for LVGL*/ +#define LV_USE_DEMO_MUSIC 1 +#if LV_USE_DEMO_MUSIC +#define LV_DEMO_MUSIC_AUTO_PLAY 0 +#endif + #endif /*LV_EX_CONF_H*/ +#endif /*End of "Content enable"*/ + diff --git a/lv_examples b/lv_examples index 8aa74f4..5f68537 160000 --- a/lv_examples +++ b/lv_examples @@ -1 +1 @@ -Subproject commit 8aa74f493bac82a3078ebc98e4139b0eabd34e81 +Subproject commit 5f685373743f6999a5b6c0f2782767f2815e151b diff --git a/main/src/main.c b/main/src/main.c index 10c949c..278d7dc 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -58,7 +58,12 @@ int main(int argc, char **argv) hal_init(); lv_demo_widgets(); + /* For printer demo set resolution to 800x480 */ // lv_demo_printer(); +// lv_demo_keypad_encoder(); +// lv_demo_benchmark(); +// lv_demo_stress(); +// lv_demo_music(); while (1) { /* Periodically call the lv_task handler. From cdefeaa6cef85b2675a5be5d297ad374432fc3a0 Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Sun, 13 Jun 2021 13:04:36 +0200 Subject: [PATCH 3/6] add keyboard support --- main/src/main.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/main/src/main.c b/main/src/main.c index 278d7dc..f5c35aa 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -16,6 +16,7 @@ #include "lvgl/lvgl.h" #include "lv_drivers/display/monitor.h" #include "lv_drivers/indev/mouse.h" +#include "lv_drivers/indev/keyboard.h" #include "lv_examples/lv_examples.h" /********************* @@ -93,7 +94,7 @@ static void hal_init(void) { lv_disp_buf_init(&disp_buf1, buf1_1, NULL, LV_HOR_RES_MAX * 120); /*Create a display*/ - lv_disp_drv_t disp_drv; + static lv_disp_drv_t disp_drv; lv_disp_drv_init(&disp_drv); /*Basic initialization*/ disp_drv.buffer = &disp_buf1; disp_drv.flush_cb = monitor_flush; @@ -102,13 +103,13 @@ static void hal_init(void) { /* Add the mouse as input device * Use the 'mouse' driver which reads the PC's mouse*/ mouse_init(); - lv_indev_drv_t indev_drv; - lv_indev_drv_init(&indev_drv); /*Basic initialization*/ - indev_drv.type = LV_INDEV_TYPE_POINTER; + static lv_indev_drv_t mouse_drv; + lv_indev_drv_init(&mouse_drv); /*Basic initialization*/ + mouse_drv.type = LV_INDEV_TYPE_POINTER; /*This function will be called periodically (by the library) to get the mouse position and state*/ - indev_drv.read_cb = mouse_read; - lv_indev_t *mouse_indev = lv_indev_drv_register(&indev_drv); + mouse_drv.read_cb = mouse_read; + lv_indev_t *mouse_indev = lv_indev_drv_register(&mouse_drv); /*Set a cursor for the mouse*/ LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image file.*/ @@ -116,6 +117,15 @@ static void hal_init(void) { lv_img_set_src(cursor_obj, &mouse_cursor_icon); /*Set the image source*/ lv_indev_set_cursor(mouse_indev, cursor_obj); /*Connect the image object to the driver*/ + /* Add the keyboard as input device + * Use the 'keyboard' driver which reads the PC's keyboard*/ + static lv_indev_drv_t keyb_drv; + lv_indev_drv_init(&keyb_drv); /*Basic initialization*/ + keyb_drv.type = LV_INDEV_TYPE_KEYPAD; + keyb_drv.read_cb = keyboard_read; + /*Register the driver in LVGL and save the created input device object*/ + lv_indev_drv_register(&keyb_drv); + /* Tick init. * You have to call 'lv_tick_inc()' in periodically to inform LittelvGL about * how much time were elapsed Create an SDL thread to do this*/ From d3af18dcbd036373dea7de194ed08d8305debecc Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Sun, 13 Jun 2021 13:10:38 +0200 Subject: [PATCH 4/6] add support for mouse wheel --- main/src/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main/src/main.c b/main/src/main.c index f5c35aa..667c86d 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -17,6 +17,7 @@ #include "lv_drivers/display/monitor.h" #include "lv_drivers/indev/mouse.h" #include "lv_drivers/indev/keyboard.h" +#include "lv_drivers/indev/mousewheel.h" #include "lv_examples/lv_examples.h" /********************* @@ -120,12 +121,19 @@ static void hal_init(void) { /* Add the keyboard as input device * Use the 'keyboard' driver which reads the PC's keyboard*/ static lv_indev_drv_t keyb_drv; - lv_indev_drv_init(&keyb_drv); /*Basic initialization*/ + lv_indev_drv_init(&keyb_drv); keyb_drv.type = LV_INDEV_TYPE_KEYPAD; keyb_drv.read_cb = keyboard_read; - /*Register the driver in LVGL and save the created input device object*/ lv_indev_drv_register(&keyb_drv); + /* Add the mouse wheel as input device (encoder type) + * Use the 'mousewheel' driver which reads the PC's mouse wheel*/ + static lv_indev_drv_t enc_drv; + lv_indev_drv_init(&enc_drv); + enc_drv.type = LV_INDEV_TYPE_ENCODER; + enc_drv.read_cb = mousewheel_read; + lv_indev_drv_register(&enc_drv); + /* Tick init. * You have to call 'lv_tick_inc()' in periodically to inform LittelvGL about * how much time were elapsed Create an SDL thread to do this*/ From fc9abcd72469b6afc848a3295b8948ebefe57d37 Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Sun, 13 Jun 2021 20:31:52 +0200 Subject: [PATCH 5/6] refactor static variables from hal_init() --- main/src/main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main/src/main.c b/main/src/main.c index 667c86d..539c325 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -38,7 +38,12 @@ static void memory_monitor(lv_task_t *param); /********************** * STATIC VARIABLES **********************/ -lv_indev_t *kb_indev; +lv_disp_buf_t disp_buf1; +lv_color_t buf1_1[LV_HOR_RES_MAX * 120]; +lv_disp_drv_t disp_drv; +lv_indev_drv_t mouse_drv; +lv_indev_drv_t keyb_drv; +lv_indev_drv_t enc_drv; /********************** * MACROS @@ -90,12 +95,9 @@ static void hal_init(void) { monitor_init(); /*Create a display buffer*/ - static lv_disp_buf_t disp_buf1; - static lv_color_t buf1_1[LV_HOR_RES_MAX * 120]; lv_disp_buf_init(&disp_buf1, buf1_1, NULL, LV_HOR_RES_MAX * 120); /*Create a display*/ - static lv_disp_drv_t disp_drv; lv_disp_drv_init(&disp_drv); /*Basic initialization*/ disp_drv.buffer = &disp_buf1; disp_drv.flush_cb = monitor_flush; @@ -104,7 +106,6 @@ static void hal_init(void) { /* Add the mouse as input device * Use the 'mouse' driver which reads the PC's mouse*/ mouse_init(); - static lv_indev_drv_t mouse_drv; lv_indev_drv_init(&mouse_drv); /*Basic initialization*/ mouse_drv.type = LV_INDEV_TYPE_POINTER; @@ -120,7 +121,6 @@ static void hal_init(void) { /* Add the keyboard as input device * Use the 'keyboard' driver which reads the PC's keyboard*/ - static lv_indev_drv_t keyb_drv; lv_indev_drv_init(&keyb_drv); keyb_drv.type = LV_INDEV_TYPE_KEYPAD; keyb_drv.read_cb = keyboard_read; @@ -128,7 +128,6 @@ static void hal_init(void) { /* Add the mouse wheel as input device (encoder type) * Use the 'mousewheel' driver which reads the PC's mouse wheel*/ - static lv_indev_drv_t enc_drv; lv_indev_drv_init(&enc_drv); enc_drv.type = LV_INDEV_TYPE_ENCODER; enc_drv.read_cb = mousewheel_read; From 820255428027473d03e21059c30059242fae33db Mon Sep 17 00:00:00 2001 From: Igor Janjatovic Date: Mon, 14 Jun 2021 10:06:21 +0200 Subject: [PATCH 6/6] quick bugfix for missing inits --- main/src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/src/main.c b/main/src/main.c index 539c325..a907eb0 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -121,6 +121,7 @@ static void hal_init(void) { /* Add the keyboard as input device * Use the 'keyboard' driver which reads the PC's keyboard*/ + keyboard_init(); lv_indev_drv_init(&keyb_drv); keyb_drv.type = LV_INDEV_TYPE_KEYPAD; keyb_drv.read_cb = keyboard_read; @@ -128,6 +129,7 @@ static void hal_init(void) { /* Add the mouse wheel as input device (encoder type) * Use the 'mousewheel' driver which reads the PC's mouse wheel*/ + mousewheel_init(); lv_indev_drv_init(&enc_drv); enc_drv.type = LV_INDEV_TYPE_ENCODER; enc_drv.read_cb = mousewheel_read;