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

Add FSTools with examples of how to convert between SPIFFS and LITTLEFS. (#7696)

* Add FSTools with examples of how to convert between SPIFFS and LITTLEFS.

* Oops.  Need to pass layout by reference in order to capture the correct address.  Took a while to find that.  There maybe a better way to store all these configs

* Update FSTools.cpp

fix ESP.h to Esp.h

* Fix unused variable i

* Parsed with restyle.sh.  Compile with all errors.

* remove unused variable

* fix different sign complication error

* Fix indentation to spaces
Run test/restyle.sh
Remove commented code
Use #ifdef blocks for debugging.  `DEBUG_ESP_CORE` and `DEBUG_ESP_PORT`
use `static constexpr  layout` which saves ROM ~500B for unused vars

* Update FSTools.cpp

Add yield in between file copy
This commit is contained in:
sticilface
2022-06-26 19:22:31 +01:00
committed by GitHub
parent 5656035bed
commit f0d8f33d83
6 changed files with 623 additions and 2 deletions

View File

@ -90,9 +90,8 @@ public:
uint8_t obuf[256];
size_t doneLen = 0;
size_t sentLen;
int i;
while (src.available() > sizeof(obuf)){
while (src.available() > (int)sizeof(obuf)){
src.read(obuf, sizeof(obuf));
sentLen = write(obuf, sizeof(obuf));
doneLen = doneLen + sentLen;