Skip to content

These module docs are in beta and may be incomplete.

modm:driver:mcp23x17: MCP23x17 16-Bit I/O Expander

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.

Content

// Class
class modm::Mcp23TransportI2c< class I2cMaster  >;
class modm::Mcp23TransportSpi< class SpiMaster , class Cs  >;
class modm::Mcp23x17< class Transport  >;

// Struct
struct modm::Mcp23x17::Memory;
struct modm::mcp23x17;

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_driver modm: driver modm_driver_mcp23x17->modm_driver modm_processing_resumable modm: processing: resumable modm_driver_mcp23x17->modm_processing_resumable