FastLED 3.9.15
Loading...
Searching...
No Matches
file_system_sd.cpp.hpp File Reference

Detailed Description

SD-card support split off from file_system.cpp.hpp so the linker can tree-shake the entire SD chain when nobody calls FileSystem::beginSd().

Mechanism: this TU is compiled into its own .o file (fl.system.sd+.cpp.o, via src/fl/build/fl.system.sd+.cpp). FileSystem::beginSd(int) and make_sdcard_filesystem(int) are the only symbols this TU defines. The linker only pulls the .o into the final binary when one of those symbols is referenced — i.e. when the user's sketch actually calls fs.beginSd(cs_pin). Sketches that only use FileSystem::begin(platform_filesystem) (or that don't touch FileSystem at all) see fl.system.sd+.cpp.o dropped outright, taking libSD.a / libFS.a / Arduino's VFSImpl chain (~16 KB on ESP32-S3 NEOPIXEL Blink) with it.

This replaces the earlier FASTLED_USE_SDCARD macro-gate (#2778 v1) — no user opt-in required, the linker handles it.

See FastLED #2773 item 1.2 for the original audit.

Definition in file file_system_sd.cpp.hpp.

+ Include dependency graph for file_system_sd.cpp.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Macros

#define FASTLED_HAS_SDCARD_IMPL   0
 

Functions

FsImplPtr fl::make_sdcard_filesystem (int cs_pin)