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

Method cancel

src/fl/channels/spi/device.cpp.hpp:470–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470bool Transaction::cancel() {
471 if (!pImpl || pImpl->completed) {
472 return false; // Already completed or invalid
473 }
474
475 // Note: Cancellation of in-progress DMA transfers is platform-specific
476 // and not always supported. For now, we mark it as cancelled and
477 // the next wait() call will handle it.
478
479 pImpl->cancelled = true;
480 pImpl->completed = true;
481 pImpl->result = fl::task::Error("Transaction cancelled");
482
483 // Clear async state in device
484 if (pImpl->device && pImpl->device->pImpl) {
485 pImpl->device->pImpl->async_state.active = false;
486 }
487
488 FL_LOG_SPI("Transaction: Cancelled");
489 return true;
490}
491
492fl::optional<fl::task::Error> Transaction::getResult() const {
493 if (!pImpl) {

Callers 10

execute_fetch_requestFunction · 0.80
~ParlioEngineMethod · 0.80
cleanupMethod · 0.80
_run_garbage_collectionFunction · 0.80
compile_board_examplesFunction · 0.80
buildMethod · 0.80
concurrent_runFunction · 0.80
FL_TEST_FILEFunction · 0.80
FL_TEST_FILEFunction · 0.80

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected