aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/rtc.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-27 15:07:26 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-27 15:07:26 +0000
commite40082e1d66e963a16ef36ad2231dd40b56bdf7c (patch)
treedf6ff561cedc5c66ffaf6416f6ac9bd65b2b7d28 /os/hal/src/rtc.c
parent5e580ea5724dda947be738bf22f1f47adfb6feee (diff)
downloadChibiOS-e40082e1d66e963a16ef36ad2231dd40b56bdf7c.tar.gz
ChibiOS-e40082e1d66e963a16ef36ad2231dd40b56bdf7c.tar.bz2
ChibiOS-e40082e1d66e963a16ef36ad2231dd40b56bdf7c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7543 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/rtc.c')
-rw-r--r--os/hal/src/rtc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c
index 68453e91b..e0c078ef2 100644
--- a/os/hal/src/rtc.c
+++ b/os/hal/src/rtc.c
@@ -74,6 +74,22 @@ void rtcInit(void) {
}
/**
+ * @brief Initializes a generic RTC driver object.
+ * @details The HW dependent part of the initialization has to be performed
+ * outside, usually in the hardware initialization code.
+ *
+ * @param[out] rtcp pointer to RTC driver structure
+ *
+ * @init
+ */
+void rtcObjectInit(RTCDriver *rtcp) {
+
+#if RTC_HAS_STORAGE
+ rtcp->vmt = &_rtc_lld_vmt;
+#endif
+}
+
+/**
* @brief Set current time.
* @note This function can be called from any context but limitations
* could be imposed by the low level implementation. It is