aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/rtc.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-16 14:42:23 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-16 14:42:23 +0000
commit968d0cf6e9e8f362021e4288cd3336fe7922e00e (patch)
treebe576765d1d02f9ad6b36f18542f0f4f06295740 /os/hal/src/rtc.c
parent172680aea3057dcea62fc4a053510d2dd03bb911 (diff)
downloadChibiOS-968d0cf6e9e8f362021e4288cd3336fe7922e00e.tar.gz
ChibiOS-968d0cf6e9e8f362021e4288cd3336fe7922e00e.tar.bz2
ChibiOS-968d0cf6e9e8f362021e4288cd3336fe7922e00e.zip
RTC. High level API rolled back.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3619 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/rtc.c')
-rw-r--r--os/hal/src/rtc.c44
1 files changed, 8 insertions, 36 deletions
diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c
index 20a39ea7c..dda5a9c95 100644
--- a/os/hal/src/rtc.c
+++ b/os/hal/src/rtc.c
@@ -117,8 +117,8 @@ void rtcSetAlarm(RTCDriver *rtcp,
* @note If an alarm has not been set then the returned alarm specification
* is not meaningful.
*
- * @param[in] rtcp pointer to RTC driver structure
- * @param[in] alarm alarm identifier
+ * @param[in] rtcp pointer to RTC driver structure
+ * @param[in] alarm alarm identifier
* @param[out] alarmspec pointer to a @p RTCAlarm structure
*
* @api
@@ -134,50 +134,22 @@ 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 This function enables or disables callbacks, use a @p NULL pointer
+ * in order to disable a callback.
*
* @param[in] rtcp pointer to RTC driver structure
- * @param[in] cb_cfg callback configuration struct
+ * @param[in] callback callback function pointer or @p NULL
*
* @api
*/
-void rtcSetCallback(RTCDriver *rtcp, RTCCallbackConfig *cb_cfg) {
+void rtcSetCallback(RTCDriver *rtcp, rtccb_t callback) {
- chDbgCheck(((rtcp != NULL) && (cb_cfg != NULL)), "rtcSetCallback");
+ chDbgCheck((rtcp != NULL), "rtcSetCallback");
- rtc_lld_set_callback(rtcp, cb_cfg);
+ rtc_lld_set_callback(rtcp, callback);
}
#endif /* RTC_SUPPORTS_CALLBACKS */