X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/ac61b81a0b20b86a4865d5e2802f704ad1075541..c31fdbd03eee95660d65adb0f1bf7c0c397fd435:/Projects/TempDataLogger/Lib/FATFs/diskio.c?ds=inline diff --git a/Projects/TempDataLogger/Lib/FATFs/diskio.c b/Projects/TempDataLogger/Lib/FATFs/diskio.c index d4f3897bb..400687734 100644 --- a/Projects/TempDataLogger/Lib/FATFs/diskio.c +++ b/Projects/TempDataLogger/Lib/FATFs/diskio.c @@ -8,10 +8,10 @@ #include "diskio.h" /*-----------------------------------------------------------------------*/ -/* Inidialize a Drive */ +/* Initialize a Drive */ DSTATUS disk_initialize ( - BYTE drv /* Physical drive nmuber (0..) */ + BYTE drv /* Physical drive number (0..) */ ) { return FR_OK; @@ -23,7 +23,7 @@ DSTATUS disk_initialize ( /* Return Disk Status */ DSTATUS disk_status ( - BYTE drv /* Physical drive nmuber (0..) */ + BYTE drv /* Physical drive number (0..) */ ) { return FR_OK; @@ -35,7 +35,7 @@ DSTATUS disk_status ( /* Read Sector(s) */ DRESULT disk_read ( - BYTE drv, /* Physical drive nmuber (0..) */ + BYTE drv, /* Physical drive number (0..) */ BYTE *buff, /* Data buffer to store read data */ DWORD sector, /* Sector address (LBA) */ BYTE count /* Number of sectors to read (1..255) */ @@ -52,7 +52,7 @@ DRESULT disk_read ( #if _READONLY == 0 DRESULT disk_write ( - BYTE drv, /* Physical drive nmuber (0..) */ + BYTE drv, /* Physical drive number (0..) */ const BYTE *buff, /* Data to be written */ DWORD sector, /* Sector address (LBA) */ BYTE count /* Number of sectors to write (1..255) */ @@ -69,7 +69,7 @@ DRESULT disk_write ( /* Miscellaneous Functions */ DRESULT disk_ioctl ( - BYTE drv, /* Physical drive nmuber (0..) */ + BYTE drv, /* Physical drive number (0..) */ BYTE ctrl, /* Control code */ void *buff /* Buffer to send/receive control data */ ) @@ -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); } +