Created
November 1, 2024 21:28
-
-
Save VladVanyuk/eaa748adf5d479125c7f5adb6255b9b3 to your computer and use it in GitHub Desktop.
esp FS macro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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