Merge branch 'feat/simplify_storage_examples' into 'master'

feat(storage/fatfs): update fatfs examples

Closes IDF-5705

See merge request espressif/esp-idf!31174
This commit is contained in:
Tomas Rohlinek
2024-10-18 15:28:44 +08:00
64 changed files with 1004 additions and 73 deletions

View File

@@ -105,7 +105,7 @@ The most supported file system, recommended for common applications - file/direc
**Examples:**
* :example:`storage/sd_card`: access the SD card which uses the FAT file system
* :example:`storage/ext_flash_fatfs`: access the external flash chip which uses the FAT file system
* :example:`storage/fatfs/ext_flash`: access the external flash chip which uses the FAT file system
.. _spiffs-fs-section:

View File

@@ -301,9 +301,9 @@ Improving I/O Performance
Using standard C library functions like ``fread`` and ``fwrite`` instead of platform-specific unbuffered syscalls such as ``read`` and ``write``, may result in slower performance.
The ``fread`` and ``fwrite`` functions are designed for portability rather than speed, introducing some overhead due to their buffered nature. Check the example :example:`storage/fatfsgen` to see how to use these two functions.
The ``fread`` and ``fwrite`` functions are designed for portability rather than speed, introducing some overhead due to their buffered nature. Check the example :example:`storage/fatfs/getting_started` to see how to use these two functions.
In contrast, the ``read`` and ``write`` functions are standard POSIX APIs that can be used directly when working with FatFs through VFS, with ESP-IDF handling the underlying implementation. Check the example :example:`storage/perf_benchmark` to see how to use the two functions.
In contrast, the ``read`` and ``write`` functions are standard POSIX APIs that can be used directly when working with FatFs through VFS, with ESP-IDF handling the underlying implementation. Check the example :example:`storage/fatfs/fs_operations` to see how to use the two functions.
Additional tips are provided below, and further details can be found in :doc:`/api-reference/storage/fatfs`.