From a23988226b87183a1ddfcbdc8a7e72ca5e6c1c37 Mon Sep 17 00:00:00 2001 From: barthess Date: Mon, 3 Nov 2014 12:47:28 +0000 Subject: 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 --- os/various/fatfs_bindings/fatfs_diskio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'os/various') 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, ×pec); + return rtcConvertDateTimeToFAT(×pec); #else return ((uint32_t)0 | (1 << 16)) | (1 << 21); /* wrong but valid time */ #endif -- cgit v1.2.3