|
| Button (uint16_t value, void(*clickFunction)(void)=0, void(*holdFunction)(void)=0, uint16_t holdDuration=1000, uint16_t holdInterval=250) |
|
void | pressed () |
|
void | held () |
|
◆ Button()
Button::Button |
( |
uint16_t |
value, |
|
|
void(*)(void) |
clickFunction = 0 , |
|
|
void(*)(void) |
holdFunction = 0 , |
|
|
uint16_t |
holdDuration = 1000 , |
|
|
uint16_t |
holdInterval = 250 |
|
) |
| |
Creates an instance representing a single button.
- Parameters
-
value | is the ADC value associated to the voltage reading for this button, will be combined with the margin value |
clickFunction | is a reference to the function executed upon button click |
holdFunction | is a reference to the executed upon button hold |
holdDuration | determines the number of milliseconds the button must remain pressed before being identified as held down (defaults to 1 second) |
holdInterval | determines the number of milliseconds between each activation of the hold function while the button is kept pressed (defaults to 250 milliseconds) |
The documentation for this class was generated from the following files: