Adafruit SPIDevice conflict

Does it work in hardware, i.e. it still talks to the display? Some changes in e.g. wiring_transport.h I was not sure about. Also if your sketch uses SPI. when talking to the SPI to the display it should be using USED_SPI.

The very last error was about a double definition which occurred because in the GD2.h header file, I put the creation of the ASPI object, which is then also created in every file that includes GD2.h, so hence the multiple definitions.

The general changes was to refactor what the library originally does in its header by redefining SPI to the specific SPI object used (for Due: The newly created ASPI object, for some other cores the SPI1 object) into another macro called USED_SPI, that then has to be referenced by all remaining code files in the GD2 library instead of SPI. This leaves other libraries free to use the original SPI object, and not one that was redefined to ASPI.

You can see that difference when e.g. using the Meld / Diff tool between the original branch and my fork.

Haha, well I don’t generally expect compensation of any kind, and don’t have mailbox or donation link or whatever, but if you want, you can donate the price of a coffee via paypal, I sent you a link :smiley:

1 Like