2021-12-29 01:38 AM
Hi!
I am using is resistive touch panel which is handled by XPT2046 (TSC2046), Touch controller controlled by SPI. I added xpt2046 library to my file. I configured SPI_HandleTypeDef to mine. And I added code as you see below. What else do I need to detect touches on my board
bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)
{
if (XPT2046_TouchPressed()) {
XPT2046_TouchGetCoordinates((uint16_t*) &x, (uint16_t*) &y);
return true;
}
return false;
}
2022-02-23 08:21 AM
Hello Uusta.1,
Could you give more information about your configuration please ?
Are you using a TouchGFX Board Setup or did you start your project from scratch?
/Osman