Controls the expander pins.
More...
#include <Adafruit_MCP23017.h>
Controls the expander pins.
◆ Adafruit_MCP23017()
Adafruit_MCP23017::Adafruit_MCP23017 |
( |
uint8_t |
addr, |
|
|
i2c_port_t |
port, |
|
|
gpio_num_t |
sda, |
|
|
gpio_num_t |
scl |
|
) |
| |
◆ ~Adafruit_MCP23017()
Adafruit_MCP23017::~Adafruit_MCP23017 |
( |
| ) |
|
◆ digitalRead()
uint8_t Adafruit_MCP23017::digitalRead |
( |
uint8_t |
p | ) |
|
◆ digitalWrite()
void Adafruit_MCP23017::digitalWrite |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
◆ getLastInterruptPin()
uint8_t Adafruit_MCP23017::getLastInterruptPin |
( |
| ) |
|
◆ getLastInterruptPinValue()
uint8_t Adafruit_MCP23017::getLastInterruptPinValue |
( |
| ) |
|
◆ pinMode()
void Adafruit_MCP23017::pinMode |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
Sets the pin mode to either INPUT or OUTPUT
◆ pullUp()
void Adafruit_MCP23017::pullUp |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
◆ readGPIO()
uint8_t Adafruit_MCP23017::readGPIO |
( |
uint8_t |
b | ) |
|
Read a single port, A or B, and return its current 8 bit value. Parameter b should be 0 for GPIOA, and 1 for GPIOB.
◆ readGPIOAB()
uint16_t Adafruit_MCP23017::readGPIOAB |
( |
| ) |
|
Reads all 16 pins (port A and B) into a single 16 bits variable.
◆ setupInterrupts()
void Adafruit_MCP23017::setupInterrupts |
( |
uint8_t |
mirroring, |
|
|
uint8_t |
openDrain, |
|
|
uint8_t |
polarity |
|
) |
| |
Configures the interrupt system. both port A and B are assigned the same configuration. Mirroring will OR both INTA and INTB pins. Opendrain will set the INT pin to value or open drain. polarity will set LOW or HIGH on interrupt. Default values after Power On Reset are: (false,flase, LOW) If you are connecting the INTA/B pin to arduino 2/3, you should configure the interupt handling as FALLING with the default configuration.
◆ writeGPIOAB()
void Adafruit_MCP23017::writeGPIOAB |
( |
uint16_t |
ba | ) |
|
Writes all the pins in one go. This method is very useful if you are implementing a multiplexed matrix and want to get a decent refresh rate.
The documentation for this class was generated from the following files: