... | @@ -2,6 +2,7 @@ |
... | @@ -2,6 +2,7 @@ |
|
The **ButtonHandler** is a button observer: it reacts when a button is pressed.
|
|
The **ButtonHandler** is a button observer: it reacts when a button is pressed.
|
|
|
|
|
|
In particular when the ButtonHandler is trigger it calls a callback function (that is passed to its constructor) which is defined as:
|
|
In particular when the ButtonHandler is trigger it calls a callback function (that is passed to its constructor) which is defined as:
|
|
|
|
|
|
```cpp
|
|
```cpp
|
|
using ButtonCallback = std::function<void(uint8_t, ButtonPress)>;
|
|
using ButtonCallback = std::function<void(uint8_t, ButtonPress)>;
|
|
```
|
|
```
|
... | | ... | |