aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/rtc.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-15 20:49:24 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-15 20:49:24 +0000
commit9a98744b28ecfda0d78d5983e3a2d264c36bcec7 (patch)
treefe7dd0f7dad67a0d18c5693786f4c32594c8a962 /os/hal/src/rtc.c
parent124a432b0ed05568381f2bf6930a86a767f85ea6 (diff)
downloadChibiOS-9a98744b28ecfda0d78d5983e3a2d264c36bcec7.tar.gz
ChibiOS-9a98744b28ecfda0d78d5983e3a2d264c36bcec7.tar.bz2
ChibiOS-9a98744b28ecfda0d78d5983e3a2d264c36bcec7.zip
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
Diffstat (limited to 'os/hal/src/rtc.c')
-rw-r--r--os/hal/src/rtc.c30
1 files changed, 29 insertions, 1 deletions
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