From c9b28c769235bf03b00afdb2eaf3325628148f49 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 Nov 2017 00:48:16 +0100 Subject: [PATCH] lv_hal: use less general structur elements --- lv_hal/lv_hal_disp.c | 8 ++++---- lv_hal/lv_hal_disp.h | 6 +++--- lv_hal/lv_hal_indev.c | 4 ++-- lv_hal/lv_hal_indev.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 7fa1a3802..26613dd19 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -112,7 +112,7 @@ lv_disp_t * lv_disp_next(lv_disp_t * disp) void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color) { if(active == NULL) return; - if(active->driver.fill != NULL) active->driver.fill(x1, y1, x2, y2, color); + if(active->driver.fill_fp != NULL) active->driver.fill_fp(x1, y1, x2, y2, color); } /** @@ -126,7 +126,7 @@ void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t col void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map) { if(active == NULL) return; - if(active->driver.map != NULL) active->driver.map(x1, y1, x2, y2, color_map); + if(active->driver.map_fp != NULL) active->driver.map_fp(x1, y1, x2, y2, color_map); } @@ -141,7 +141,7 @@ void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_ void lv_disp_copy(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa) { if(active == NULL) return; - if(active->driver.copy != NULL) active->driver.copy(dest, src, length, opa); + if(active->driver.blend_fp != NULL) active->driver.blend_fp(dest, src, length, opa); } /** @@ -150,7 +150,7 @@ void lv_disp_copy(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv */ bool lv_disp_is_copy_supported(void) { - if(active->driver.copy) return true; + if(active->driver.blend_fp) return true; else return false; } diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 90a960e69..dceca679f 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -32,9 +32,9 @@ extern "C" { * Display Driver structure to be registered by HAL */ typedef struct _disp_drv_t { - void (*fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); - void (*map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); - void (*copy)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); + void (*fill_fp)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); + void (*map_fp)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); + void (*blend_fp)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); } lv_disp_drv_t; typedef struct _disp_t { diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 024e8d815..22b2ecca7 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -91,8 +91,8 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t *data) { bool cont = false; - if(indev->driver.get_data) { - cont = indev->driver.get_data(data); + if(indev->driver.read_fp) { + cont = indev->driver.read_fp(data); } else { memset(data, 0, sizeof(lv_indev_data_t)); } diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index f1ab4c3fd..e3bcd96fe 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -54,7 +54,7 @@ typedef struct { /*Initialized by the user and registered by 'lv_indev_add()'*/ typedef struct { lv_hal_indev_type_t type; /*Input device type*/ - bool (*get_data)(lv_indev_data_t *data); /*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/ + bool (*read_fp)(lv_indev_data_t *data); /*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/ }lv_indev_drv_t; struct _lv_obj_t;