Module mcp23x17

Module mcp23x17 

Source
Expand description

Support for the MCP23017 and MCP23S17 “16-Bit I/O Expander with Serial Interface”

Datasheet: https://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf

The MCP23x17 offers two eight-bit GPIO ports. It has three address pins, so eight devices can coexist on an I2C bus.

Each port has an interrupt, which can be configured to work together or independently.

When passing 16-bit values to this driver, the upper byte corresponds to port B (pins 7..0) and the lower byte corresponds to port A (pins 7..0).

Structs§

Driver
Mcp23S17Bus
Mcp23x17
MCP23x17 “16-Bit I/O Expander with Serial Interface” with I2C or SPI interface
Mcp23017Bus
Parts

Traits§

Mcp23x17Bus
Special -Bus trait for the Mcp23x17 since the SPI version is a bit special/weird in terms of writing SPI registers, which can’t necessarily be generialized for other devices.