MCPcopy Create free account
hub / github.com/FastLED/FastLED / waitComplete

Method waitComplete

src/platforms/arm/rp/rpcommon/spi_hw_8_rp.cpp.hpp:483–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483bool SpiHw8RP2040::waitComplete(u32 timeout_ms) {
484 if (!mTransactionActive) {
485 return true; // Nothing to wait for
486 }
487
488 // Poll with timeout checking
489 if (timeout_ms == fl::numeric_limits<u32>::max()) {
490 // Infinite timeout - just wait
491 dma_channel_wait_for_finish_blocking(mDMAChannel);
492 } else {
493 // Timeout-based polling with timestamp checking
494 fl::u32 start_time = fl::millis();
495 while (dma_channel_is_busy(mDMAChannel)) {
496 if ((fl::millis() - start_time) >= timeout_ms) {
497 return false; // Timeout
498 }
499 }
500 }
501
502 mTransactionActive = false;
503
504 // Auto-release DMA buffer
505 mBufferAcquired = false;
506 mCurrentTotalSize = 0;
507
508 return true;
509}
510
511bool SpiHw8RP2040::isBusy() const {
512 if (!mInitialized) {

Callers

nothing calls this directly

Calls 2

maxFunction · 0.85
millisFunction · 0.50

Tested by

no test coverage detected