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

◆ waitForReadyOrDraining()

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

Definition at line 72 of file driver.cpp.hpp.

72 {
73 // wait until the driver is in a READY or DRAINING state.
74 bool ok = waitForCondition([this]() {
75 auto state = poll();
77 }, timeoutMs);
78 return ok;
79}
TestState state
bool waitForCondition(Condition condition, u32 timeoutMs=1000) FL_NOEXCEPT
virtual DriverState poll() FL_NOEXCEPT=0
Query driver state and perform maintenance.
@ 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, poll(), fl::IChannelDriver::DriverState::READY, state, and waitForCondition().

Referenced by canHandle().

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