1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-16 00:43:00 +03:00

Deprecate SPIFFS, move examples to LittleFS (#7263)

* Deprecate SPIFFS, move examples to LittleFS

SPIFFS has been a great filesystem, but it has significant problems in
many cases (and it's also pretty slow).  Development seems to have
slowed/stopped on the upstream version, and we're not able to provide
support or fix the known issues with it as-is.

Deprecate SPIFFS variable.

Update all examples to use LittleFS instead of SPIFFS.

Also, minor cleanup on very old examples which has obsolete delays
waiting for the Serial port to come up, or which were stuck at 9600 baud
because of their ancient AVR heritage.

Fixes #7095

* Remove leftover debug code

* Clean up comments in some examples

* Update documentation on SPIFFS deprecation

* Fix host tests to avoid deprecation warnings

* Fix cut-n-paste error

* Restore SpeedTest.ino, adjust to allow custom FSes

Co-authored-by: Develo <deveyes@gmail.com>
This commit is contained in:
Earle F. Philhower, III
2020-05-04 11:22:50 -07:00
committed by GitHub
parent 9845deb283
commit 83166f948b
40 changed files with 176 additions and 164 deletions

View File

@ -266,7 +266,7 @@ using fs::SPIFFSConfig;
#endif //FS_NO_GLOBALS
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SPIFFS)
extern fs::FS SPIFFS;
extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
#endif
#endif //FS_H

View File

@ -37,8 +37,8 @@ int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
return flash_hal_read(addr, size, dst);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
namespace spiffs_impl {
@ -149,6 +149,8 @@ extern "C" void spiffs_request_end(void)
SPIFFS.end();
}
#pragma GCC diagnostic pop
#endif // ARDUINO
#endif // !CORE_MOCK

View File

@ -171,7 +171,7 @@ public:
return false;
}
_cfg = *static_cast<const SPIFFSConfig *>(&cfg);
return true;
return true;
}
bool begin() override