8000 Added a define to format the spiffs in SPIFFS_Test.ino (#1662) · Curclamas/arduino-esp32@17065df · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 17065df

Browse files
lbernstoneme-no-dev
authored andcommitted
Added a define to format the spiffs in SPIFFS_Test.ino (espressif#1662)
* Added a define to format the spiffs in SPIFFS_Test.ino * Uncommented the define * Matched define names
1 parent 2f5b3c0 commit 17065df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libraries/SPIFFS/examples/SPIFFS_Test/SPIFFS_Test.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include "FS.h"
22
#include "SPIFFS.h"
33

4+
/* You only need to format SPIFFS the first time you run a
5+
test or else use the SPIFFS plugin to create a partition
6+
https://github.com/me-no-dev/arduino-esp32fs-plugin */
7+
#define FORMAT_SPIFFS_IF_FAILED true
8+
49
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
510
Serial.printf("Listing directory: %s\r\n", dirname);
611

@@ -151,7 +156,7 @@ void testFileIO(fs::FS &fs, const char * path){
151156

152157
void setup(){
153158
Serial.begin(115200);
154-
if(!SPIFFS.begin()){
159+
if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
155160
Serial.println("SPIFFS Mount Failed");
156161
return;
157162
}

0 commit comments

Comments
 (0)
0