fix(SPIFFS): Use new disableWDT bool return value (#10909)
Analogue to this PR, but for SPIFFS: https://github.com/espressif/arduino-esp32/pull/10896/files
This commit is contained in:
parent
732a7cb4ee
commit
402ab56bf1
1 changed files with 4 additions and 2 deletions
|
|
@ -91,9 +91,11 @@ void SPIFFSFS::end() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPIFFSFS::format() {
|
bool SPIFFSFS::format() {
|
||||||
disableCore0WDT();
|
bool wdt_active = disableCore0WDT();
|
||||||
esp_err_t err = esp_spiffs_format(partitionLabel_);
|
esp_err_t err = esp_spiffs_format(partitionLabel_);
|
||||||
enableCore0WDT();
|
if (wdt_active) {
|
||||||
|
enableCore0WDT();
|
||||||
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
log_e("Formatting SPIFFS failed! Error: %d", err);
|
log_e("Formatting SPIFFS failed! Error: %d", err);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue