touch driver: Add LVGL v8 compatibility

This commit is contained in:
C47D 2021-06-13 15:06:22 -05:00
parent f726311525
commit 0d32432f4c
4 changed files with 275 additions and 0 deletions

View file

@ -26,7 +26,11 @@ void touch_driver_init(void)
#endif
}
#if LVGL_VERSION_MAJOR >= 8
void touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
#else
bool touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
#endif
{
bool res = false;
@ -46,6 +50,10 @@ bool touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
res = gt911_read(drv, data);
#endif
#if LVGL_VERSION_MAJOR >= 8
data->continue_reading = res;
#else
return res;
#endif
}