Possible bug in touch respond code (TouchGFX 4.16.1)
Hello,
I can run the GUI on the screen, however, for some unknown reason, the touch does not respond. I have tested the touch function separately in the while loop and it handles the x and y coordinates correctly with the same code and with checking the touch press (I mean what you see below inside sampleTouch, just without "return true", because return true will exit the while loop).
Where is your definition of (0, 0), upper-left corner, or lower-left corner? I have tested both. nothing happens :(
This is my implementation inside "STM32TouchController.cpp":
bool STM32TouchController::sampleTouch(int32_t &x, int32_t &y) {
if (XPT2046_TouchPressed()) {
XPT2046_TouchGetCoordinates((uint16_t*) &x, (uint16_t*) &y);
return true;
}
return false;
}