FastLED 3.10.8
Loading...
Searching...
No Matches

◆ waitForReadyOrDraining()

bool fl::ChannelManager::waitForReadyOrDraining ( u32 timeoutMs = 1000)

Definition at line 573 of file manager.cpp.hpp.

573 {
574 bool ok = waitForCondition([this]() {
575 auto state = poll();
576 bool draining_or_done = (
579 );
580 return draining_or_done;
581 }, timeoutMs);
582 if (!ok) {
583 FL_ERROR("ChannelManager: Timeout occurred while waiting for READY or DRAINING state");
584 }
585 return ok;
586}
TestState state
IChannelDriver::DriverState poll() FL_NO_EXCEPT
Poll all registered drivers and return aggregate state.
bool waitForCondition(Condition condition, u32 timeoutMs=1000) FL_NO_EXCEPT
Wait until a condition is met, with check-pump-delay logic.
#define FL_ERROR(...)
Definition log.h:373
@ READY
Hardware idle; ready to accept new transmissions.
Definition driver.h:170
@ DRAINING
All channels submitted; still transmitting.
Definition driver.h:172

References fl::IChannelDriver::DriverState::DRAINING, FL_ERROR, fl::FL_NO_EXCEPT, poll(), fl::IChannelDriver::DriverState::READY, state, and waitForCondition().

Referenced by onEndFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: