modified version using external RTC for timestamps
Fork of FATFileSystem by
Revision 11:3992ff7dc7dc, committed 2018-01-29
- Comitter:
- bwang
- Date:
- Mon Jan 29 09:40:05 2018 +0000
- Parent:
- 9:e2ab678eb692
- Child:
- 12:67250f8df758
- Commit message:
- who knows
Changed in this revision
FATFileSystem.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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