diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-07 12:53:27 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-07 12:53:27 +0000 |
commit | d0771593893ef9f8a9ae4ab689c569b88e3631a9 (patch) | |
tree | 8eaba6cc5552639a5f915193f7fee144da99b34b /os/hal/platforms/STM32/rtc_lld.h | |
parent | b8ad6dbae6914316f731c99324ccb5052018dfbf (diff) | |
download | ChibiOS-d0771593893ef9f8a9ae4ab689c569b88e3631a9.tar.gz ChibiOS-d0771593893ef9f8a9ae4ab689c569b88e3631a9.tar.bz2 ChibiOS-d0771593893ef9f8a9ae4ab689c569b88e3631a9.zip |
RTC. rtcStart() and rtcStop() functions replaced by rtcSetCallback()
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3293 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/rtc_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/rtc_lld.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/os/hal/platforms/STM32/rtc_lld.h b/os/hal/platforms/STM32/rtc_lld.h index 3b4f69665..2ec4427d5 100644 --- a/os/hal/platforms/STM32/rtc_lld.h +++ b/os/hal/platforms/STM32/rtc_lld.h @@ -66,10 +66,12 @@ /*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
+
/**
- * @brief Structure representing an RTC driver config.
+ * @brief Structure representing an RTC driver.
*/
-typedef struct {
+struct RTCDriver{
+#if RTC_SUPPORTS_CALLBACKS
/**
* @brief Overflow callback. Set it to NULL if not used.
*/
@@ -84,17 +86,7 @@ typedef struct { * @brief Alarm callback. Set it to NULL if not used.
*/
rtccb_t alarm_cb;
-}RTCConfig;
-
-
-/**
- * @brief Structure representing an RTC driver.
- */
-struct RTCDriver{
- /**
- * @brief Pointer to RCT config.
- */
- const RTCConfig *config;
+#endif /* RTC_SUPPORTS_CALLBACKS */
};
/*===========================================================================*/
@@ -112,8 +104,8 @@ extern RTCDriver RTCD; extern "C" {
#endif
void rtc_lld_init(void);
- void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp);
- void rtc_lld_stop(void);
+ void rtc_lld_set_callback(RTCDriver *rtcp, rtccb_t overflow_cb,
+ rtccb_t second_cb, rtccb_t alarm_cb);
void rtc_lld_set_time(uint32_t tv_sec);
uint32_t rtc_lld_get_sec(void);
uint16_t rtc_lld_get_msec(void);
|