Update with epdiy last version support

This commit is contained in:
martinberlin 2023-08-24 12:45:30 +02:00
parent d738aaa84f
commit 87bf29d676
56 changed files with 1844 additions and 859 deletions

View file

@ -4,11 +4,10 @@
#include "touch_driver.h"
#include "tp_spi.h"
#include "tp_i2c.h"
// Is not being included in CMakeLists.txt (Research why)
#include "l58.h"
void touch_driver_init(void)
{
#if defined (CONFIG_LV_TOUCH_CONTROLLER_XPT2046)
@ -25,16 +24,10 @@ void touch_driver_init(void)
/* nothing to do */
#elif defined (CONFIG_LV_TOUCH_CONTROLLER_RA8875)
ra8875_touch_init();
#elif defined (CONFIG_LV_TOUCH_CONTROLLER_GT911)
gt911_init(GT911_I2C_SLAVE_ADDR);
#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;
@ -53,14 +46,8 @@ bool touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
res = FT81x_read(drv, data);
#elif defined (CONFIG_LV_TOUCH_CONTROLLER_RA8875)
res = ra8875_touch_read(drv, data);
#elif defined (CONFIG_LV_TOUCH_CONTROLLER_GT911)
res = gt911_read(drv, data);
#endif
#if LVGL_VERSION_MAJOR >= 8
data->continue_reading = res;
#else
return res;
#endif
}