12#include "EventInputBase.h"
13#include "PinAdapter/FoltmanDebounceAdapter.h"
14#include "PinAdapter/GpioPinAdapter.h"
39 #if defined(FUNCTIONAL_SUPPORTED)
68 EventButton(
byte buttonPin,
bool useDefaultDebouncer=
true);
122 #if defined(FUNCTIONAL_SUPPORTED)
123 template <
typename T>
127 (instance->*method)(et, ie);
175 bool isPressed() {
return currentState == pressedState; }
303 bool releasing() {
return stateChanged && previousState == pressedState; }
311 bool pressing() {
return stateChanged && previousState != pressedState; }
318 bool pressedState = LOW;
322 bool currentPinState = HIGH;
323 bool previousPinState = HIGH;
325 bool currentState = HIGH;
326 bool previousState = HIGH;
327 bool stateChanged =
false;
328 uint32_t stateChangeLastTime;
329 uint32_t durationOfPreviousState;
331 uint8_t clickCounter = 0;
332 uint8_t prevClickCount = 0;
333 bool clickFired =
true;
336 uint16_t multiClickInterval = 250;
337 uint16_t longClickDuration = 750;
338 bool repeatLongPress =
true;
339 uint16_t longPressInterval = 500;
340 uint16_t longPressCounter = 0;
This is the interface/base class for debounce adapters.
Definition: DebounceAdapter.h:11
The interface specification for button, encoder button and switch pins.
Definition: PinAdapter.h:8