aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/rtc.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-01 13:22:15 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-01 13:22:15 +0000
commit96f976382d7b94911dac7bea9477b3e2bc560408 (patch)
tree28d98d7249a66d399400f0b90d34bdd8665cd8b2 /os/hal/src/rtc.c
parent55f399caf7e95a657a956e8ecc6110f9be306682 (diff)
downloadChibiOS-96f976382d7b94911dac7bea9477b3e2bc560408.tar.gz
ChibiOS-96f976382d7b94911dac7bea9477b3e2bc560408.tar.bz2
ChibiOS-96f976382d7b94911dac7bea9477b3e2bc560408.zip
RTCv1. Driver ported to ChibiOS-3.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7442 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/rtc.c')
-rw-r--r--os/hal/src/rtc.c31
1 files changed, 0 insertions, 31 deletions
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 */
/** @} */