![]() |
InputEvents v1.5.2
An easy to use but comprehensive Event Library for Buttons, Encoders, Encoder Buttons, Analog Inputs, Joysticks and Switches.
|
This is the interface/base class for debounce adapters.
#include <DebounceAdapter.h>

Public Member Functions | |
| DebounceAdapter (uint16_t debounceInterval=10) | |
| DebounceAdapter (PinAdapter *pinAdapter, uint16_t debounceInterval=10) | |
| void | begin () |
| Initialise the debouncer and pin adapter. Must be safe for repeated calls (Idempotent) More... | |
| virtual bool | read ()=0 |
| Return the debounced state of the pin adapter. More... | |
| void | setPinAdapter (PinAdapter *adapter) |
| The pinAdapter is usually passed via the constructor. If it is not, it must be set before begin() is called. More... | |
| virtual void | setDebounceInterval (uint16_t interval) |
| Set the debounce interval. Default is 10ms. More... | |
| virtual void | begin ()=0 |
| Initialise the pin adapter. Must be safe for repeated calls (Idempotent) More... | |
| virtual bool | read ()=0 |
| Read the current state of the pin. More... | |
Protected Attributes | |
| PinAdapter * | pinAdapter |
| uint16_t | debounceInterval = 10 |
|
inlinevirtual |
Initialise the debouncer and pin adapter. Must be safe for repeated calls (Idempotent)
Implements PinAdapter.
Reimplemented in FoltmanDebounceAdapter.
|
pure virtual |
Return the debounced state of the pin adapter.
Implements PinAdapter.
Implemented in FoltmanDebounceAdapter.
|
inlinevirtual |
Set the debounce interval. Default is 10ms.
| interval |
|
inline |
The pinAdapter is usually passed via the constructor. If it is not, it must be set before begin() is called.
| adapter |