FastLED 3.10.9
Loading...
Searching...
No Matches
embedded_fs.cpp.hpp
Go to the documentation of this file.
1
17
19#include "fl/stl/has_include.h"
20
21// Selects the platform fragment. A plain header, not a `.cpp.hpp`, so it
22// composes into this TU rather than needing its own build aggregate.
23#include "platforms/embedded_fs.h"
24#ifdef FL_IS_ESP32
25#include "platforms/embedded_fs_provider.h"
26#endif
27
28namespace fl {
29
30#if defined(FL_IS_ESP32) && FL_HAS_INCLUDE("esp_littlefs.h")
31namespace platforms {
32namespace detail {
33EmbeddedMountRegistry& EmbeddedMountRegistry::instance() FL_NO_EXCEPT {
34 // One POD registry in the isolated storage object, never per-header state.
35 static EmbeddedMountRegistry registry = {nullptr, 0, false};
36 return registry;
37}
38} // namespace detail
39} // namespace platforms
40#endif
41
42#ifdef FL_IS_ESP32
43namespace platforms {
44FL_LINK_WEAK FsImplPtr fastled_embedded_fs_provider(bool formatOnFail) FL_NO_EXCEPT {
45 return makeEmbeddedFs(formatOnFail);
46}
47} // namespace platforms
48#endif
49
50FsImplPtr getEmbeddedFs(bool format_on_fail) FL_NO_EXCEPT {
51#ifdef FL_IS_ESP32
52 return platforms::fastled_embedded_fs_provider(format_on_fail);
53#else
54 return platforms::makeEmbeddedFs(format_on_fail);
55#endif
56}
57
58} // namespace fl
Storage built into the microcontroller itself.
fl::vector< AssetEntry > & registry() FL_NO_EXCEPT
Definition asset.cpp.hpp:42
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
FsImplPtr getEmbeddedFs(bool format_on_fail) FL_NO_EXCEPT
Filesystem backed by the microcontroller's own flash, or null where the platform has none.
Base definition for an LED controller.
#define FL_NO_EXCEPT
#define FL_LINK_WEAK