Greetings,
I have a fairly large program that I can build to use the TSPISlave library to operate as an SPI slave. This works fine.
I can also build the program to use the ILI9341_t3n, and SPIN, libraries using the T3.6 as a SPI master to drive an SPI tft display over the same pins. That too works fine.
These two functions are never required at the same time, but I now have a use case where it would be useful to have a single build of the code, and switch from one of these uses of the SPI port to the other. Taking a naive approach and simply trying to start the tft display library after using the slave library hangs at tft.begin().
Is there a generally accepted "correct" way to do stuff like this? Should these libraries have a way of gracefully letting go of the hardware resources? I guess I'll start digging into the libraries and figure it out but I thought I would ask for general guidance.
Cheers
Doug
I have a fairly large program that I can build to use the TSPISlave library to operate as an SPI slave. This works fine.
I can also build the program to use the ILI9341_t3n, and SPIN, libraries using the T3.6 as a SPI master to drive an SPI tft display over the same pins. That too works fine.
These two functions are never required at the same time, but I now have a use case where it would be useful to have a single build of the code, and switch from one of these uses of the SPI port to the other. Taking a naive approach and simply trying to start the tft display library after using the slave library hangs at tft.begin().
Is there a generally accepted "correct" way to do stuff like this? Should these libraries have a way of gracefully letting go of the hardware resources? I guess I'll start digging into the libraries and figure it out but I thought I would ask for general guidance.
Cheers
Doug