19#ifndef SBL_HW_COMPONENTS_INPUT_TAP_HOLD_HPP_
20#define SBL_HW_COMPONENTS_INPUT_TAP_HOLD_HPP_
31 explicit TapHold(uint16_t hold_threshold = 60)
32 : threshold_(hold_threshold) {}
35 void update(
bool pressed,
bool just_released) {
38 if (!hold_fired_ && ticks_ >= threshold_) {
45 if (!hold_fired_ && ticks_ > 0) {
49 release_from_hold_edge_ =
true;
72 bool e = release_from_hold_edge_;
73 release_from_hold_edge_ =
false;
78 bool holding()
const {
return hold_fired_; }
88 release_from_hold_edge_ =
false;
94 bool hold_fired_ =
false;
95 bool tap_edge_ =
false;
96 bool hold_edge_ =
false;
97 bool release_from_hold_edge_ =
false;
Root namespace for all Sound Byte Libs code.