We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc797c2 commit 8156663Copy full SHA for 8156663
main.cpp
@@ -103,22 +103,24 @@ int spiffsTryMount()
103
NULL);
104
}
105
106
-bool spiffsMount()
+bool spiffsMount(bool printError = true)
107
{
108
if (SPIFFS_mounted(&s_fs)) {
109
return true;
110
111
int res = spiffsTryMount();
112
if (res != SPIFFS_OK) {
113
- std::cerr << "SPIFFS mount failed with error: " << res << std::endl;
+ if (printError) {
114
+ std::cerr << "SPIFFS mount failed with error: " << res << std::endl;
115
+ }
116
return false;
117
118
119
120
121
bool spiffsFormat()
122
- spiffsMount();
123
+ spiffsMount(false);
124
SPIFFS_unmount(&s_fs);
125
int formated = SPIFFS_format(&s_fs);
126
if (formated != SPIFFS_OK) {
0 commit comments