FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
devices::mcp230xx Namespace Reference

Defines the API for MCP23008/MCP23017 chips support. More...

Classes

class  MCP23008
 I2C device driver for Microchip MCP23008 support. More...
 
class  MCP23017
 I2C device driver for Microchip MCP23017 support. More...
 

Enumerations

enum class  MCP23017Port : uint8_t {
  PORT_A ,
  PORT_B ,
  PORT_AB
}
 The port(s) to use in MCP23017 API. More...
 
enum class  InterruptPolarity : uint8_t {
  ACTIVE_LOW = 0 ,
  ACTIVE_HIGH = 1
}
 The polarity of the MCP23008/MCP23017 INT pins. More...
 

Detailed Description

Defines the API for MCP23008/MCP23017 chips support.

See also
devices::mcp230xx::MCP23008
devices::mcp230xx::MCP23017

Enumeration Type Documentation

◆ MCP23017Port

enum class devices::mcp230xx::MCP23017Port : uint8_t
strong

The port(s) to use in MCP23017 API.

Most API are templates which argument selects which MCP23017 port the API shall apply to.

Enumerator
PORT_A 

The A port of MCP23017.

The API applies only on Port A.

PORT_B 

The B port of MCP23017.

The API applies only on Port B.

PORT_AB 

Both A and B ports of MCP23017.

The API applies to both ports at the same time. In this configuration, the API takes uint16_t type to pass or return values for both ports at once. Each uint16_t argument is broken down as follows:

  • low byte maps to A port
  • high byte maps to B port

Definition at line 36 of file mcp23017.h.

◆ InterruptPolarity

enum class devices::mcp230xx::InterruptPolarity : uint8_t
strong

The polarity of the MCP23008/MCP23017 INT pins.

Enumerator
ACTIVE_LOW 

The INT pins shall be active low, ie they are high by default, and changed to low when an interrupt is triggered.

ACTIVE_HIGH 

The INT pins shall be active high, ie they are low by default, and changed to high when an interrupt is triggered.

Definition at line 43 of file mcp230xx.h.