4 #include "AbstractButton.h" 13 static const uint8_t DefaultThreshold = 5;
14 static const uint8_t DefaultButtonDelay = 5;
15 static const uint16_t DefaultHeldMs = 800;
16 static const uint16_t DefaultButtonRepeatInitialMs = 700;
17 static const uint16_t DefaultButtonRepeatMs = 350;
34 void begin(uint8_t threshold=DefaultThreshold, uint8_t delay=DefaultButtonDelay);
55 bool pushed(
bool peek=
false);
65 uint32_t
tapped(
bool peek=
false);
74 bool held(uint16_t ms=DefaultHeldMs);
82 bool repeat(uint16_t initialMs=DefaultButtonRepeatInitialMs, uint16_t repeatMs=DefaultButtonRepeatMs);
96 uint32_t _lastStateChange;
98 uint16_t _repeatCount;
100 uint32_t _lastOnDuration;