Example of reading and writing text file in microSD card for DISCO-F746. DISCO-F746 で microSD カードのテキスト・ファイルの読み書きを行う例.

Dependencies:   BSP_DISCO_F746NG SDFileSystem_Warning_Fixed

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Mon Nov 14 10:08:40 2016 +0000
Parent:
1:7aa80a497ed2
Commit message:
3

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 7aa80a497ed2 -r 0705bf3a3e1e main.cpp
--- a/main.cpp	Wed Nov 02 03:21:08 2016 +0000
+++ b/main.cpp	Mon Nov 14 10:08:40 2016 +0000
@@ -4,7 +4,7 @@
 //  mount(), unmount() を使うことを除けば通常のテキストファイルの
 //  読み書きと同じ.
 //
-//  2016/11/02, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/11/14, Copyright (c) 2016 MIKAMI, Naoki
 //--------------------------------------------------------------
 
 #include "mbed.h"
@@ -38,7 +38,7 @@
         fprintf(stderr, "Open error for reading!!\r\n");
         while (true) {}
     }
-    
+
     printf("String in read file is as follows:\r\n");
 
     while (true)
@@ -48,12 +48,12 @@
         printf("%c", chr);
         if (chr == '\n') printf("\r");
     }
-    printf("\r\n");
-    
+
     fclose(fp);
-   
     sd.unmount();    // SD 用
-    
+
+    printf("\r\nSD Text file write/read test: completed\r\n");
+
     while(true)
     {
         led_green = !led_green;