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
Touch XPT2046 SPI Uninitialise
-
- Posts: 89
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:06 am
- Location: Italy
- Has thanked: 37 times
- Been thanked: 10 times
-
- Matrix Staff
- Posts: 1756
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 446 times
- Been thanked: 606 times
Re: Touch XPT2046 SPI Uninitialise
Hello,
As long as both SPI device have their own unique CS pin then it should be possible to just initialise both components and then talk to them both one after the other without uninitalising and reinitialising.
Let us know how you get on,
As long as both SPI device have their own unique CS pin then it should be possible to just initialise both components and then talk to them both one after the other without uninitalising and reinitialising.
Let us know how you get on,
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel