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

◆ ~Device()

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

Destructor - releases hardware resources.

Note
Waits for pending operations to complete

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

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

References end(), FL_LOG_SPI, FL_NOEXCEPT, and pImpl.

+ Here is the call graph for this function: