X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/28401f7bb749350a66ebe95649d01a25c01842f7..77a9df36a77d2523dd2bc24fa17f9f04c6c175c5:/Projects/TempDataLogger/Lib/FATFs/diskio.c?ds=sidebyside diff --git a/Projects/TempDataLogger/Lib/FATFs/diskio.c b/Projects/TempDataLogger/Lib/FATFs/diskio.c index 68c2aeb97..400687734 100644 --- a/Projects/TempDataLogger/Lib/FATFs/diskio.c +++ b/Projects/TempDataLogger/Lib/FATFs/diskio.c @@ -83,17 +83,16 @@ DRESULT disk_ioctl ( DWORD get_fattime (void) { - uint8_t Day, Month, Year; - uint8_t Hour, Minute, Second; + TimeDate_t CurrTimeDate; - DS1307_GetDate(&Day, &Month, &Year); - DS1307_GetTime(&Hour, &Minute, &Second); + DS1307_GetTimeDate(&CurrTimeDate); - return ((DWORD)(20 + Year) << 25) | - ((DWORD)Month << 21) | - ((DWORD)Day << 16) | - ((DWORD)Hour << 11) | - ((DWORD)Minute << 5) | - (((DWORD)Second >> 1) << 0); + return ((DWORD)(20 + CurrTimeDate.Year) << 25) | + ((DWORD)CurrTimeDate.Month << 21) | + ((DWORD)CurrTimeDate.Day << 16) | + ((DWORD)CurrTimeDate.Hour << 11) | + ((DWORD)CurrTimeDate.Minute << 5) | + (((DWORD)CurrTimeDate.Second >> 1) << 0); } +