Releases: wollewald/MCP23017_WE
Added a I2C connection error function
Typo in file name of example sketch
Typo in mcp23s17_SPI_basic_input_output.ino file name ( mcp23S17_SPI_basic_input_output.ino ) corrected. Due to the typo the example was not visible in the Arduino IDE.
printAllRegisters - function added
printAllRegisters does what its name suggests - it prints the status of the current registers.
If you want to use the new function, you will have to define DEBUG_MCP23017. You can do that in MCP23017_config.h.
Changed hardware reset to software reset in init
In init(), a hardware reset was excuted when the reset pin was < 99. This caused issues under the following conditions:
- type: MCP23S17
- SPI address mode (vs. individual CS lines)
- one common reset line
- control of more than two MCP23S17
Readme Update - Design Change to the MCP23017
Important change to the MCP23017: GPA7 and GPB7 are no longer inputs!
Improved the interrupt example sketches / added license to h-files
The interrupt examples are working more reliably now.
MIT Licence was added to the header files.
Fixed a bug when using SPI / ESP32
The default SPI object ( _spi{&SPI} ) was missing for one of the SPI constructors. Despite this, it strangely worked on an Arduino Nano and therefore I had not noticed.
MCP23017(uint8_t cs, uint8_t rp, uint8_t addr) : _spi{&SPI}, SPI_Address{addr}, resetPin{rp}, csPin{cs}, useSPI{true} {}
Various changes
Various changes:
- Replaced #define by constexpr
- Emptied the constructors
- Replaced private by protected
- Naming of parameters make more sense now
- Tidied example sketches
Eliminated several global variables
I have eliminated several global variables and tidied the constructors. So, quite some changes to the code but no visible change for the users apart from some more free SRAM.
SPI Hardware addressing was not enabled
I forgot to set the bit which enables hardware SPI addressing. This is now fixed.