esp-box
esp-box copied to clipboard
TT21100 touch driver does not support interrupt based reading
TT21100 touch driver does not support interrupt based reading.
https://github.com/espressif/esp-box/blob/cc7610df2d8ddeab334695e748f7ed938940c895/components/i2c_devices/touch_panel/tt21100.c#L176-L184
Suggested functionality:
esp_err_t tt21100_tp_init(void)
{
...
// Register interrupt for GPIO_NUM_3 falling edge / tt21100_touch_interrupt()
...
}
void tt21100_set_callback(void (*callback)())
{
// Store callback function
}
void tt21100_touch_interrupt()
{
// Call the callback function if it is set
}
Good suggestion! Interruption does have higher efficiency, and we will make improvements in the near future.
Hi, if you don't have any questions, please close this issue. Thank you!