|
| enum | Action { NO_PRESS = 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. No interrupt is attached by default. If you want to use interrupt, call MyButton::useInterrupt()
|
| |
| 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. No interrupt is attached by default. If you want to use interrupt, call MyButton::useInterrupt()
- 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: