modified version using external RTC for timestamps

Fork of FATFileSystem by mbed official

Revision:
11:3992ff7dc7dc
Parent:
9:e2ab678eb692
Child:
12:67250f8df758
--- a/FATFileSystem.cpp	Sat Jul 30 20:47:51 2016 +0000
+++ b/FATFileSystem.cpp	Mon Jan 29 09:40:05 2018 +0000
@@ -24,13 +24,17 @@
 #include "ffconf.h"
 #include "mbed_debug.h"
 
+#include "DS1307.h"
+#include "rtc_define.h"
+
 #include "FATFileSystem.h"
 #include "FATFileHandle.h"
 #include "FATDirHandle.h"
 
 DWORD get_fattime(void) {
     time_t rawtime;
-    time(&rawtime);
+    //time(&rawtime);
+    rawtime = rtc->now().unixtime();
     struct tm *ptm = localtime(&rawtime);
     return (DWORD)(ptm->tm_year - 80) << 25
          | (DWORD)(ptm->tm_mon + 1  ) << 21