PU2CLR MCP23008 Arduino Library  1.0.1
Arduino Library for MCP23008 Device - By Ricardo Lima Caratti
/Users/rcaratti/Desenvolvimento/eu/Arduino/PU2CLR_MCP23008/pu2clr_mcp23008.h File Reference
#include <Arduino.h>

Go to the source code of this file.

Data Structures

class  MCP
 

Macros

#define REG_IODIR   0x00
 Controls the direction of the data I/O. When a bit is set, the corresponding pin becomes an input. When a bit is clear, the corresponding pin becomes an output. More...
 
#define REG_IPOL   0x01
 The IPOL register allows the user to configure thepolarity on the corresponding GPIO port bits. More...
 
#define REG_GPINTEN   0x02
 The GPINTEN register controls the interrupt-on-change feature for each pin. More...
 
#define REG_DEFVAL   0x03
 The default comparison value is configured in the DEFVAL register. More...
 
#define REG_INTCON   0x04
 The INTCON register controls how the associated pin value is compared for the interrupt-on-change feature. More...
 
#define REG_IOCON   0x05
 The IOCON register contains several bits for configuring the device. More...
 
#define REG_GPPU   0x06
 The GPPU register controls the pull-up resistors for the port pins. More...
 
#define REG_INTF   0x07
 The INTF register reflects the interrupt condition on the port pins of any pin that is enabled for interrupts via the GPINTEN register. More...
 
#define REG_INTCAP   0x08
 The INTCAP register captures the GPIO port value at the time the interrupt occurred. More...
 
#define REG_GPIO   0x09
 The GPIO register reflects the value on the port. More...
 
#define REG_OLAT   0x0A
 The OLAT register provides access to the output latches. More...
 
#define GPIO_INPUT   0xFF
 
#define GPIO_OUTPUT   0x00
 

Macro Definition Documentation

◆ REG_IODIR

#define REG_IODIR   0x00

Controls the direction of the data I/O. When a bit is set, the corresponding pin becomes an input. When a bit is clear, the corresponding pin becomes an output.

◆ REG_IPOL

#define REG_IPOL   0x01

The IPOL register allows the user to configure thepolarity on the corresponding GPIO port bits.

◆ REG_GPINTEN

#define REG_GPINTEN   0x02

The GPINTEN register controls the interrupt-on-change feature for each pin.

◆ REG_DEFVAL

#define REG_DEFVAL   0x03

The default comparison value is configured in the DEFVAL register.

◆ REG_INTCON

#define REG_INTCON   0x04

The INTCON register controls how the associated pin value is compared for the interrupt-on-change feature.

◆ REG_IOCON

#define REG_IOCON   0x05

The IOCON register contains several bits for configuring the device.

◆ REG_GPPU

#define REG_GPPU   0x06

The GPPU register controls the pull-up resistors for the port pins.

◆ REG_INTF

#define REG_INTF   0x07

The INTF register reflects the interrupt condition on the port pins of any pin that is enabled for interrupts via the GPINTEN register.

◆ REG_INTCAP

#define REG_INTCAP   0x08

The INTCAP register captures the GPIO port value at the time the interrupt occurred.

◆ REG_GPIO

#define REG_GPIO   0x09

The GPIO register reflects the value on the port.

◆ REG_OLAT

#define REG_OLAT   0x0A

The OLAT register provides access to the output latches.

◆ GPIO_INPUT

#define GPIO_INPUT   0xFF

◆ GPIO_OUTPUT

#define GPIO_OUTPUT   0x00