aboutsummaryrefslogtreecommitdiffstats
path: root/os/various
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-03 12:47:28 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-03 12:47:28 +0000
commita23988226b87183a1ddfcbdc8a7e72ca5e6c1c37 (patch)
tree4f546460fb970918cc4c087a1ff2317ed319d167 /os/various
parenta9d9d5d259f65996fd6b4d8d54279b52c26f7999 (diff)
downloadChibiOS-a23988226b87183a1ddfcbdc8a7e72ca5e6c1c37.tar.gz
ChibiOS-a23988226b87183a1ddfcbdc8a7e72ca5e6c1c37.tar.bz2
ChibiOS-a23988226b87183a1ddfcbdc8a7e72ca5e6c1c37.zip
Updated RTC related code in fatfs bindigs.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7469 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r--os/various/fatfs_bindings/fatfs_diskio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/various/fatfs_bindings/fatfs_diskio.c b/os/various/fatfs_bindings/fatfs_diskio.c
index daac33348..9cd3ea894 100644
--- a/os/various/fatfs_bindings/fatfs_diskio.c
+++ b/os/various/fatfs_bindings/fatfs_diskio.c
@@ -22,7 +22,6 @@ extern SDCDriver SDCD1;
#endif
#if HAL_USE_RTC
-#include "chrtclib.h"
extern RTCDriver RTCD1;
#endif
@@ -245,7 +244,10 @@ DRESULT disk_ioctl (
DWORD get_fattime(void) {
#if HAL_USE_RTC
- return rtcGetTimeFat(&RTCD1);
+ RTCDateTime timespec;
+
+ rtcGetTime(&RTCD1, &timespec);
+ return rtcConvertDateTimeToFAT(&timespec);
#else
return ((uint32_t)0 | (1 << 16)) | (1 << 21); /* wrong but valid time */
#endif