1 /* 2 * Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H_ 8 #define ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H_ 9 10 #include <zephyr/drivers/display.h> 11 #include <lvgl.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 struct lvgl_disp_data { 18 const struct device *display_dev; 19 struct display_capabilities cap; 20 bool blanking_on; 21 }; 22 23 void lvgl_flush_cb_mono(lv_disp_drv_t *disp_drv, 24 const lv_area_t *area, lv_color_t *color_p); 25 void lvgl_flush_cb_16bit(lv_disp_drv_t *disp_drv, 26 const lv_area_t *area, lv_color_t *color_p); 27 void lvgl_flush_cb_24bit(lv_disp_drv_t *disp_drv, 28 const lv_area_t *area, lv_color_t *color_p); 29 void lvgl_flush_cb_32bit(lv_disp_drv_t *disp_drv, 30 const lv_area_t *area, lv_color_t *color_p); 31 32 void lvgl_set_px_cb_mono(lv_disp_drv_t *disp_drv, 33 uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 34 lv_color_t color, lv_opa_t opa); 35 void lvgl_set_px_cb_16bit(lv_disp_drv_t *disp_drv, 36 uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 37 lv_color_t color, lv_opa_t opa); 38 void lvgl_set_px_cb_24bit(lv_disp_drv_t *disp_drv, 39 uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 40 lv_color_t color, lv_opa_t opa); 41 void lvgl_set_px_cb_32bit(lv_disp_drv_t *disp_drv, 42 uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 43 lv_color_t color, lv_opa_t opa); 44 45 void lvgl_rounder_cb_mono(lv_disp_drv_t *disp_drv, lv_area_t *area); 46 47 int set_lvgl_rendering_cb(lv_disp_drv_t *disp_drv); 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 #endif /* ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H */ 54