I am developing a library, I am getting a SPI.h compile error.
The error:
Only occurs on this library
AND only for Uno R4 minima.
All the other SPI libraries(one last week) I have written compile fine for Uno R4 Minima.
compile Error message is
Compiling library "SPI"
/home/gll/.arduino15/packages/arduino/hardware/renesas_uno/1.5.0/libraries/SPI/SPI.cpp: In static member function 'static std::tuple<bool, int, bool> arduino::ArduinoSPI::cfg_pins(int, int, int, int, uint8_t)':
/home/gll/.arduino15/packages/arduino/hardware/renesas_uno/1.5.0/libraries/SPI/SPI.cpp:378:22: error: 'g_ioport_ctrl' was not declared in this scope
R_IOPORT_PinCfg(&g_ioport_ctrl, g_pin_cfg[miso_pin].pin, (uint32_t) (IOPORT_CFG_PERIPHERAL_PIN | ioport_miso));
The SPI.h include is in MAX7219plus.h
I removed all the TM* files and If I put common_data.h and seven_segment_font_data.h in MAX7219plus.h file , it compiles.
The Wprogram.h in diagram should read Arduino.h.
This only happens on R4 minima , no other board throws an error.
Ok i have working now to my satisfaction , I just combined common_data.h and seven_segment_font_data.h into a single file, and it complies.
common_data.h did not have a cpp file as it just a class with no methods.
I don't understand why that would cause SPI.h not to compile just for UNO R4 and the error message. about R_IOPORT_PinCfg or g_ioport_ctrl not declared.