Closed tr4nt0r closed 6 months ago
The Uno R4 package comes with its own SPI library because there are two SPI modules on the chip: SPI0 & SPI1. On the non-B version of the ATmega328 it is simply called SPI. Programs and libraries that include & use the SPI library will not create problems, but the ones that write or read SPI registers directly do. Your quick & dirty fix is OK.
A similar problem can occur when using the I2C port on the Uno R4.
The Uno R4 SPI (& I2C) library can be found in \packages\Elektor-Uno-R4-for-Arduino-1.8.x\hardware\avr\1.0.0\libraries\
When compiling with a libraries for Adafruit TFTs I get the following errors:
I have added this quick and dirty fix to SPI.h and now it compiles without errors:
I think this is a compatibility issue of the Elektor Uno R4s SPI.