The MAX7301 compact, serial-interfaced I/O expander (or general-purpose I/O (GPIO) peripheral) provides microprocessors with up to 28 ports. Each port is individually user configurable to either a logic input or logic output.

Each port can be configured either as a push-pull logic output capable of sinking 10mA and sourcing 4.5mA, or a Schmitt logic input with optional internal pullup. Seven ports feature configurable transition detection logic, which generates an interrupt upon change of port logic level. The MAX7301 is controlled through an SPI-compatible 4-wire serial interface.

—From the MAX7301 datasheet.

This library provides an API interface to the MAX7301. Additionally, an example sketch is included for serial communication with a host computer and an example host script is included for controlling the MAX7301.