You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using V3.0.5 of the library (included using the IDE package manage) compiling a sketch with the SX1509 library using the Arduino Nano ESP32 as the selected board it fails to compile with the following errors:
C:\<PATH>\Arduino\libraries\SX1509_IO_Expander\src/SparkFunSX1509.h:130:70: error: macro "pinMode" passed 3 arguments, but takes just 2
void pinMode(uint8_t pin, uint8_t inOut, uint8_t initialLevel = HIGH);
C:\<PATH>\Arduino\libraries\SX1509_IO_Expander\src/SparkFunSX1509.h:156:43: error: macro "digitalRead" passed 2 arguments, but takes just 1
bool digitalRead(uint8_t pin, bool *value);
Changing the board to Arduino Nano or Arduino Nano Every compiles correctly.
The text was updated successfully, but these errors were encountered:
I have spent some more time on this, and if I rename the pinMode function to pinMode2 and the digitalRead to digitalRead2 in the .h and .cpp files it compiles and works, so for some reason when compiling under Nano ESP32 it seems to get confused between the native pinMode and the SX1509.pinMode definitions. Yet it compiles without issues under AVR for a Nano or Nano Every.
Could there be an error in the SparkFunSX1509.h file that causes the confusion within the compiler?
When using V3.0.5 of the library (included using the IDE package manage) compiling a sketch with the SX1509 library using the Arduino Nano ESP32 as the selected board it fails to compile with the following errors:
Changing the board to Arduino Nano or Arduino Nano Every compiles correctly.
The text was updated successfully, but these errors were encountered: