25
25
#include < zephyr/device.h>
26
26
#include < zephyr/drivers/display.h>
27
27
28
-
29
28
#if __has_include ("lvgl.h")
30
29
#include " lvgl.h"
31
30
#endif
32
31
33
- /* Private function prototypes ----------------------------------------------- */
32
+
34
33
#if __has_include ("lvgl.h")
35
34
#if __MBED__
36
35
#include " mbed.h"
@@ -51,6 +50,7 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
51
50
#endif
52
51
#endif
53
52
53
+
54
54
#ifdef HAS_ARDUINOGRAPHICS
55
55
Display::Display (int width, int height) : ArduinoGraphics(width, height), gdev(NULL )
56
56
#else
@@ -188,7 +188,6 @@ bool Display::begin(DisplayPixelFormat pixformat) {
188
188
textFont (Font_5x7);
189
189
#endif // arduinoGraphics
190
190
191
-
192
191
#if __has_include("lvgl.h")
193
192
printk (" initializing LVGL!!!!\n " );
194
193
/* Initiliaze LVGL library */
@@ -417,7 +416,7 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
417
416
uint32_t offsetPos = (area_in_use->x1 + (lcd_x_size * area_in_use->y1 )) * sizeof (uint16_t );
418
417
// dsi_lcdDrawImage((void *) px_map, (void *)(dsi_getActiveFrameBuffer() + offsetPos), w, h, DMA2D_INPUT_RGB565);
419
418
// --- cant do this memcpy(px_map, buffer + offsetPos, w * h);
420
- Display::write8 (0 , 0 , buffer);
419
+ // Display::write8(0, 0, buffer);
421
420
#endif
422
421
lv_display_flush_ready (disp); /* Indicate you are ready with the flushing*/
423
422
}
@@ -431,12 +430,13 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
431
430
dsi_lcdDrawImage ((void *) color_p, (void *)(dsi_getActiveFrameBuffer () + offsetPos), width, height, DMA2D_INPUT_RGB565);
432
431
#else
433
432
// --- cant do this memcpy(px_map, buffer + offsetPos, w * h);
434
- Display::write8 (0 , 0 , buffer);
433
+ // Display::write8(0, 0, buffer);
435
434
436
435
#endif
437
436
lv_disp_flush_ready (disp); /* Indicate you are ready with the flushing*/
438
437
}
439
438
#endif
440
- #endif
439
+ #endif // end lvgl
440
+
441
441
442
442
#endif // __ZEPHYR__
0 commit comments