2525#include < zephyr/device.h>
2626#include < zephyr/drivers/display.h>
2727
28-
2928#if __has_include ("lvgl.h")
3029#include " lvgl.h"
3130#endif
3231
33- /* Private function prototypes ----------------------------------------------- */
32+
3433#if __has_include ("lvgl.h")
3534#if __MBED__
3635#include " mbed.h"
@@ -51,6 +50,7 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
5150#endif
5251#endif
5352
53+
5454#ifdef HAS_ARDUINOGRAPHICS
5555Display::Display (int width, int height) : ArduinoGraphics(width, height), gdev(NULL )
5656#else
@@ -188,7 +188,6 @@ bool Display::begin(DisplayPixelFormat pixformat) {
188188 textFont (Font_5x7);
189189#endif // arduinoGraphics
190190
191-
192191 #if __has_include("lvgl.h")
193192 printk (" initializing LVGL!!!!\n " );
194193 /* Initiliaze LVGL library */
@@ -417,7 +416,7 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
417416 uint32_t offsetPos = (area_in_use->x1 + (lcd_x_size * area_in_use->y1 )) * sizeof (uint16_t );
418417 // dsi_lcdDrawImage((void *) px_map, (void *)(dsi_getActiveFrameBuffer() + offsetPos), w, h, DMA2D_INPUT_RGB565);
419418 // --- cant do this memcpy(px_map, buffer + offsetPos, w * h);
420- Display::write8 (0 , 0 , buffer);
419+ // Display::write8(0, 0, buffer);
421420#endif
422421 lv_display_flush_ready (disp); /* Indicate you are ready with the flushing*/
423422}
@@ -431,12 +430,13 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
431430 dsi_lcdDrawImage ((void *) color_p, (void *)(dsi_getActiveFrameBuffer () + offsetPos), width, height, DMA2D_INPUT_RGB565);
432431#else
433432 // --- cant do this memcpy(px_map, buffer + offsetPos, w * h);
434- Display::write8 (0 , 0 , buffer);
433+ // Display::write8(0, 0, buffer);
435434
436435#endif
437436 lv_disp_flush_ready (disp); /* Indicate you are ready with the flushing*/
438437}
439438#endif
440- #endif
439+ #endif // end lvgl
440+
441441
442442#endif // __ZEPHYR__
0 commit comments