FastLED 3.10.8
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_NO_EXCEPT
virtual DriverState poll() FL_NO_EXCEPT=0
Query driver state and perform maintenance.
@ 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::FL_NO_EXCEPT, poll(), fl::IChannelDriver::DriverState::READY, state, and waitForCondition().

+ Here is the call graph for this function: