FastLED 3.10.6
Loading...
Searching...
No Matches

◆ waitForReady()

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

Wait for all drivers to become READY.

Note
Polls drivers in a loop, calling async_run() and yielding with minimal delay
Uses time-based delays to avoid busy-waiting while allowing async tasks to run

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

553 {
554 bool ok = waitForCondition([this]() {
556 }, timeoutMs);
557 if (!ok) {
558 FL_ERROR("ChannelManager: Timeout occurred while waiting for READY state");
559 }
560 return ok;
561}
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:372
Value state
Current driver state.
Definition driver.h:176
@ READY
Hardware idle; ready to accept new transmissions.
Definition driver.h:170

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

Referenced by addDriverSlow(), clearAllDrivers(), onBeginFrame(), reset(), CFastLED::wait(), and CFastLED::wait().

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