summaryrefslogtreecommitdiff
path: root/lib/fatfs/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fatfs/Kconfig')
-rw-r--r--lib/fatfs/Kconfig111
1 files changed, 108 insertions, 3 deletions
diff --git a/lib/fatfs/Kconfig b/lib/fatfs/Kconfig
index f2c737a6..1a35dc4e 100644
--- a/lib/fatfs/Kconfig
+++ b/lib/fatfs/Kconfig
@@ -64,7 +64,7 @@ menu "FAT Filesystem support"
config FATFS_CODEPAGE_857
bool "Turkish (CP857)"
config FATFS_CODEPAGE_860
- bool "Portugese (CP860)"
+ bool "Portuguese (CP860)"
config FATFS_CODEPAGE_861
bool "Icelandic (CP861)"
config FATFS_CODEPAGE_862
@@ -161,7 +161,7 @@ menu "FAT Filesystem support"
help
This option sets FATFS configuration value _FS_TIMEOUT, scaled to milliseconds.
Sets the number of milliseconds FATFS will wait to acquire a mutex when
- operating on an open file. For example, if one task is performing a lenghty
+ operating on an open file. For example, if one task is performing a lengthy
operation, another task will wait for the first task to release the lock,
and time out after amount of time set by this option.
@@ -184,7 +184,7 @@ menu "FAT Filesystem support"
config FATFS_ALLOC_PREFER_EXTRAM
- bool "Perfer external RAM when allocating FATFS buffers"
+ bool "Prefer external RAM when allocating FATFS buffers"
default y
depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
help
@@ -205,6 +205,63 @@ menu "FAT Filesystem support"
file is opened in write-mode, the seek mechanism will automatically fallback
to the default implementation.
+ choice FATFS_USE_STRFUNC_CHOICE
+ prompt "Enable string functions, f_gets(), f_putc(), f_puts() and f_printf()"
+ default FATFS_USE_STRFUNC_NONE
+ help
+ These are specialized alternatives to stdio functions for working
+ directly with FATFS without VFS. Legacy code may need functions,
+ but for new development, it is advised to use stdio under VFS.
+
+ 0: Disable. FF_PRINT_LLI, FF_PRINT_FLOAT and FF_STRF_ENCODE have no effect.
+ 1: Enable without LF-CRLF conversion.
+ 2: Enable with LF-CRLF conversion.
+
+ config FATFS_USE_STRFUNC_NONE
+ bool "0:Disable"
+
+ config FATFS_USE_STRFUNC_WITHOUT_CRLF_CONV
+ bool "1:Enable without LF-CRLF conversion"
+
+ config FATFS_USE_STRFUNC_WITH_CRLF_CONV
+ bool "2:Enable with LF-CRLF conversion"
+ endchoice
+
+ config FATFS_PRINT_LLI
+ depends on !FATFS_USE_STRFUNC_NONE
+ bool "Make fatfs f_printf() support long long argument"
+ default 0
+
+ config FATFS_PRINT_FLOAT
+ depends on !FATFS_USE_STRFUNC_NONE
+ bool "Make fatfs f_printf() support floating point argument"
+ default 0
+
+ choice FATFS_STRF_ENCODE_CHOICE
+ prompt "FatFS string functions: convert character encoding"
+ depends on !FATFS_LFN_NONE && !FATFS_USE_STRFUNC_NONE
+ default FATFS_STRF_ENCODE_UTF8
+ help
+ When FF_LFN_UNICODE >= 1 with LFN enabled, string functions convert the character
+ encoding in it. FF_STRF_ENCODE selects assumption of character encoding ON THE FILE
+ to be read/written via those functions.
+ 0: ANSI/OEM in current CP
+ 1: Unicode in UTF-16LE
+ 2: Unicode in UTF-16BE
+ 3: Unicode in UTF-8
+
+ config FATFS_STRF_ENCODE_ANSI
+ bool "0:ANSI/OEM in current CP"
+
+ config FATFS_STRF_ENCODE_UTF16LE
+ bool "1:Unicode in UTF-16LE"
+
+ config FATFS_STRF_ENCODE_UTF16BE
+ bool "2:Unicode in UTF-16BE"
+
+ config FATFS_STRF_ENCODE_UTF8
+ bool "3:Unicode in UTF-8"
+ endchoice
config FATFS_FAST_SEEK_BUFFER_SIZE
int "Fast seek CLMT buffer size"
@@ -239,4 +296,52 @@ menu "FAT Filesystem support"
vfs_fat_pwrite(), vfs_fat_link(), vfs_fat_truncate() and vfs_fat_ftruncate() functions.
This feature improves file-consistency and size reporting accuracy for the FatFS,
at a price on decreased performance due to frequent disk operations
+
+ config FATFS_USE_LABEL
+ bool "Use FATFS volume label"
+ default n
+ help
+ Allows FATFS volume label to be specified using f_setlabel
+
+ config FATFS_LINK_LOCK
+ bool "Perform the whole link operation under lock"
+ default y
+ help
+ 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.
+ It may create less fragmented file copy.
+
+ config FATFS_USE_DYN_BUFFERS
+ bool "Use dynamic buffers"
+ default n
+ 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.
+
+ menu "File system free space calculation behavior"
+ help
+ Controls if the file system does or does not trust cached data like free cluster count and allocated
+ cluster number. Setting these to do not trust the data may result of more accurate output from
+ `f_getfree()` function but increased overhead (forces a full FAT scan, etc.).
+
+ config FATFS_DONT_TRUST_FREE_CLUSTER_CNT
+ int "Don't trust free cluster count"
+ default 0
+ range 0 1
+ help
+ If 1, the file system will not trust the free cluster count in the FSINFO (in FATFS struct).
+ This may result in more accurate output from `f_getfree()` function but increased overhead.
+
+ config FATFS_DONT_TRUST_LAST_ALLOC
+ int "Don't trust allocated cluster number"
+ default 0
+ range 0 1
+ help
+ If 1, the file system will not trust the last allocated cluster number in the FSINFO (in FATFS struct).
+ This may result in more accurate output from `f_getfree()` function but increased overhead.
+ endmenu
endmenu