51#define MCP23016_GP_REG 0x0
57#define MCP23016_OLAT_REG 0x2
63#define MCP23016_IPOL_REG 0x4
69#define MCP23016_IODIR_REG 0x6
75#define MCP23016_INTCAP_REG 0x8
81#define MCP23016_IOCON_REG 0xA
mmc_err mcp23016_set_port_pol(uint8_t port_num, uint8_t pol)
Set port pins polarity.
Definition mcp23016.c:151
mmc_err mcp23016_read_pin(uint8_t port_num, uint8_t pin, uint8_t *status)
Read a pin status.
Definition mcp23016.c:114
mmc_err mcp23016_write_reg_pair(uint8_t reg, uint16_t data)
Definition mcp23016.c:195
mmc_err mcp23016_write_pin(uint8_t port_num, uint8_t pin, bool data)
Write a output pin.
Definition mcp23016.c:133
mmc_err mcp23016_read_port(uint8_t port_num, uint8_t *readout)
Read port pins status.
Definition mcp23016.c:109
mmc_err mcp23016_set_port_dir(uint8_t port_num, uint8_t dir)
Set port pins direction.
Definition mcp23016.c:162
mmc_err mcp23016_get_port_pol(uint8_t port_num, uint8_t *pol)
Read port pins polarity.
Definition mcp23016.c:156
mmc_err mcp23016_read_reg_pair(uint8_t reg, uint16_t *readout)
Definition mcp23016.c:173
mmc_err mcp23016_get_port_dir(uint8_t port_num, uint8_t *dir)
Read port pins direction.
Definition mcp23016.c:167
mmc_err mcp23016_write_port(uint8_t port_num, uint8_t data)
Write port output pins.
Definition mcp23016.c:128
Error handling functions and codes.
mmc_err
Definition mmc_error.h:36
Port layer (includes all portable functions headers)