The wait in mci_WaitForEvent will delay all card transactions.

Dependencies:   FATFileSystem

Fork of EALib by EmbeddedArtists AB

Files at this revision

API Documentation at this revision

Comitter:
embeddedartists
Date:
Wed Oct 09 07:51:52 2013 +0000
Parent:
2:1c6134c80dc5
Child:
4:b32cf4ef45c5
Commit message:
Updated MCIFileSystem with needed PullUp on card detect pin.

Changed in this revision

MCIFileSystem.cpp Show annotated file Show diff for this revision Revisions of this file
MCIFileSystem.h Show annotated file Show diff for this revision Revisions of this file
--- a/MCIFileSystem.cpp	Fri Sep 27 14:07:07 2013 +0000
+++ b/MCIFileSystem.cpp	Wed Oct 09 07:51:52 2013 +0000
@@ -596,6 +596,7 @@
     if (cd != NC)
     {
       _cardDetect = new DigitalIn(cd);
+      _cardDetect->mode(PullUp);
     }
 }
 
--- a/MCIFileSystem.h	Fri Sep 27 14:07:07 2013 +0000
+++ b/MCIFileSystem.h	Wed Oct 09 07:51:52 2013 +0000
@@ -18,10 +18,15 @@
  *         wait(0.5);
  *     }
  *     
+ *     printf("Found SD/MMC card, writing to /mci/myfile.txt ...\n");
+ *     
  *     FILE *fp = fopen("/mci/myfile.txt", "w");
  *     if (fp != NULL) {
  *         fprintf(fp, "Hello World!\n");
  *         fclose(fp);
+ *         printf("Wrote to /mci/myfile.txt\n");
+ *     } else {
+ *         printf("Failed to open /mci/myfile.txt\n");
  *     }
  * }
  * @endcode