#include <SwitchInput.h>
Public Member Functions | |
virtual void | onPressed (pinid_t pin, bool held)=0 |
virtual void | onReleased (pinid_t pin, bool held)=0 |
Used to register a class that has an interest in the state of a switch. Implement the two virtual functions that will be called back instead of the KeyCallbackFn callback function. This is generally passed addSwitch(...) and the onPressed / onReleased methods are called upon each event.
|
pure virtual |
called when a key is pressed or held down
pin | the pin number |
held | true if held down |
Implemented in EncoderUpDownButtons.
|
pure virtual |
called when a key is released
pin | the key number |
held | true if key was held down |
Implemented in EncoderUpDownButtons.