From 96f976382d7b94911dac7bea9477b3e2bc560408 Mon Sep 17 00:00:00 2001 From: barthess Date: Sat, 1 Nov 2014 13:22:15 +0000 Subject: RTCv1. Driver ported to ChibiOS-3. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7442 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/rtc.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'os/hal/src/rtc.c') diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c index d4b13ba62..e67abb746 100644 --- a/os/hal/src/rtc.c +++ b/os/hal/src/rtc.c @@ -185,37 +185,6 @@ void rtcSetCallback(RTCDriver *rtcp, rtccb_t callback) { } #endif /* RTC_SUPPORTS_CALLBACKS */ -/** - * @brief Get current time in format suitable for usage in FAT file system. - * @note The information about day of week and DST is lost in DOS - * format, the second field loses its least significant bit. - * - * @param[out] timespec pointer to a @p RTCDateTime structure - * @return FAT date/time value. - * - * @api - */ -uint32_t rtcConvertDateTimeToFAT(const RTCDateTime *timespec) { - uint32_t fattime; - uint32_t sec, min, hour, tmp; - - osalDbgCheck(timespec != NULL); - - tmp = timespec->millisecond / 1000; - sec = tmp % 60; - min = (tmp - sec) % 3600; - hour = (tmp - sec - min * 60) / 3600; - - fattime = sec >> 1; - fattime |= min << 5; - fattime |= hour << 11; - fattime |= timespec->day << 16; - fattime |= timespec->month << 21; - fattime |= timespec->year << 25; - - return fattime; -} - #endif /* HAL_USE_RTC */ /** @} */ -- cgit v1.2.3