diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-09 22:14:09 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-09 22:14:09 +0000 |
commit | 7a783452728d82c395a6273022ea239375db0c64 (patch) | |
tree | 8efa953005750caa23fdb4db7f76e230fbc6ba8a /os/hal/platforms/STM32F4xx/rtc_lld.h | |
parent | e7e63d88dbe7eb57e8d13236e4da772d7fa2a912 (diff) | |
download | ChibiOS-7a783452728d82c395a6273022ea239375db0c64.tar.gz ChibiOS-7a783452728d82c395a6273022ea239375db0c64.tar.bz2 ChibiOS-7a783452728d82c395a6273022ea239375db0c64.zip |
RTC. Setting and getting time now works.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3589 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F4xx/rtc_lld.h')
-rw-r--r-- | os/hal/platforms/STM32F4xx/rtc_lld.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/os/hal/platforms/STM32F4xx/rtc_lld.h b/os/hal/platforms/STM32F4xx/rtc_lld.h index 65eed6781..529215483 100644 --- a/os/hal/platforms/STM32F4xx/rtc_lld.h +++ b/os/hal/platforms/STM32F4xx/rtc_lld.h @@ -43,7 +43,7 @@ /**
* @brief One alarm comparator available.
*/
-#define RTC_ALARMS 1
+#define RTC_ALARMS 2
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -80,9 +80,11 @@ typedef uint32_t rtcalarm_t; * @brief Type of an RTC event.
*/
typedef enum {
- RTC_EVENT_SECOND = 0, /** Triggered every second. */
- RTC_EVENT_ALARM = 1, /** Triggered on alarm. */
- RTC_EVENT_OVERFLOW = 2 /** Triggered on counter overflow. */
+ RTC_EVENT_WAKEUP = 0, /** Triggered every wakeup event. */
+ RTC_EVENT_ALARM_A = 1, /** Triggered on alarm A. */
+ RTC_EVENT_ALARM_B = 2, /** Triggered on alarm B. */
+ RTC_EVENT_TAMPER = 3, /** Triggered on Tamper event. */
+ RTC_EVENT_TIMESTAMP = 4, /** Triggered on TimeStamp event. */
} rtcevent_t;
/**
@@ -105,17 +107,17 @@ struct RTCTime { };
-
/**
* @brief Structure representing an RTC alarm specification.
*/
struct RTCAlarm {
/**
- * @brief Seconds since UNIX epoch.
+ * @brief Date and time of alarm in BCD.
*/
- uint32_t tv_sec;
+ uint32_t tv_datetime;
};
+
/**
* @brief Structure representing an RTC driver.
*/
|