|
enum | Action { NOPRESS = 0
, CLICK
, DOUBLE_CLICK
, LONG_PRESS
} |
|
|
void ARDUINO_ISR_ATTR | buttonISR () |
| This function is only internally invoked.
|
|
| MyButton (int _pin) |
| Construct a new My Button object from _pin.
|
|
bool | useInterrupt () |
| Attempt to set an interrupt to use with the MyButton object.
|
|
bool | usingInterrupt () const |
| Check whether the MyButton object is configured to accept interrupts.
|
|
Action | check () |
| This method must be called as often as possible in the loop() function.
|
|
bool | on (Action action, ButtonPressCallback cb) |
| Sets a callback/lambda for button gesture (Action)
|
|
◆ MyButton()
MyButton::MyButton |
( |
int | _pin | ) |
|
Construct a new My Button object from _pin.
- Parameters
-
◆ check()
MyButton::Action MyButton::check |
( |
| ) |
|
This method must be called as often as possible in the loop() function.
- Returns
- Action
◆ on()
bool MyButton::on |
( |
MyButton::Action | action, |
|
|
ButtonPressCallback | cb ) |
Sets a callback/lambda for button gesture (Action)
- Parameters
-
- Returns
- true on success
◆ useInterrupt()
bool MyButton::useInterrupt |
( |
| ) |
|
Attempt to set an interrupt to use with the MyButton object.
- Returns
- true on success
◆ usingInterrupt()
bool MyButton::usingInterrupt |
( |
| ) |
const |
Check whether the MyButton object is configured to accept interrupts.
- Returns
- true
-
false
The documentation for this class was generated from the following files: