|
VLCB
|
#include <Switch.h>
Public Member Functions | |
| Switch (byte pin, byte pressedState=LOW) | |
| Switch () | |
| a class to encapsulate a physical pushbutton switch, with non-blocking processing | |
| void | setPin (byte pin, byte mode) |
| void | run () |
| void | reset () |
| bool | stateChanged () |
| bool | getState () |
| bool | isPressed () |
| unsigned long | getCurrentStateDuration () |
| unsigned long | getLastStateDuration () |
| unsigned long | getLastStateChangeTime () |
| void | resetCurrentDuration () |
Protected Member Functions | |
| byte | readPin () |
Protected Attributes | |
| byte | _pin |
| byte | _pressedState |
| byte | _currentState |
| byte | _lastState |
| byte | _stateChanged |
| unsigned long | _lastStateChangeTime |
| unsigned long | _lastStateDuration |
| unsigned long | _prevReleaseTime |
| unsigned long | _prevStateDuration |
|
explicit |
| VLCB::Switch::Switch | ( | ) |
a class to encapsulate a physical pushbutton switch, with non-blocking processing
| void VLCB::Switch::setPin | ( | byte | pin, |
| byte | mode ) |
| void VLCB::Switch::run | ( | ) |
| void VLCB::Switch::reset | ( | ) |
| bool VLCB::Switch::stateChanged | ( | ) |
| bool VLCB::Switch::getState | ( | ) |
| bool VLCB::Switch::isPressed | ( | ) |
| unsigned long VLCB::Switch::getCurrentStateDuration | ( | ) |
| unsigned long VLCB::Switch::getLastStateDuration | ( | ) |
| unsigned long VLCB::Switch::getLastStateChangeTime | ( | ) |
| void VLCB::Switch::resetCurrentDuration | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |