Skip to content

Commit 77983a0

Browse files
committed
lvgl: make examples compatible with lvgl 9
1 parent 491f581 commit 77983a0

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

examples/BouncingBall/BouncingBall.ino

+3
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ void idle( void )
381381
draw();
382382
}
383383

384+
#if (LVGL_VERSION_MAJOR == 9)
385+
#define LV_IMG_CF_TRUE_COLOR LV_COLOR_FORMAT_RGB565
386+
#endif
384387

385388
void init_ball(void)
386389
{

examples/Gears/Gears.ino

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ static void anim(lv_timer_t * timer) {
9494
Arduino_H7_Video display(720, 480, USBCVideo);
9595
#endif
9696

97+
#if (LVGL_VERSION_MAJOR == 9)
98+
#define LV_IMG_CF_TRUE_COLOR LV_COLOR_FORMAT_RGB565
99+
#endif
100+
97101
void setup() {
98102
Serial.begin(115200);
99103

examples/GearsPlus/GearsPlus.ino

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ static void anim(lv_timer_t * timer) {
119119
Arduino_H7_Video display(720, 480, USBCVideo);
120120
#endif
121121

122+
#if (LVGL_VERSION_MAJOR == 9)
123+
#define LV_IMG_CF_TRUE_COLOR LV_COLOR_FORMAT_RGB565
124+
#endif
125+
122126
void setup() {
123127
Serial.begin(115200);
124128
//while (!Serial);

0 commit comments

Comments
 (0)