31 const bool was_high =
mPin.high();
35 const bool was_low = !
mPin.high();
59 FASTLED_ASSERT(
false,
"Unknown ButtonLowLevel strategy");
68 const bool pressed_curr_frame =
mOwner->mButton.isPressed();
69 const bool pressed_last_frame =
mOwner->mPressedLastFrame;
70 const bool changed_this_frame = pressed_curr_frame != pressed_last_frame;
71 mOwner->mPressedLastFrame = pressed_curr_frame;
72 if (changed_this_frame && pressed_curr_frame) {
73 mOwner->mClickedThisFrame =
true;
74 mOwner->mOnClickCallbacks.invoke();
115 FASTLED_ASSERT(
false,
"Unknown ButtonLowLevel strategy");
static void addListener(Listener *listener, int priority=0)
static void removeListener(Listener *listener)
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.