FastLED 3.10.8
Loading...
Searching...
No Matches

◆ ~Device()

fl::spi::Device::~Device ( )

Destructor - releases hardware resources.

Note
Waits for pending operations to complete

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

26 {
27 FL_LOG_SPI("SPI Device: Destructor called");
28 if (pImpl && pImpl->initialized) {
29 FL_LOG_SPI("SPI Device: Calling end() from destructor");
30 end();
31 }
32
33 FL_LOG_SPI("SPI Device: Checking owned hardware backend");
34 // Clean up owned hardware backend (for SINGLE_SPI mode)
35 // Note: hw_backend is now a shared_ptr, so cleanup is automatic
36 if (pImpl && pImpl->owns_backend && pImpl->hw_backend) {
37 FL_LOG_SPI("SPI Device: Cleaning up owned hardware backend");
38 pImpl->hw_backend->end();
39 pImpl->hw_backend = nullptr;
40 }
41 FL_LOG_SPI("SPI Device: Destructor complete");
42}
fl::unique_ptr< Impl > pImpl
Definition device.h:134
void end() FL_NO_EXCEPT
Shutdown the SPI hardware and release resources.
#define FL_LOG_SPI(...)
Serial Peripheral Interface (SPI) logging Logs SPI configuration, initialization, and transfers.
Definition log.h:646

References end(), FL_LOG_SPI, fl::FL_NO_EXCEPT, and pImpl.

+ Here is the call graph for this function: