1#ifndef DebounceAdapter_h
2#define DebounceAdapter_h
14 : debounceInterval(debounceInterval)
18 : pinAdapter(pinAdapter),
19 debounceInterval(debounceInterval)
55 debounceInterval = interval;
60 uint16_t debounceInterval = 10;
This is the interface/base class for debounce adapters.
Definition: DebounceAdapter.h:11
virtual bool read()=0
Return the debounced state of the pin adapter.
virtual void setDebounceInterval(uint16_t interval)
Set the debounce interval. Default is 10ms.
Definition: DebounceAdapter.h:54
void begin()
Initialise the debouncer and pin adapter. Must be safe for repeated calls (Idempotent)
Definition: DebounceAdapter.h:27
void setPinAdapter(PinAdapter *adapter)
The pinAdapter is usually passed via the constructor. If it is not, it must be set before begin() is ...
Definition: DebounceAdapter.h:45
The interface specification for button, encoder button and switch pins.
Definition: PinAdapter.h:8
virtual void begin()=0
Initialise the pin adapter. Must be safe for repeated calls (Idempotent)