FastLED 3.10.8
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 323 of file device.cpp.hpp.

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

References fl::FL_NO_EXCEPT, FL_WARN, isReady(), and pImpl.

Referenced by end().

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