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

Method cleanup

src/platforms/esp/32/drivers/spi/spi_hw_1_esp32.cpp.hpp:279–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void SPISingleESP32::cleanup() FL_NOEXCEPT {
280 if (mInitialized) {
281 // Wait for any pending transmission
282 if (mTransactionActive) {
283 waitComplete();
284 }
285
286 // Release DMA buffer
287 mDMABuffer.reset();
288 mBufferAcquired = false;
289
290 // Remove device and free bus
291 if (mSPIHandle) {
292 spi_bus_remove_device(mSPIHandle);
293 mSPIHandle = nullptr;
294 }
295
296 if (mBusInitializedByUs) {
297 spi_bus_free(mHost);
298 mBusInitializedByUs = false;
299 }
300 mInitialized = false;
301 }
302}
303
304// ============================================================================
305// Instance Management (accessed by spi_esp32_init.cpp)

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected