|
|
@@ -1,8 +1,8 @@
|
|
|
/*---------------------------------------------------------------------------/
|
|
|
-/ FatFs Functional Configurations
|
|
|
+/ Configurations of FatFs Module
|
|
|
/---------------------------------------------------------------------------*/
|
|
|
|
|
|
-#define FFCONF_DEF 86631 /* Revision ID */
|
|
|
+#define FFCONF_DEF 80286 /* Revision ID */
|
|
|
|
|
|
/*---------------------------------------------------------------------------/
|
|
|
/ Function Configurations
|
|
|
@@ -30,11 +30,11 @@
|
|
|
/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
|
|
|
|
|
|
|
|
|
-#define FF_USE_MKFS 1
|
|
|
+#define FF_USE_MKFS 0
|
|
|
/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
|
|
|
|
|
|
|
|
|
-#define FF_USE_FASTSEEK 1
|
|
|
+#define FF_USE_FASTSEEK 0
|
|
|
/* This option switches fast seek function. (0:Disable or 1:Enable) */
|
|
|
|
|
|
|
|
|
@@ -57,8 +57,8 @@
|
|
|
|
|
|
|
|
|
#define FF_USE_STRFUNC 0
|
|
|
-#define FF_PRINT_LLI 0
|
|
|
-#define FF_PRINT_FLOAT 0
|
|
|
+#define FF_PRINT_LLI 1
|
|
|
+#define FF_PRINT_FLOAT 1
|
|
|
#define FF_STRF_ENCODE 3
|
|
|
/* FF_USE_STRFUNC switches string functions, f_gets(), f_putc(), f_puts() and
|
|
|
/ f_printf().
|
|
|
@@ -68,7 +68,7 @@
|
|
|
/ 2: Enable with LF-CRLF conversion.
|
|
|
/
|
|
|
/ FF_PRINT_LLI = 1 makes f_printf() support long long argument and FF_PRINT_FLOAT = 1/2
|
|
|
- makes f_printf() support floating point argument. These features want C99 or later.
|
|
|
+/ makes f_printf() support floating point argument. These features want C99 or later.
|
|
|
/ 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.
|
|
|
@@ -84,11 +84,7 @@
|
|
|
/ Locale and Namespace Configurations
|
|
|
/---------------------------------------------------------------------------*/
|
|
|
|
|
|
-#ifdef RT_DFS_ELM_CODE_PAGE
|
|
|
-# define FF_CODE_PAGE RT_DFS_ELM_CODE_PAGE
|
|
|
-#else
|
|
|
-# define FF_CODE_PAGE 936
|
|
|
-#endif
|
|
|
+#define FF_CODE_PAGE 932
|
|
|
/* This option specifies the OEM code page to be used on the target system.
|
|
|
/ Incorrect code page setting can cause a file open failure.
|
|
|
/
|
|
|
@@ -117,13 +113,8 @@
|
|
|
*/
|
|
|
|
|
|
|
|
|
-#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
|
|
|
+#define FF_USE_LFN 0
|
|
|
+#define FF_MAX_LFN 255
|
|
|
/* The FF_USE_LFN switches the support for LFN (long file name).
|
|
|
/
|
|
|
/ 0: Disable LFN. FF_MAX_LFN has no effect.
|
|
|
@@ -142,20 +133,7 @@
|
|
|
/ ff_memfree() exemplified in ffsystem.c, need to be added to the project. */
|
|
|
|
|
|
|
|
|
-#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
|
|
|
+#define FF_LFN_UNICODE 0
|
|
|
/* This option switches the character encoding on the API when LFN is enabled.
|
|
|
/
|
|
|
/ 0: ANSI/OEM in current CP (TCHAR = char)
|
|
|
@@ -188,11 +166,7 @@
|
|
|
/ Drive/Volume Configurations
|
|
|
/---------------------------------------------------------------------------*/
|
|
|
|
|
|
-#ifdef RT_DFS_ELM_DRIVES
|
|
|
-#define FF_VOLUMES RT_DFS_ELM_DRIVES
|
|
|
-#else
|
|
|
-#define FF_VOLUMES 1
|
|
|
-#endif
|
|
|
+#define FF_VOLUMES 1
|
|
|
/* Number of volumes (logical drives) to be used. (1-10) */
|
|
|
|
|
|
|
|
|
@@ -204,7 +178,7 @@
|
|
|
/ logical drives. Number of items must not be less than FF_VOLUMES. Valid
|
|
|
/ characters for the volume ID strings are A-Z, a-z and 0-9, however, they are
|
|
|
/ compared in case-insensitive. If FF_STR_VOLUME_ID >= 1 and FF_VOLUME_STRS is
|
|
|
-/ not defined, a user defined volume string table needs to be defined as:
|
|
|
+/ not defined, a user defined volume string table is needed as:
|
|
|
/
|
|
|
/ const char* VolumeStr[FF_VOLUMES] = {"ram","flash","sd","usb",...
|
|
|
*/
|
|
|
@@ -216,15 +190,11 @@
|
|
|
/ number and only an FAT volume found on the physical drive will be mounted.
|
|
|
/ When this function is enabled (1), each logical drive number can be bound to
|
|
|
/ arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk()
|
|
|
-/ funciton will be available. */
|
|
|
+/ function will be available. */
|
|
|
|
|
|
|
|
|
#define FF_MIN_SS 512
|
|
|
-#ifdef RT_DFS_ELM_MAX_SECTOR_SIZE
|
|
|
-#define FF_MAX_SS RT_DFS_ELM_MAX_SECTOR_SIZE
|
|
|
-#else
|
|
|
-#define FF_MAX_SS 512 /* 512, 1024, 2048 or 4096 */
|
|
|
-#endif
|
|
|
+#define FF_MAX_SS 512
|
|
|
/* This set of options configures the range of sector size to be supported. (512,
|
|
|
/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and
|
|
|
/ harddisk, but a larger value may be required for on-board flash memory and some
|
|
|
@@ -260,11 +230,8 @@
|
|
|
/ Instead of private sector buffer eliminated from the file object, common sector
|
|
|
/ buffer in the filesystem object (FATFS) is used for the file data transfer. */
|
|
|
|
|
|
-#ifdef RT_DFS_ELM_USE_EXFAT
|
|
|
-#define FF_FS_EXFAT 1
|
|
|
-#else
|
|
|
-#define FF_FS_EXFAT 0
|
|
|
-#endif
|
|
|
+
|
|
|
+#define FF_FS_EXFAT 0
|
|
|
/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable)
|
|
|
/ To enable exFAT, also LFN needs to be enabled. (FF_USE_LFN >= 1)
|
|
|
/ Note that enabling exFAT discards ANSI C (C89) compatibility. */
|
|
|
@@ -273,10 +240,10 @@
|
|
|
#define FF_FS_NORTC 0
|
|
|
#define FF_NORTC_MON 1
|
|
|
#define FF_NORTC_MDAY 1
|
|
|
-#define FF_NORTC_YEAR 2020
|
|
|
-/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have
|
|
|
-/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
|
|
|
-/ the timestamp function. Every object modified by FatFs will have a fixed timestamp
|
|
|
+#define FF_NORTC_YEAR 2022
|
|
|
+/* The option FF_FS_NORTC switches timestamp feature. If the system does not have
|
|
|
+/ an RTC or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable the
|
|
|
+/ timestamp feature. Every object modified by FatFs will have a fixed timestamp
|
|
|
/ defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time.
|
|
|
/ To enable timestamp function (FF_FS_NORTC = 0), get_fattime() function need to be
|
|
|
/ added to the project to read current time form real-time clock. FF_NORTC_MON,
|
|
|
@@ -286,7 +253,7 @@
|
|
|
|
|
|
#define FF_FS_NOFSINFO 0
|
|
|
/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
|
|
|
-/ option, and f_getfree() function at first time after volume mount will force
|
|
|
+/ option, and f_getfree() function at the first time after volume mount will force
|
|
|
/ a full FAT scan. Bit 1 controls the use of last allocated cluster number.
|
|
|
/
|
|
|
/ bit0=0: Use free cluster count in the FSINFO if available.
|
|
|
@@ -308,34 +275,21 @@
|
|
|
/ lock control is independent of re-entrancy. */
|
|
|
|
|
|
|
|
|
-/* #include <somertos.h> // O/S definitions */
|
|
|
-#include <rtdef.h>
|
|
|
-#ifdef RT_DFS_ELM_REENTRANT
|
|
|
-#define FF_FS_REENTRANT 1 /* 0 or 1 */
|
|
|
-#else
|
|
|
-#define FF_FS_REENTRANT 0 /* 0:Disable or 1:Enable */
|
|
|
-#endif
|
|
|
-#ifndef RT_DFS_ELM_MUTEX_TIMEOUT
|
|
|
-#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
|
|
-#endif
|
|
|
-#define FF_FS_TIMEOUT RT_DFS_ELM_MUTEX_TIMEOUT
|
|
|
-#define FF_SYNC_t rt_mutex_t
|
|
|
+#define FF_FS_REENTRANT 0
|
|
|
+#define FF_FS_TIMEOUT 1000
|
|
|
/* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs
|
|
|
/ module itself. Note that regardless of this option, file access to different
|
|
|
/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
|
|
|
/ and f_fdisk() function, are always not re-entrant. Only file/directory access
|
|
|
-/ to the same volume is under control of this function.
|
|
|
+/ to the same volume is under control of this featuer.
|
|
|
/
|
|
|
-/ 0: Disable re-entrancy. FF_FS_TIMEOUT and FF_SYNC_t have no effect.
|
|
|
+/ 0: Disable re-entrancy. FF_FS_TIMEOUT have no effect.
|
|
|
/ 1: Enable re-entrancy. Also user provided synchronization handlers,
|
|
|
-/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
|
|
|
-/ function, must be added to the project. Samples are available in
|
|
|
-/ option/syscall.c.
|
|
|
+/ ff_mutex_create(), ff_mutex_delete(), ff_mutex_take() and ff_mutex_give()
|
|
|
+/ function, must be added to the project. Samples are available in ffsystem.c.
|
|
|
/
|
|
|
-/ The FF_FS_TIMEOUT defines timeout period in unit of time tick.
|
|
|
-/ The FF_SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
|
|
|
-/ SemaphoreHandle_t and etc. A header file for O/S definitions needs to be
|
|
|
-/ included somewhere in the scope of ff.h. */
|
|
|
+/ The FF_FS_TIMEOUT defines timeout period in unit of O/S time tick.
|
|
|
+*/
|
|
|
|
|
|
|
|
|
|