Barebones driver for MCP23017 I2C 16-Bit I/O Expander For now it supports only polling approach.
Usage: Mcp23017 mcp; mcp.Init(); mcp.PortMode(MCP23017Port::A, 0xFF); // Inputs mcp.PortMode(MCP23017Port::B, 0xFF); mcp.Read(); mcp.GetPin(2);
#include <mcp23x17.h>
Classes | |
struct | Config |
Public Member Functions | |
void | Init () |
void | Init (const Config &config) |
I2CHandle::Result | WriteReg (MCPRegister reg, uint8_t val) |
I2CHandle::Result | WriteReg (MCPRegister reg, uint8_t portA, uint8_t portB) |
uint8_t | ReadReg (MCPRegister reg) |
void | ReadReg (MCPRegister reg, uint8_t &portA, uint8_t &portB) |
Public Attributes | |
daisy::I2CHandle | i2c_ |
uint8_t | i2c_address_ |
uint8_t | timeout {10} |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
daisy::I2CHandle daisy::Mcp23017Transport::i2c_ |
uint8_t daisy::Mcp23017Transport::i2c_address_ |
uint8_t daisy::Mcp23017Transport::timeout {10} |