Get rid of the redundant ATTR_NEVER_INLINE macro which translated to the same as...
[pub/USBasp.git] / Projects / TempDataLogger / Lib / FATFs / diskio.c
index c181512..8cc8cd4 100644 (file)
@@ -38,7 +38,7 @@ DRESULT disk_read (
        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) */
+       BYTE count              /* Number of sectors to read (1..128) */
 )
 {
        DataflashManager_ReadBlocks_RAM(sector, count, buff);
@@ -55,7 +55,7 @@ DRESULT disk_write (
        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) */
+       BYTE count                      /* Number of sectors to write (1..128) */
 )
 {
        DataflashManager_WriteBlocks_RAM(sector, count, buff);
@@ -83,18 +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);
+       RTC_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);
 }