Represents a button on an MCP23017 GPIO pin.
More...
#include <MCP23017Button.h>
Represents a button on an MCP23017 GPIO pin.
MCP23017Button::MCP23017Button |
( |
Adafruit_MCP23017 * |
io, |
|
|
inputid_t |
id, |
|
|
inputpin_t |
pin, |
|
|
bool |
activeLow = true , |
|
|
bool |
pullUp = true |
|
) |
| |
Creates a new button on an MCP23017 GPIO pin.
- Parameters
-
io | Pointer to the MCP23017 driver |
id | ID of the button |
pin | Pin the button is attached to |
activeLow | If the button logic is active low |
pullUp | If the pin should be pulled high |
uint8_t MCP23017Button::getPhysicalState |
( |
| ) |
const |
|
protected |
inputpin_t MCP23017Button::getPin |
( |
| ) |
const |
|
inline |
Gets the pin the button is attached to.
- Returns
- Pin number
bool MCP23017Button::isActiveLow |
( |
| ) |
const |
|
inline |
Determines if the pin logic is active low.
- Returns
- True if active low
bool MCP23017Button::isPullUp |
( |
| ) |
const |
|
inline |
Determines if the pin is pulled high.
- Returns
- True if pull up active
The documentation for this class was generated from the following files: