Class that stores state and functions for interacting with MCP23008 chip.
More...
#include <TinyAdafruit_MCP23008.h>
|
void | begin (uint8_t addr) |
| begin the i2c connection using specified address More...
|
|
void | begin (void) |
| Begins the i2c connection using default address.
|
|
void | pinMode (uint8_t p, uint8_t d) |
| Sets the pin mode. More...
|
|
void | digitalWrite (uint8_t p, uint8_t d) |
| Sets the pin and direction. More...
|
|
void | pullUp (uint8_t p, uint8_t d) |
| Sets pull-up resistor on specified pin. More...
|
|
uint8_t | digitalRead (uint8_t p) |
| Reads the status of a gpio pin. More...
|
|
uint8_t | readGPIO (void) |
| Reads the status of a gpio pin. More...
|
|
void | writeGPIO (uint8_t) |
| Writes to the gpio. More...
|
|
Class that stores state and functions for interacting with MCP23008 chip.
◆ begin()
void Adafruit_MCP23008::begin |
( |
uint8_t |
addr | ) |
|
begin the i2c connection using specified address
- Parameters
-
addr | i2c address of the MCP23008 |
◆ pinMode()
void Adafruit_MCP23008::pinMode |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
Sets the pin mode.
- Parameters
-
p | Mode to set |
d | Pin to set the mode to |
◆ digitalWrite()
void Adafruit_MCP23008::digitalWrite |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
Sets the pin and direction.
- Parameters
-
p | Pin to set |
d | Direction to set the pin |
◆ pullUp()
void Adafruit_MCP23008::pullUp |
( |
uint8_t |
p, |
|
|
uint8_t |
d |
|
) |
| |
Sets pull-up resistor on specified pin.
- Parameters
-
p | Pin to set |
d | Direction to set the pin |
◆ digitalRead()
uint8_t Adafruit_MCP23008::digitalRead |
( |
uint8_t |
p | ) |
|
Reads the status of a gpio pin.
- Parameters
-
- Returns
- Returns the current gpio
◆ readGPIO()
uint8_t Adafruit_MCP23008::readGPIO |
( |
void |
| ) |
|
Reads the status of a gpio pin.
- Returns
- Returns the current GPIO input
◆ writeGPIO()
void Adafruit_MCP23008::writeGPIO |
( |
uint8_t |
gpio | ) |
|
Writes to the gpio.
- Parameters
-
The documentation for this class was generated from the following files: