Wondering: SPI Should we make using MISO optional?

Status
Not open for further replies.

KurtE

Senior Member+
After again playing around with some display library code, including the TFT_9163 and my ILI9341_t3n code, I know there are several SPI devices that don't care about receiving data back from the SPI device. Some device code does not ever use the MISO data (TFT_9163C) and others may choose to use it or not(ILI9341).

Also after debugging code where an invalid MISO pin was passed in, made me wonder. In case of my library, I may choose to have the display code work and add check to input code and return some bogus or default value. Like if you call readPixel(), maybe just return 0, or 0xffff...

But in the case of the TFT9163C code, which never uses it. Wondering if it makes sense to allow you to tell SPI (I don't need it), maybe something like: SPI.setMISO(254);
Or 255, although some of my current code uses 255 as to imply use the default one...

With this then when the SPI.begin() is called an IO pin is not converted to SPI. That is by default on SPI, pin 12 could be used for other purposes.

Question is, is this worth pursuing?

Kurt
 
Status
Not open for further replies.
Back
Top