summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-07-25 16:41:30 +0000
committer[email protected] <[email protected]>2012-07-25 16:41:30 +0000
commitf7fbd6bc6d72ba92e8d2c30176e94ab36e7c7c4e (patch)
tree765be819072b20a84e07d7ecb3f028c3ce87c080 /components/dfs
parentee4da4b03ec72a75b20ea2e4325fa400712c5588 (diff)
add two functions for elm fatfs provided by aozima
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2231 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/dfs')
-rw-r--r--components/dfs/filesystems/elmfat/dfs_elm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c
index d4f1dfc878..c2ccac1a89 100644
--- a/components/dfs/filesystems/elmfat/dfs_elm.c
+++ b/components/dfs/filesystems/elmfat/dfs_elm.c
@@ -12,6 +12,7 @@
* 2008-02-22 QiuYi The first version.
* 2011-10-08 Bernard fixed the block size in statfs.
* 2011-11-23 Bernard fixed the rename issue.
+ * 2012-07-26 aozima implement ff_memalloc and ff_memfree.
*/
#include <rtthread.h>
@@ -805,3 +806,19 @@ void ff_rel_grant(_SYNC_t m)
}
#endif
+
+/* Memory functions */
+#if _USE_LFN == 3
+/* Allocate memory block */
+void* ff_memalloc (UINT size)
+{
+ return rt_malloc(size);
+}
+
+/* Free memory block */
+void ff_memfree (void* mem)
+{
+ rt_free(mem);
+}
+#endif /* _USE_LFN == 3 */
+