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:
parent
a9d9d5d259
commit
a23988226b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue