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

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Wed Apr 24 08:04:51 2013 +0000
Parent:
2:c8f66dc765d4
Child:
4:ef420d0b08b4
Commit message:
bug fix SDFileSystem::disk_initialize; Adding a disk error checking; ;

Changed in this revision

FATFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
SDFileSystem.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FATFileSystem.lib	Thu Nov 29 10:56:21 2012 +0000
+++ b/FATFileSystem.lib	Wed Apr 24 08:04:51 2013 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/FATFileSystem/#b6669c987c8e
+http://mbed.org/users/mbed_official/code/FATFileSystem/#3775e3b37dd9
--- a/SDFileSystem.cpp	Thu Nov 29 10:56:21 2012 +0000
+++ b/SDFileSystem.cpp	Wed Apr 24 08:04:51 2013 +0000
@@ -143,6 +143,7 @@
 #define SDCARD_V2HC 3
 
 int SDFileSystem::initialise_card() {
+
     // Set to 100kHz for initialisation, and clock card with cs = 1
     _spi.frequency(100000);
     _cs = 1;
@@ -201,6 +202,9 @@
 
 int SDFileSystem::disk_initialize() {
     int i = initialise_card();
+    if(i==SDCARD_FAIL){
+        return 1;
+    }    
     debug_if(SD_DBG, "init card = %d\n", i);
     _sectors = _sd_sectors();