summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authormazhiyuan <[email protected]>2021-10-25 13:58:07 +0800
committermazhiyuan <[email protected]>2021-10-25 13:58:07 +0800
commit39933d7305bd173a7c4631fc26d10eed5ff062e2 (patch)
treee94bb771f3f52b8c67b7cae57e09882d7dc93254 /components
parentecd84844c526a22c0f8e965ab56892a7d2f1ea0c (diff)
update ffconf.h
Diffstat (limited to 'components')
-rw-r--r--components/dfs/filesystems/elmfat/ffconf.h36
1 files changed, 31 insertions, 5 deletions
diff --git a/components/dfs/filesystems/elmfat/ffconf.h b/components/dfs/filesystems/elmfat/ffconf.h
index ab0c2dae9f..0965f8a411 100644
--- a/components/dfs/filesystems/elmfat/ffconf.h
+++ b/components/dfs/filesystems/elmfat/ffconf.h
@@ -84,7 +84,11 @@
/ Locale and Namespace Configurations
/---------------------------------------------------------------------------*/
-#define FF_CODE_PAGE 932
+#ifdef RT_DFS_ELM_CODE_PAGE
+# define FF_CODE_PAGE RT_DFS_ELM_CODE_PAGE
+#else
+# define FF_CODE_PAGE 936
+#endif
/* This option specifies the OEM code page to be used on the target system.
/ Incorrect code page setting can cause a file open failure.
/
@@ -113,8 +117,13 @@
*/
-#define FF_USE_LFN 0
-#define FF_MAX_LFN 255
+#if RT_DFS_ELM_USE_LFN
+#define FF_USE_LFN RT_DFS_ELM_USE_LFN
+#define FF_MAX_LFN RT_DFS_ELM_MAX_LFN
+#else
+#define FF_USE_LFN 0 /* 0 to 3 */
+#define FF_MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
+#endif
/* The FF_USE_LFN switches the support for LFN (long file name).
/
/ 0: Disable LFN. FF_MAX_LFN has no effect.
@@ -133,7 +142,20 @@
/ ff_memfree() exemplified in ffsystem.c, need to be added to the project. */
-#define FF_LFN_UNICODE 0
+#ifdef RT_DFS_ELM_LFN_UNICODE
+/* This option switches the character encoding on the API when LFN is enabled.
+/
+/ 0: ANSI/OEM in current CP (TCHAR = char)
+/ 1: Unicode in UTF-16 (TCHAR = WCHAR)
+/ 2: Unicode in UTF-8 (TCHAR = char)
+/ 3: Unicode in UTF-32 (TCHAR = DWORD)
+/
+/ Also behavior of string I/O functions will be affected by this option.
+/ When LFN is not enabled, this option has no effect. */
+#define FF_LFN_UNICODE RT_DFS_ELM_LFN_UNICODE /* 0:ANSI/OEM or 1:Unicode */
+#else
+#define FF_LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
+#endif
/* This option switches the character encoding on the API when LFN is enabled.
/
/ 0: ANSI/OEM in current CP (TCHAR = char)
@@ -166,7 +188,11 @@
/ Drive/Volume Configurations
/---------------------------------------------------------------------------*/
-#define FF_VOLUMES 1
+#ifdef RT_DFS_ELM_DRIVES
+#define FF_VOLUMES RT_DFS_ELM_DRIVES
+#else
+#define FF_VOLUMES 1
+#endif
/* Number of volumes (logical drives) to be used. (1-10) */