This is SDFileSystem which corrected the bug for MiMicSDK.

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

Fork of SDFileSystem by mbed official

Revision:
8:22ce3449b224
Parent:
7:5429e81addde
--- a/FATFileSystem/FATFileSystem.cpp	Sun Apr 28 08:54:19 2013 +0000
+++ b/FATFileSystem/FATFileSystem.cpp	Sun Apr 28 12:23:28 2013 +0000
@@ -27,9 +27,7 @@
 #include "FATFileHandle.h"
 #include "FATDirHandle.h"
 
-//#include "mbed_debug.h"
-#define debug
-#define debug_if
+
 
 
 DWORD get_fattime(void) {
@@ -47,12 +45,10 @@
 FATFileSystem *FATFileSystem::_ffs[_VOLUMES] = {0};
 
 FATFileSystem::FATFileSystem(const char* n) : FileSystemLike(n) {
-    debug_if(FFS_DBG, "FATFileSystem(%s)\n", n);
     for(int i=0; i<_VOLUMES; i++) {
         if(_ffs[i] == 0) {
             _ffs[i] = this;
             _fsid = i;
-            debug_if(FFS_DBG, "Mounting [%s] on ffs drive [%d]\n", _name, _fsid);
             f_mount(i, &_fs);
             return;
         }
@@ -70,7 +66,6 @@
 }
 
 FileHandle *FATFileSystem::open(const char* name, int flags) {
-    debug_if(FFS_DBG, "open(%s) on filesystem [%s], drv [%d]\n", name, _name, _fsid);
 //    char n[64];
 //    sprintf(n, "%d:/%s", _fsid, name);
     
@@ -93,7 +88,6 @@
     FIL fh;
     FRESULT res = f_open(&fh,this->_fsid,name, openmode);
     if (res) { 
-        debug_if(FFS_DBG, "f_open('w') failed: %d\n", res);
         return NULL;
     }
     if (flags & O_APPEND) {
@@ -105,7 +99,6 @@
 int FATFileSystem::remove(const char *filename) {
     FRESULT res = f_unlink(this->_fsid,filename);
     if (res) { 
-        debug_if(FFS_DBG, "f_unlink() failed: %d\n", res);
         return -1;
     }
     return 0;
@@ -114,7 +107,6 @@
 int FATFileSystem::format() {
     FRESULT res = f_mkfs(_fsid, 0, 512); // Logical drive number, Partitioning rule, Allocation unit size (bytes per cluster)
     if (res) {
-        debug_if(FFS_DBG, "f_mkfs() failed: %d\n", res);
         return -1;
     }
     return 0;