Adafruit TinyLiquidCrystal Library
Public Member Functions | List of all members
Adafruit_MCP23008 Class Reference

Class that stores state and functions for interacting with MCP23008 chip. More...

#include <TinyAdafruit_MCP23008.h>

Public Member Functions

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...
 

Detailed Description

Class that stores state and functions for interacting with MCP23008 chip.

Member Function Documentation

◆ begin()

void Adafruit_MCP23008::begin ( uint8_t  addr)

begin the i2c connection using specified address

Parameters
addri2c address of the MCP23008

◆ pinMode()

void Adafruit_MCP23008::pinMode ( uint8_t  p,
uint8_t  d 
)

Sets the pin mode.

Parameters
pMode to set
dPin to set the mode to

◆ digitalWrite()

void Adafruit_MCP23008::digitalWrite ( uint8_t  p,
uint8_t  d 
)

Sets the pin and direction.

Parameters
pPin to set
dDirection to set the pin

◆ pullUp()

void Adafruit_MCP23008::pullUp ( uint8_t  p,
uint8_t  d 
)

Sets pull-up resistor on specified pin.

Parameters
pPin to set
dDirection to set the pin

◆ digitalRead()

uint8_t Adafruit_MCP23008::digitalRead ( uint8_t  p)

Reads the status of a gpio pin.

Parameters
pPin to read
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
gpiowhat to write

The documentation for this class was generated from the following files: