FastLED 3.9.15
Loading...
Searching...
No Matches

◆ waitForReadyOrDraining()

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

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

537 {
538 bool ok = waitForCondition([this]() {
539 auto state = poll();
540 bool draining_or_done = (
543 );
544 return draining_or_done;
545 }, timeoutMs);
546 if (!ok) {
547 FL_ERROR("ChannelManager: Timeout occurred while waiting for READY or DRAINING state");
548 }
549 return ok;
550}
TestState state
IChannelDriver::DriverState poll() FL_NOEXCEPT
Poll all registered drivers and return aggregate state.
bool waitForCondition(Condition condition, u32 timeoutMs=1000) FL_NOEXCEPT
Wait until a condition is met, with check-pump-delay logic.
#define FL_ERROR(X)
Definition log.h:219
@ READY
Hardware idle; ready to accept new transmissions.
Definition driver.h:167
@ DRAINING
All channels submitted; still transmitting.
Definition driver.h:169

References fl::IChannelDriver::DriverState::DRAINING, FL_ERROR, 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: