diff --git a/firmware/filesystem/at45db041d.c b/firmware/filesystem/at45db041d.c index 0c6fe37..99b1ff9 100644 --- a/firmware/filesystem/at45db041d.c +++ b/firmware/filesystem/at45db041d.c @@ -236,9 +236,13 @@ DRESULT dataflash_ioctl(BYTE ctrl, void *buff) { } #endif /* _USE_IOCTL != 0 */ - - DWORD get_fattime () { - // ToDo! - return 0; + struct tm* tm=mygmtime(getSeconds()); + DWORD t= (((tm->tm_year+YEAR0-1980)<<9)| + ((tm->tm_mon+1)<<5)| + (tm->tm_mday))<<16 | + ((tm->tm_hour<<11)| + (tm->tm_min<<5)| + (tm->tm_sec>>1)); + return t; }