From e40082e1d66e963a16ef36ad2231dd40b56bdf7c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 27 Nov 2014 15:07:26 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7543 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/rtc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'os/hal/src') 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 @@ -73,6 +73,22 @@ void rtcInit(void) { rtc_lld_init(); } +/** + * @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 -- cgit v1.2.3