Seems like the header file contain meaningless code:
#define MCP23XXX_ADDR 0x20 //!< Default I2C Address
#define MCP23XXX_SPIREG \
ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE //!< SPI register type
#define MCP_PORT(pin) ((pin < 8) ? 0 : 1) //!< Determine port from pin number
Causing error:
In file included from C:\Users\dahls\Documents\Arduino\libraries\Adafruit_MCP23017_Arduino_Library\src\Adafruit_MCP23XXX.cpp:23:0:
C:\Users\dahls\Documents\Arduino\libraries\Adafruit_MCP23017_Arduino_Library\src\Adafruit_MCP23XXX.cpp: In member function 'void Adafruit_MCP23XXX::pinMode(uint8_t, uint8_t)':
C:\Users\dahls\Documents\Arduino\libraries\Adafruit_MCP23017_Arduino_Library\src\Adafruit_MCP23XXX.h:29:3: error: 'ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE' was not declared in this scope
ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE //!< SPI register type
^
C:\Users\dahls\Documents\Arduino\libraries\Adafruit_MCP23017_Arduino_Library\src\Adafruit_MCP23XXX.h:29:3: note: in definition of macro 'MCP23XXX_SPIREG'
ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE //!< SPI register type
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you went to the GitHub location of the Adafruit Library in question and asked the same question there, after all they wrote the dang thing, what was the response?
The old version of the library (which I have reverted back to), is 1.3.0. The new one was updated by using the Tools > Manage Libraries and selecting the update able ones.
I'm using a Mega2560 but I guess the error will appear with UNO or Nano.
The code is big and since I have restored the library to the old version, I need to update it again and change my own libraries to get the error. I'll try to do that later.