Skip to content

MCP23x17 16-Bit I/O Expander

lbuild module: modm:driver:mcp23x17

Port GPB is the high byte, GPA the low byte. The lower three address bits can be configured: 0100abc.

Notice that you can specify multiple pins at the same time for functions with argument type Pins, either by ORing the according pins, or converting a 16bit value using the Pins(uint16_t) converting constructor.

Other functions with argument type Pin can only take one pin. If you want to operate on all 16bit, use the get(Inputs|Outputs|Directions|Polarities)() getters.

Dependencies

modm:driver:mcp23x17 modm_driver_mcp23x17 modm: driver: mcp23x17 modm_architecture_gpio_expander modm: architecture: gpio.expander modm_driver_mcp23x17->modm_architecture_gpio_expander modm_architecture_i2c_device modm: architecture: i2c.device modm_driver_mcp23x17->modm_architecture_i2c_device modm_architecture_register modm: architecture: register modm_driver_mcp23x17->modm_architecture_register modm_architecture_spi_device modm: architecture: spi.device modm_driver_mcp23x17->modm_architecture_spi_device modm_processing_resumable modm: processing: resumable modm_driver_mcp23x17->modm_processing_resumable