sd read/write

Dependencies:   SDFileSystem mbed

Fork of SDFileSystem_HelloWorld by mbed official

Revision:
2:343b407cf6aa
Parent:
1:f4d825b196e7
--- a/main.cpp	Mon Jun 29 01:38:35 2015 +0000
+++ b/main.cpp	Mon Jun 29 02:18:54 2015 +0000
@@ -6,8 +6,6 @@
 
 char sdread[MAX_SIZE];
 int main() {
-    printf("Hello World!\n");   
- 
     mkdir("/sd/mydir", 0777);
     
     FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
@@ -21,7 +19,7 @@
     fp = fopen("/sd/mydir/sdtest.txt", "r");
     if (fp != NULL) {
          fgets(sdread,MAX_SIZE,fp);
-         printf("READ_STR = %s", sdread);
+         printf("%s", sdread);
         fclose(fp);
     } else {
         printf("failed!\n");