Touch XPT2046 SPI Uninitialise
Posted: Wed Dec 23, 2020 3:11 pm
Hi
I am using the xpt2046 touch component successfully. Now I am forced to add a new spi peripheral on the same spi bus I use with the XPT2046 controller.
The new peripheral will be controlled via the master SPI component. The Spi master component has both the initialization and Uninitialise macro and also allows the control of the chipselect pin.
I've done some tests like this before but I want to make sure I'm doing things right.
The question is, is it possible to add a macro that unilitializes the touch?
Alternatively what is the best solution so that the resources do not conflict (I am using the software mode on both)
I am currently doing this
I start witch macro ininitialise touch
when I have to send a message in spi, I initialize the peripheral, I send the message and unitialize it.
Then I have to ininitialise again the touch again for it to work
It's ok?
Kind Regards
I am using the xpt2046 touch component successfully. Now I am forced to add a new spi peripheral on the same spi bus I use with the XPT2046 controller.
The new peripheral will be controlled via the master SPI component. The Spi master component has both the initialization and Uninitialise macro and also allows the control of the chipselect pin.
I've done some tests like this before but I want to make sure I'm doing things right.
The question is, is it possible to add a macro that unilitializes the touch?
Alternatively what is the best solution so that the resources do not conflict (I am using the software mode on both)
I am currently doing this
I start witch macro ininitialise touch
when I have to send a message in spi, I initialize the peripheral, I send the message and unitialize it.
Then I have to ininitialise again the touch again for it to work
It's ok?
Kind Regards