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
This commit is contained in:
barthess 2014-11-03 12:47:28 +00:00
parent a9d9d5d259
commit a23988226b
1 changed files with 4 additions and 2 deletions

View File

@ -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