HX8357 display and SPI1 interface

I’ve been looking over the HX8357 touch screen display library, and I can’t see any straight forward way to have it use the SPI1 object and pins on the Photon. Has anyone already made this modification somewhere?

In general I’m curious how this is supposed to be handled. Is there a convention that one is supposed to follow when porting a library to the Particle device world, or is it really just up to the person doing the work how (or whether at all) to support multiple SPI configurations?


This library was a one2one port of the original Adafruit library and since there was no overload that did require to state which SPI interface was to be used that additional feature was not implemented.

If you find a feature missing you can always file an issue or even a pull request to add that.

1 Like

Thanks ScruffR, Really appreciate your work on this library! Was not my intention to imply that I thought you had missed something. I just noticed browsing forums that “what to do about the different SPI implementation” is a common topic for libraries in general. Being a relative noob, I didn’t know if there was a “standard” way of handling this that I was missing.

Thanks again. I’ll follow up over on Git. I may try to grab a local copy and see if I can hard-code it to use SPI1 instead. My project doesn’t need both SPI buses, but it does need all the analog inputs that SPI takes up.

1 Like

OK - I had to add a follow up for anyone who finds this thread at some point in the future. Look at the timestamps - this is ~24 hours past my initial post. What’s happened in the mean time is that the developer who originally ported this library has already implemented the feature I needed! I’m sitting here running the graphics test INO using SPI1 on my photon :smile::smiley::smile::smiley:

Big BIG thumbs up to ScruffR!!! He’s a 1st class example of what makes the Particle community awesome.