From bdbed02b38d8e7f7f4fbda8494f808e20038b7fa Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Fri, 29 Oct 2021 00:45:49 +0200 Subject: [PATCH] Restructure touch driver read_touch --- src/hasp_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 2626eb5f..982ffc8d 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -91,10 +91,10 @@ IRAM_ATTR void gui_flush_cb(lv_disp_drv_t* disp, const lv_area_t* area, lv_color haspTft.flush_pixels(disp, area, color_p); } -// IRAM_ATTR bool touch_read(lv_indev_drv_t* indev_driver, lv_indev_data_t* data) -// { -// return haspTouch.read(indev_driver, data); -// } +IRAM_ATTR bool gui_touch_read(lv_indev_drv_t* indev_driver, lv_indev_data_t* data) +{ + return haspTouch.read(indev_driver, data); +} void guiCalibrate(void) { @@ -326,7 +326,7 @@ void guiSetup() #if defined(WINDOWS) || defined(POSIX) indev_drv.read_cb = mouse_read; #else - indev_drv.read_cb = touch_read; + indev_drv.read_cb = gui_touch_read; #endif lv_indev_t* mouse_indev = lv_indev_drv_register(&indev_drv); mouse_indev->driver.type = LV_INDEV_TYPE_POINTER;