From 9a98744b28ecfda0d78d5983e3a2d264c36bcec7 Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 15 Dec 2011 20:49:24 +0000 Subject: RTC. Testhal works on F4x, compiles (but not deeply tested) on F1x. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3615 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/rtc.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'os/hal/src/rtc.c') diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c index 9df399eeb..20a39ea7c 100644 --- a/os/hal/src/rtc.c +++ b/os/hal/src/rtc.c @@ -135,10 +135,38 @@ void rtcGetAlarm(RTCDriver *rtcp, #endif /* RTC_ALARMS > 0 */ + +/** + * @brief Set periodic wakeup period. + * + * @param[in] rtcp pointer to RTC driver structure + * @param[in] wakeupspec pointer to a @p RTCWakeup structure + * + * @api + */ +void rtcSetWakeup(RTCDriver *rtcp, RTCWakeup *wakeupspec) { + + chDbgCheck((rtcp != NULL), "rtcGetAlarm"); + rtc_lld_set_periodic_wakeup(rtcp, wakeupspec); +} + +/** + * @brief Get periodic wakeup period. + * + * @param[in] rtcp pointer to RTC driver structure + * @param[out] wakeupspec pointer to a @p RTCWakeup structure + * + * @api + */ +void rtcGetWakeup(RTCDriver *rtcp, RTCWakeup *wakeupspec) { + + chDbgCheck((rtcp != NULL), "rtcGetAlarm"); + rtc_lld_get_periodic_wakeup(rtcp, wakeupspec); +} + #if RTC_SUPPORTS_CALLBACKS || defined(__DOXYGEN__) /** * @brief Enables or disables RTC callbacks. - * @details TODO: * * @param[in] rtcp pointer to RTC driver structure * @param[in] cb_cfg callback configuration struct -- cgit v1.2.3