diff --git a/components/fatfs/Kconfig b/components/fatfs/Kconfig index 31dd4f2783..3dda859da4 100644 --- a/components/fatfs/Kconfig +++ b/components/fatfs/Kconfig @@ -180,4 +180,16 @@ menu "FAT Filesystem support" Disable this option if optimizing for performance. Enable this option if optimizing for internal memory size. + + config FATFS_USE_FASTSEEK + bool "Enable fast seek algorithm when using f_lseek function" + default n + help + The fast seek feature enables fast backward/long seek operations without + FAT access by using an in-memory CLMT (cluster link map table). + It is applied to f_read and f_write function as well, however, + the file size cannot be expanded by f_write. + f_lseek function while the file is at fast seek mode. + + endmenu diff --git a/components/fatfs/src/ffconf.h b/components/fatfs/src/ffconf.h index 79792beef2..6578122c5f 100644 --- a/components/fatfs/src/ffconf.h +++ b/components/fatfs/src/ffconf.h @@ -44,7 +44,7 @@ /* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ -#define FF_USE_FASTSEEK 0 +#define FF_USE_FASTSEEK CONFIG_FATFS_USE_FASTSEEK /* This option switches fast seek function. (0:Disable or 1:Enable) */