Skip to content

Commit 981209c

Browse files
marqdevxfacchinm
authored andcommitted
lvgl: add compatibility layer for both v7 and v8
1 parent f3de8b0 commit 981209c

File tree

4 files changed

+1566
-19
lines changed

4 files changed

+1566
-19
lines changed

Diff for: libraries/Portenta_lvgl/examples/Portenta_lvgl/Portenta_lvgl.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ void setup() {
77
}
88

99
void loop() {
10+
#if LVGL_VERSION_MAJOR > 7
11+
lv_timer_handler();
12+
#else
1013
lv_task_handler();
11-
delay(3);
14+
#endif
1215
}

Diff for: libraries/Portenta_lvgl/examples/Portenta_lvgl/lv_demo_widgets.c

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "lvgl.h"
1010
#include "lv_demo_widgets.h"
1111

12+
#if LVGL_VERSION_MAJOR == 7
13+
1214
/*********************
1315
* DEFINES
1416
*********************/
@@ -408,3 +410,5 @@ static void tab_changer_task_cb(lv_task_t * task)
408410

409411
lv_tabview_set_tab_act(tv, act, LV_ANIM_ON);
410412
}
413+
414+
#endif

0 commit comments

Comments
 (0)