summaryrefslogtreecommitdiff
path: root/src/libs/lvgl/porting/lv_port_disp_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/lvgl/porting/lv_port_disp_template.c')
-rw-r--r--src/libs/lvgl/porting/lv_port_disp_template.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libs/lvgl/porting/lv_port_disp_template.c b/src/libs/lvgl/porting/lv_port_disp_template.c
index 295dbe1c..9752d5d9 100644
--- a/src/libs/lvgl/porting/lv_port_disp_template.c
+++ b/src/libs/lvgl/porting/lv_port_disp_template.c
@@ -9,7 +9,7 @@
/*********************
* INCLUDES
*********************/
-#include "lv_port_disp_templ.h"
+#include "lv_port_disp_template.h"
/*********************
* DEFINES
@@ -26,8 +26,9 @@ static void disp_init(void);
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
#if LV_USE_GPU
-static void gpu_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
-static void gpu_fill(lv_color_t * dest, uint32_t length, lv_color_t color);
+static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
+static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
+ const lv_area_t * fill_area, lv_color_t color);
#endif
/**********************
@@ -112,10 +113,10 @@ void lv_port_disp_init(void)
/*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/
/*Blend two color array using opacity*/
- disp_drv.gpu_blend = gpu_blend;
+ disp_drv.gpu_blend_cb = gpu_blend;
/*Fill a memory array with a color*/
- disp_drv.gpu_fill = gpu_fill;
+ disp_drv.gpu_fill_cb = gpu_fill;
#endif
/*Finally register the driver*/
@@ -151,7 +152,7 @@ static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_colo
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
- lv_disp_flush_ready(disp);
+ lv_disp_flush_ready(disp_drv);
}
@@ -171,11 +172,11 @@ static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_colo
/* If your MCU has hardware accelerator (GPU) then you can use it to fill a memory with a color
* It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/
-static void gpu_fill_cb(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
- const lv_area_t * fill_area, lv_color_t color);
+static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
+ const lv_area_t * fill_area, lv_color_t color)
{
/*It's an example code which should be done by your GPU*/
- uint32_t x, y;
+ int32_t x, y;
dest_buf += dest_width * fill_area->y1; /*Go to the first line*/
for(y = fill_area->y1; y < fill_area->y2; y++) {