Adafruit_ILI9341
Adafruit_ILI9341 copied to clipboard
Only include wiring_private.h if it exists (Arduino UNO R4 support)
Some of the new Arduino cores do not include this file. This includes the cores for the Arduino UNO Rev 4.
The change is limited to use the __has_include() preprocessor stuff be used to limit when arduino_private.h is included.
Two ways to fix this.
- add it specifically to a list of cores to not include it, like this file has #ifndef RASPI
Or use GCC __has_include to detect it and then include it. With Arduino this will not work well for library headers, as the library search stuff will not see this as a dependency and as such won't add the -I to command line to find it. But this file is in core which is always on the search path
I ran this modified version on the UNO R4 Minima with the graphictest example.