Hi!,
i’m returning to an old Photon-based project which uses am ILI9341 tft dispay from adafruit, and when i try to compile the graphicstest.ino example included on the library Adafruit_ILI9341 (1.0.2) available from Particle IDE, first the following error appears:
/workspace//src/graphicstest.cpp:124:9: error: 'yield' was not declared in this scope
in case i comment all the yield() sentences on the graphicstest.ino code, the following error appears:
/workspace/lib/Adafruit_ILI9341/src/Adafruit_ILI9341.cpp:45:65: error: 'SPISettings' was not declared in this scope
SPI.beginTransaction(SPISettings(30000000, MSBFIRST, SPI_MODE0));
however, with legacy versions of the libraries, i do’nt have any problem compiling my original codes. does anyone know which are the problems with this library? thanks
@kennethlimcp, @fbt, the issue relates to the Arduino compatiblity that was added/changed in version 0.6.1 and 0.6.2 of the firmware. The new Particle firmware supports SPISettings() but the code in the ILI9341 library requires that Arduino.h be included. As for yeild(), it is also defined in the Arduino.h compatibility file. I’ll figure out how to best deal with these items tonight and then repost the library.
@mterrill, I’ve fixed the library and the example compiles as it should. The trick is that I wanted to enable SPI_TRANSACTIONS which is in the Arduino functionality. This allows different SPI devices with different speeds, modes, etc. to cohabitate on the SPI bus, as long as all libraries use SPI transactions.