SD-Card Control Program / Using Micro-SD / based on SDCardTest Program (http://mbed.org/users/simon/programs/SDCardTest/gpdz4x/)

Dependencies:   mbed SDFileSystem

Please refer following my Notebook page.
/users/kenjiArai/notebook/sd-card-control-new/#

Revision:
5:e222c59853e2
Parent:
4:fc36c8ec2966
Child:
7:4467fbfa888b
--- a/FatFs_Mon/mon.cpp	Sat Aug 17 03:28:33 2019 +0000
+++ b/FatFs_Mon/mon.cpp	Tue Dec 24 11:23:19 2019 +0000
@@ -8,7 +8,7 @@
  *      Created:    May        5th, 2015
  *      Revised:    June      14th, 2015
  *      Revised:    April      7th, 2018
- *      Revised:    August    17th, 2019
+ *      Revised:    December  24th, 2019
  */
 
 /*
@@ -119,7 +119,7 @@
     "x     extend commands mode\r\n"
     "q     Return to main\r\n"
     "t     Show current time or Adjust time\r\n"
-    "      e.g. t 18 3 28 14 48 20 -> 2018-03-28 14:48:20\r\n"
+    "      e.g. t 19 12 24 10 11 12 -> 2019-12-24 10:11:12\r\n"
     "?     Help/You know the command\r\n"
     "\r\n";
 
@@ -292,6 +292,30 @@
     }
 }
 
+uint32_t get_data_file_size(const char *const file_name)
+{
+    BYTE res;
+    //const char *file_name ="acc_data.txt";
+ 
+    if (Dirx == NULL){
+        Dirx = new FATFS_DIR;
+    }
+    char p = NULL;
+    res = f_opendir(Dirx, &p);
+    if (res) {
+        put_rc((FRESULT)res);
+        return 0;
+    }
+    for(;;) {
+        res = f_readdir(Dirx, &Finfo);
+        if ((res != FR_OK) || !Finfo.fname[0]) break;
+        if (strcmp(Finfo.fname, file_name) == 0){
+            return Finfo.fsize;
+        }
+    }
+    return 0;
+}
+
 static void extended_mon( char *ptr )
 {
     PUTS(HelpMsg1);