|
|
8 лет назад | |
|---|---|---|
| .. | ||
| main | 7 лет назад | |
| Makefile | 8 лет назад | |
| README.md | 8 лет назад | |
| partitions_example.csv | 8 лет назад | |
| sdkconfig.defaults | 8 лет назад | |
This example demonstrates how to use SPIFFS with ESP32. Example does the following steps:
esp_vfs_spiffs_register function to:
fopen and write to it using fprintf.stat function, and remove it using unlink function.Here is an example console output. In this case format_if_mount_failed parameter was set to true in the source code. SPIFFS was unformatted, so the initial mount has failed. SPIFFS was then formatted, and mounted again.
I (195) example: Initializing SPIFFS
E (195) SPIFFS: mount failed, -10025. formatting...
I (4525) example: Opening file
I (4635) example: File written
I (4685) example: Renaming file
I (4735) example: Reading file
I (4735) example: Read from file: 'Hello World!'
I (4735) example: SPIFFS unmounted