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

◆ waitComplete()

bool fl::spi::Device::waitComplete ( u32 timeout_ms = (fl::numeric_limits<u32>::max)())

Wait for pending async operation to complete.

Parameters
timeout_msMaximum time to wait (default: forever)
Returns
true if completed, false on timeout

Definition at line 325 of file device.cpp.hpp.

325 {
326 if (!isReady()) {
327 return false;
328 }
329
330 // Get hardware controller
331 if (!pImpl->hw_backend) {
332 FL_WARN("SPI Device: No hardware controller available");
333 return false;
334 }
335
336 // Use polymorphic interface (works for SpiHw1/2/4/8)
337 SpiHwBase* hw = pImpl->hw_backend.get();
338
339 return hw->waitComplete(timeout_ms);
340}
bool isReady() const
Check if device is initialized and ready for use.
fl::unique_ptr< Impl > pImpl
Definition device.h:134
#define FL_WARN(X)
Definition log.h:276

References FL_WARN, isReady(), and pImpl.

Referenced by end().

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