Kconfig 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. menu "FAT Filesystem support"
  2. choice FATFS_CHOOSE_CODEPAGE
  3. prompt "OEM Code Page"
  4. default FATFS_CODEPAGE_437
  5. help
  6. OEM code page used for file name encodings.
  7. If "Dynamic" is selected, code page can be chosen at runtime using
  8. f_setcp function. Note that choosing this option will increase
  9. application size by ~480kB.
  10. config FATFS_CODEPAGE_DYNAMIC
  11. bool "Dynamic (all code pages supported)"
  12. config FATFS_CODEPAGE_437
  13. bool "US (CP437)"
  14. config FATFS_CODEPAGE_720
  15. bool "Arabic (CP720)"
  16. config FATFS_CODEPAGE_737
  17. bool "Greek (CP737)"
  18. config FATFS_CODEPAGE_771
  19. bool "KBL (CP771)"
  20. config FATFS_CODEPAGE_775
  21. bool "Baltic (CP775)"
  22. config FATFS_CODEPAGE_850
  23. bool "Latin 1 (CP850)"
  24. config FATFS_CODEPAGE_852
  25. bool "Latin 2 (CP852)"
  26. config FATFS_CODEPAGE_855
  27. bool "Cyrillic (CP855)"
  28. config FATFS_CODEPAGE_857
  29. bool "Turkish (CP857)"
  30. config FATFS_CODEPAGE_860
  31. bool "Portugese (CP860)"
  32. config FATFS_CODEPAGE_861
  33. bool "Icelandic (CP861)"
  34. config FATFS_CODEPAGE_862
  35. bool "Hebrew (CP862)"
  36. config FATFS_CODEPAGE_863
  37. bool "Canadian French (CP863)"
  38. config FATFS_CODEPAGE_864
  39. bool "Arabic (CP864)"
  40. config FATFS_CODEPAGE_865
  41. bool "Nordic (CP865)"
  42. config FATFS_CODEPAGE_866
  43. bool "Russian (CP866)"
  44. config FATFS_CODEPAGE_869
  45. bool "Greek 2 (CP869)"
  46. config FATFS_CODEPAGE_932
  47. bool "Japanese (DBCS) (CP932)"
  48. config FATFS_CODEPAGE_936
  49. bool "Simplified Chinese (DBCS) (CP936)"
  50. config FATFS_CODEPAGE_949
  51. bool "Korean (DBCS) (CP949)"
  52. config FATFS_CODEPAGE_950
  53. bool "Traditional Chinese (DBCS) (CP950)"
  54. endchoice
  55. config FATFS_CODEPAGE
  56. int
  57. default 0 if FATFS_CODEPAGE_DYNAMIC
  58. default 437 if FATFS_CODEPAGE_437
  59. default 720 if FATFS_CODEPAGE_720
  60. default 737 if FATFS_CODEPAGE_737
  61. default 771 if FATFS_CODEPAGE_771
  62. default 775 if FATFS_CODEPAGE_775
  63. default 850 if FATFS_CODEPAGE_850
  64. default 852 if FATFS_CODEPAGE_852
  65. default 855 if FATFS_CODEPAGE_855
  66. default 857 if FATFS_CODEPAGE_857
  67. default 860 if FATFS_CODEPAGE_860
  68. default 861 if FATFS_CODEPAGE_861
  69. default 862 if FATFS_CODEPAGE_862
  70. default 863 if FATFS_CODEPAGE_863
  71. default 864 if FATFS_CODEPAGE_864
  72. default 865 if FATFS_CODEPAGE_865
  73. default 866 if FATFS_CODEPAGE_866
  74. default 869 if FATFS_CODEPAGE_869
  75. default 932 if FATFS_CODEPAGE_932
  76. default 936 if FATFS_CODEPAGE_936
  77. default 949 if FATFS_CODEPAGE_949
  78. default 950 if FATFS_CODEPAGE_950
  79. default 437
  80. choice FATFS_LONG_FILENAMES
  81. prompt "Long filename support"
  82. default FATFS_LFN_NONE
  83. help
  84. Support long filenames in FAT. Long filename data increases
  85. memory usage. FATFS can be configured to store the buffer for
  86. long filename data in stack or heap.
  87. config FATFS_LFN_NONE
  88. bool "No long filenames"
  89. config FATFS_LFN_HEAP
  90. bool "Long filename buffer in heap"
  91. config FATFS_LFN_STACK
  92. bool "Long filename buffer on stack"
  93. endchoice
  94. config FATFS_MAX_LFN
  95. int "Max long filename length"
  96. depends on !FATFS_LFN_NONE
  97. default 255
  98. range 12 255
  99. help
  100. Maximum long filename length. Can be reduced to save RAM.
  101. choice FATFS_API_ENCODING
  102. prompt "API character encoding"
  103. depends on !FATFS_LFN_NONE
  104. default FATFS_API_ENCODING_ANSI_OEM
  105. help
  106. Choose encoding for character and string arguments/returns when using
  107. FATFS APIs. The encoding of arguments will usually depend on text
  108. editor settings.
  109. config FATFS_API_ENCODING_ANSI_OEM
  110. bool "API uses ANSI/OEM encoding"
  111. config FATFS_API_ENCODING_UTF_16
  112. bool "API uses UTF-16 encoding"
  113. config FATFS_API_ENCODING_UTF_8
  114. bool "API uses UTF-8 encoding"
  115. endchoice
  116. config FATFS_FS_LOCK
  117. int "Number of simultaneously open files protected by lock function"
  118. default 0
  119. range 0 65535
  120. help
  121. This option sets the FATFS configuration value _FS_LOCK.
  122. The option _FS_LOCK switches file lock function to control duplicated file open
  123. and illegal operation to open objects.
  124. * 0: Disable file lock function. To avoid volume corruption, application
  125. should avoid illegal open, remove and rename to the open objects.
  126. * >0: Enable file lock function. The value defines how many files/sub-directories
  127. can be opened simultaneously under file lock control.
  128. Note that the file lock control is independent of re-entrancy.
  129. config FATFS_TIMEOUT_MS
  130. int "Timeout for acquiring a file lock, ms"
  131. default 10000
  132. help
  133. This option sets FATFS configuration value _FS_TIMEOUT, scaled to milliseconds.
  134. Sets the number of milliseconds FATFS will wait to acquire a mutex when
  135. operating on an open file. For example, if one task is performing a lenghty
  136. operation, another task will wait for the first task to release the lock,
  137. and time out after amount of time set by this option.
  138. config FATFS_PER_FILE_CACHE
  139. bool "Use separate cache for each file"
  140. default y
  141. help
  142. This option affects FATFS configuration value _FS_TINY.
  143. If this option is set, _FS_TINY is 0, and each open file has its own cache,
  144. size of the cache is equal to the _MAX_SS variable (512 or 4096 bytes).
  145. This option uses more RAM if more than 1 file is open, but needs less reads
  146. and writes to the storage for some operations.
  147. If this option is not set, _FS_TINY is 1, and single cache is used for
  148. all open files, size is also equal to _MAX_SS variable. This reduces the
  149. amount of heap used when multiple files are open, but increases the number
  150. of read and write operations which FATFS needs to make.
  151. config FATFS_ALLOC_PREFER_EXTRAM
  152. bool "Perfer external RAM when allocating FATFS buffers"
  153. default y
  154. depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
  155. help
  156. When the option is enabled, internal buffers used by FATFS will be allocated
  157. from external RAM. If the allocation from external RAM fails, the buffer will
  158. be allocated from the internal RAM.
  159. Disable this option if optimizing for performance. Enable this option if
  160. optimizing for internal memory size.
  161. config FATFS_USE_FASTSEEK
  162. bool "Enable fast seek algorithm when using lseek function through VFS FAT"
  163. default n
  164. help
  165. The fast seek feature enables fast backward/long seek operations without
  166. FAT access by using an in-memory CLMT (cluster link map table).
  167. Please note, fast-seek is only allowed for read-mode files, if a
  168. file is opened in write-mode, the seek mechanism will automatically fallback
  169. to the default implementation.
  170. config FATFS_FAST_SEEK_BUFFER_SIZE
  171. int "Fast seek CLMT buffer size"
  172. default 64
  173. depends on FATFS_USE_FASTSEEK
  174. help
  175. If fast seek algorithm is enabled, this defines the size of
  176. CLMT buffer used by this algorithm in 32-bit word units.
  177. This value should be chosen based on prior knowledge of
  178. maximum elements of each file entry would store.
  179. endmenu