2020-02-12 04:58 PM
Hello
I use STM32F769I-DISCO.
Touch the screen to jump to the following functions.
bool OTM8009TouchController :: sampleTouch (int32_t & x, int32_t & y)
{
/ * USER CODE BEGIN OTM8009TouchController_sampleTouch * /
TS_StateTypeDef state;
BSP_TS_GetState (& state);
if (state.touchDetected)
{
x = state.touchX [0];
y = state.touchY [0];
return true;
}
return false;
/ * USER CODE END OTM8009TouchController_sampleTouch * /
}
I want to know where this function is called from, so when I step through it, I can't see the source.
Where does this function come from?
I want to use another touch controller
if (state.touchDetected)
{
x = state.touchX [0];
y = state.touchY [0];
return true;
}
Must write the process to get the coordinates for that controller.
Please let me know if it takes time to process it.
For that reason, I also want to know where this function is called from.
Thank you.
Solved! Go to Solution.
2020-02-13 12:11 AM
As far as I know the sampleTouch is called from inside the TouchGFX library in the task context that executed touchgfx::HAL::getInstance()->taskEntry().
The touchGFX::Hal::setTouchSampleRate method can be used to set how often the sampleTouch should be called, every tick, every second and so forth.
How to actually interface with your chosen touch driver is up to you I think. The interface is very simple, return true or false depending on whether there is touch or not, and then fill out the x and x coordinate.
Hope that helps :)
2020-02-13 12:11 AM
As far as I know the sampleTouch is called from inside the TouchGFX library in the task context that executed touchgfx::HAL::getInstance()->taskEntry().
The touchGFX::Hal::setTouchSampleRate method can be used to set how often the sampleTouch should be called, every tick, every second and so forth.
How to actually interface with your chosen touch driver is up to you I think. The interface is very simple, return true or false depending on whether there is touch or not, and then fill out the x and x coordinate.
Hope that helps :)
2020-02-13 12:42 AM
LTimm.1's Hello
That's how it works.
I understood it with easy-to-understand explanations.
Thank you for your reply.
2020-02-13 12:45 AM
LTimm.1's Hello
That's how it works.
I understood it with easy-to-understand explanations.
Thank you for your reply.