diff --git a/src/hal/lv_hal_disp.c b/src/hal/lv_hal_disp.c index f80724ba8..53443f7fa 100644 --- a/src/hal/lv_hal_disp.c +++ b/src/hal/lv_hal_disp.c @@ -182,6 +182,8 @@ void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv) lv_memset_00(disp->inv_area_joined, sizeof(disp->inv_area_joined)); disp->inv_p = 0; if(disp->act_scr != NULL) lv_obj_invalidate(disp->act_scr); + + if(disp->driver.drv_update_cb) disp->driver.drv_update_cb(&disp->driver); } /** diff --git a/src/hal/lv_hal_disp.h b/src/hal/lv_hal_disp.h index eaa776c87..3fdfaf35e 100644 --- a/src/hal/lv_hal_disp.h +++ b/src/hal/lv_hal_disp.h @@ -126,6 +126,9 @@ typedef struct _lv_disp_drv_t { /** OPTIONAL: called to wait while the gpu is working */ void (*gpu_wait_cb)(struct _lv_disp_drv_t * disp_drv); + /** OPTIONAL: called when driver parameters are updated */ + void (*drv_update_cb)(struct _lv_disp_drv_t * disp_drv); + /** OPTIONAL: Fill a memory with a color (GPU only)*/ void (*gpu_fill_cb)(struct _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);