25 #ifndef ACE_BUTTON_BUTTON_CONFIG_H 26 #define ACE_BUTTON_BUTTON_CONFIG_H 32 #define ACE_BUTTON_INLINE __attribute__((always_inline)) 151 (kFeatureSuppressAfterClick |
152 kFeatureSuppressAfterDoubleClick |
153 kFeatureSuppressAfterLongPress |
154 kFeatureSuppressAfterRepeatPress |
165 uint8_t buttonState);
186 return mDoubleClickDelay;
191 return mLongPressDelay;
201 return mRepeatPressDelay;
208 return mRepeatPressInterval;
213 mDebounceDelay = debounceDelay;
218 mClickDelay = clickDelay;
223 mDoubleClickDelay = doubleClickDelay;
228 mLongPressDelay = longPressDelay;
233 mRepeatPressDelay = repeatPressDelay;
238 mRepeatPressInterval = repeatPressInterval;
250 virtual unsigned long getClock() {
return millis(); }
264 return digitalRead(pin);
271 bool isFeature(FeatureFlagType features) ACE_BUTTON_INLINE {
272 return mFeatureFlags & features;
276 void setFeature(FeatureFlagType features) ACE_BUTTON_INLINE {
277 mFeatureFlags |= features;
282 mFeatureFlags &= ~features;
289 return mEventHandler;
297 mEventHandler = eventHandler;
304 mTimingStats = timingStats;
315 return &sSystemButtonConfig;
325 mTimingStats =
nullptr;
343 FeatureFlagType mFeatureFlags = 0;