Dilbert
Firmware for the Dilbert interactive badge.
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Macros
Pages
firmware
lib
DilbertLib
MCP23017Button.h
Go to the documentation of this file.
1
3
#ifndef _ARDUINOUNIVERSALINPUTS_MCP23017BUTTON_H
4
#define _ARDUINOUNIVERSALINPUTS_MCP23017BUTTON_H
5
6
#include <IButton.h>
7
8
#include "
Adafruit_MCP23017.h
"
9
14
class
MCP23017Button
:
public
IButton
15
{
16
public
:
17
MCP23017Button
(
Adafruit_MCP23017
*io, inputid_t
id
, inputpin_t pin,
bool
activeLow =
true
,
18
bool
pullUp =
true
);
19
20
virtual
~
MCP23017Button
()
21
{
22
}
23
28
inputpin_t
getPin
()
const
29
{
30
return
m_pin;
31
}
32
37
bool
isActiveLow
()
const
38
{
39
return
m_activeLow;
40
}
41
46
bool
isPullUp
()
const
47
{
48
return
m_pullUp;
49
}
50
51
protected
:
52
uint8_t
getPhysicalState
()
const
;
53
54
private
:
55
Adafruit_MCP23017
*m_io;
56
inputpin_t m_pin;
57
bool
m_activeLow;
58
bool
m_pullUp;
59
};
60
61
#endif
MCP23017Button::isPullUp
bool isPullUp() const
Determines if the pin is pulled high.
Definition:
MCP23017Button.h:46
Adafruit_MCP23017.h
Adafruit_MCP23017
Definition:
Adafruit_MCP23017.h:20
MCP23017Button::getPin
inputpin_t getPin() const
Gets the pin the button is attached to.
Definition:
MCP23017Button.h:28
MCP23017Button::isActiveLow
bool isActiveLow() const
Determines if the pin logic is active low.
Definition:
MCP23017Button.h:37
MCP23017Button
Represents a button on an MCP23017 GPIO pin.
Definition:
MCP23017Button.h:14
MCP23017Button::getPhysicalState
uint8_t getPhysicalState() const
Definition:
MCP23017Button.cpp:32
MCP23017Button::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.
Definition:
MCP23017Button.cpp:13
Generated on Sun Aug 14 2016 16:44:20 for Dilbert by
1.8.6