Skip to content

Instantly share code, notes, and snippets.

@VladVanyuk
Created November 1, 2024 21:28
Show Gist options
  • Select an option

  • Save VladVanyuk/eaa748adf5d479125c7f5adb6255b9b3 to your computer and use it in GitHub Desktop.

Select an option

Save VladVanyuk/eaa748adf5d479125c7f5adb6255b9b3 to your computer and use it in GitHub Desktop.
esp FS macro
#if defined USE_SPIFFS
#include <FS.h>
const char* fsName = "SPIFFS";
FS* fileSystem = &SPIFFS;
SPIFFSConfig fileSystemConfig = SPIFFSConfig();
#elif defined USE_LITTLEFS
#include <LittleFS.h>
const char* fsName = "LittleFS";
FS* fileSystem = &LittleFS;
LittleFSConfig fileSystemConfig = LittleFSConfig();
#elif defined USE_SDFS
#include <SDFS.h>
const char* fsName = "SDFS";
FS* fileSystem = &SDFS;
SDFSConfig fileSystemConfig = SDFSConfig();
// fileSystemConfig.setCSPin(chipSelectPin);
#else
#error Please select a filesystem first by uncommenting one of the "#define USE_xxx" lines at the beginning of the sketch.
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment