|
XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
|
Driver for the MCP23017 16-bit I2C GPIO expander. More...
Go to the source code of this file.
Classes | |
| class | MCP23017Driver |
| XPointDriver implementation for the MCP23017 16-bit I2C GPIO expander. More... | |
Driver for the MCP23017 16-bit I2C GPIO expander.
The MCP23017 provides two 8-bit GPIO ports (GPA and GPB):
The mapper function must return a pin index in [0, 15].
begin() writes IODIRA = IODIRB = 0x00 (all outputs) before driving OLAT, overriding the device's power-on default of all-inputs.
Up to eight MCP23017s can share one I2C bus; address pins A0–A2 select addresses 0x20–0x27. Drive relay coils via transistors — MCP23017 output current is limited to 25 mA per pin.