touchgfx SPI touch controller
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-12-29 1: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;
}
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-02-23 8:21 AM
Hello Uusta.1,
Could you give more information about your configuration please ?
- Which board do you use ?
- Which version of TouchGFX Designer do you use ?
- Which version of STM32CubeMX do you use ?
Are you using a TouchGFX Board Setup or did you start your project from scratch?
/Osman
Osman SOYKURT
ST Software Developer | TouchGFX
ST Software Developer | TouchGFX
