Closed electrickery closed 2 years ago
Thanks for opening this issue, I did not test this library with the NANO33 as far as I recall. I have no hardware nearby so I will try to recreate the problem without.
Q: does the problem also occur with one of the examples?
Used the MCP23S17_digitalWrite.ino example
Found the problem, created a develop branch with solution.
@electrickery Can you please verify?
@RobTillaart: I can confirm it compiles for the NANO 33 BLE. Testing code is not yet possible, as both my NANO33 BLE's are bricked for a unknown, unrelated reason (bug in upload routines?).
Ok i will merge things tomorrow.
Not an expert on NANO33, is it only your code that fails to upload or even a minimal blink led sketch?
When I compile for the Arduino Nano 33 BLE (an ARM derived Arduino), compilations fails. The logging doesn't even mention my code, but fails on the MCP23S17 library. When I explicitly cast to the PinStatus-type, like "::digitalWrite(dao, ((PinStatus)(val & mask)));", compilation succeeds. Haven't tested the result yet, as other troubles bricked my Arduino. This is with Arduino IDE 1.8.19.
.../libraries/MCP23S17/MCP23S17.cpp: In member function 'uint8_t MCP23S17::swSPI_transfer(uint8_t)': .../libraries/MCP23S17/MCP23S17.cpp:652:30: error: invalid conversion from 'int' to 'PinStatus' [-fpermissive] ::digitalWrite(dao, (val & mask));