16FASTLED_SMART_PTR(FsImpl);
21FsImplPtr make_sdcard_filesystem(
int cs_pin);
31FASTLED_SMART_PTR(FileSystem);
32FASTLED_SMART_PTR(FileHandle);
34template<
typename Key,
typename Value,
size_t N>
class FixedMap;
44 bool beginSd(
int cs_pin);
45 bool begin(FsImplPtr platform_filesystem);
49 FileHandlePtr openRead(
const char *path);
50 Video openVideo(
const char *path,
size_t pixelsPerFrame,
float fps = 30.0f,
size_t nFrameHistory = 0);
51 bool readText(
const char *path,
Str* out);
54 bool readScreenMap(
const char *path,
const char* name,
ScreenMap* out,
Str* error =
nullptr);
55 void close(FileHandlePtr file);
68 virtual bool available()
const = 0;
69 virtual size_t bytesLeft()
const;
70 virtual size_t size()
const = 0;
71 virtual size_t read(uint8_t *dst,
size_t bytesToRead) = 0;
72 virtual size_t pos()
const = 0;
73 virtual const char* path()
const = 0;
74 virtual bool seek(
size_t pos) = 0;
75 virtual void close() = 0;
76 virtual bool valid()
const = 0;
79 size_t readCRGB(
CRGB* dst,
size_t n) {
80 return read((uint8_t*)dst, n * 3) / 3;
89 virtual void accept(
const char* path) = 0;
93 virtual bool begin() = 0;
95 virtual void end() = 0;
96 virtual void close(FileHandlePtr file) = 0;
97 virtual FileHandlePtr openRead(
const char *path) = 0;
99 virtual bool ls(Visitor &visitor) {
Implements the FastLED namespace macros.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)