diff options
| author | bernard.xiong <[email protected]> | 2010-11-30 07:14:42 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-11-30 07:14:42 +0000 |
| commit | 82f817046c0145d9ba4c98d0b7553b4a90124d9a (patch) | |
| tree | 778a06f9a5adff69af93519eba2b2091d4428daa /components | |
| parent | 6a6d49f52d6458d98ee1c31afbadc9177c98adb4 (diff) | |
merge DFS ELM FatFs from 0.3.2 to 0.4.x
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1158 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/filesystems/elmfat/ff.c | 2 | ||||
| -rw-r--r-- | components/dfs/filesystems/elmfat/ffconf.h | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/components/dfs/filesystems/elmfat/ff.c b/components/dfs/filesystems/elmfat/ff.c index 4a3170ca8a..40b2d03f4c 100644 --- a/components/dfs/filesystems/elmfat/ff.c +++ b/components/dfs/filesystems/elmfat/ff.c @@ -2774,7 +2774,7 @@ FRESULT f_forward ( #define N_ROOTDIR 512 /* Multiple of 32 and <= 2048 */
#define N_FATS 2 /* 1 or 2 */
#define MAX_SECTOR 131072000UL /* Maximum partition size */
-#define MIN_SECTOR 2000UL /* Minimum partition size */
+#define MIN_SECTOR 512UL /* Minimum partition size */
FRESULT f_mkfs (
diff --git a/components/dfs/filesystems/elmfat/ffconf.h b/components/dfs/filesystems/elmfat/ffconf.h index cafcc4d1fc..d41ead4c29 100644 --- a/components/dfs/filesystems/elmfat/ffconf.h +++ b/components/dfs/filesystems/elmfat/ffconf.h @@ -127,7 +127,11 @@ /* Number of volumes (logical drives) to be used. */
+#ifdef RT_DFS_ELM_MAX_SECTOR_SIZE
+#define _MAX_SS RT_DFS_ELM_MAX_SECTOR_SIZE
+#else
#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
+#endif
/* Maximum sector size to be handled.
/ Always set 512 for memory card and hard disk but a larger value may be
/ required for floppy disk (512/1024) and optical disk (512/2048).
@@ -162,8 +166,11 @@ / If it is not the case, the value can also be set to 1 to improve the
/ performance and code size. */
-
-#define _FS_REENTRANT 0 /* 0 or 1 */
+#ifdef RT_DFS_ELM_REENTRANT
+#define _FS_REENTRANT RT_DFS_ELM_REENTRANT /* 0 or 1 */
+#else
+#define _FS_REENTRANT 0
+#endif
#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
#define _SYNC_t rt_mutex_t /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
/* The _FS_REENTRANT option switches the reentrancy of the FatFs module.
|
