Adafruit_ILI9341 icon indicating copy to clipboard operation
Adafruit_ILI9341 copied to clipboard

Only include wiring_private.h if it exists (Arduino UNO R4 support)

Open KurtE opened this issue 1 year ago • 2 comments

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.

  1. 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.

KurtE avatar Sep 02 '23 22:09 KurtE