FastLED 3.9.15
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 527 of file manager.cpp.hpp.

527 {
528 bool ok = waitForCondition([this]() {
530 }, timeoutMs);
531 if (!ok) {
532 FL_ERROR("ChannelManager: Timeout occurred while waiting for READY state");
533 }
534 return ok;
535}
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
Value state
Current driver state.
Definition driver.h:173
@ READY
Hardware idle; ready to accept new transmissions.
Definition driver.h:167

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

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

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