mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
feat(storage/fatfs): add Kconfig option to enable dynamic window buffers
This commit is contained in:
@@ -253,4 +253,15 @@ menu "FAT Filesystem support"
|
|||||||
If enabled, the whole link operation (including file copying) is performed under lock.
|
If enabled, the whole link operation (including file copying) is performed under lock.
|
||||||
This ensures that the link operation is atomic, but may cause performance for large files.
|
This ensures that the link operation is atomic, but may cause performance for large files.
|
||||||
It may create less fragmented file copy.
|
It may create less fragmented file copy.
|
||||||
|
config FATFS_USE_DYN_BUFFERS
|
||||||
|
bool "Use dynamic buffers"
|
||||||
|
depend on CONFIG_WL_SECTOR_SIZE_4096
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
If enabled, the buffers used by FATFS will be allocated separately from the rest of the structure.
|
||||||
|
This option is useful when using multiple FATFS instances with different
|
||||||
|
sector sizes, as the buffers will be allocated according to the sector size.
|
||||||
|
If disabled, the greatest sector size will be used for all FATFS instances.
|
||||||
|
(In most cases, this would be the sector size of Wear Levelling library)
|
||||||
|
This might cause more memory to be used than necessary.
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -311,7 +311,7 @@
|
|||||||
/ The FF_FS_TIMEOUT defines timeout period in unit of O/S time tick.
|
/ The FF_FS_TIMEOUT defines timeout period in unit of O/S time tick.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FF_USE_DYN_BUFFER 0
|
#define FF_USE_DYN_BUFFER CONFIG_FATFS_USE_DYN_BUFFERS
|
||||||
/* The option FF_USE_DYN_BUFFER controls source of size used for buffers in the FS and FIL objects.
|
/* The option FF_USE_DYN_BUFFER controls source of size used for buffers in the FS and FIL objects.
|
||||||
/
|
/
|
||||||
/ 0: Disable dynamic buffer size and use static size buffers defined by FF_MAX_SS.
|
/ 0: Disable dynamic buffer size and use static size buffers defined by FF_MAX_SS.
|
||||||
|
Reference in New Issue
Block a user