Add Timestamp support for filesystem. This took me 3h to debug :-/

This commit is contained in:
Stefan `Sec` Zehl 2011-08-01 05:11:56 +02:00
parent 6bd703f006
commit 61c1293611
1 changed files with 8 additions and 4 deletions

View File

@ -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;
}