diff options
Diffstat (limited to 'os/hal/platforms/STM32F4xx/rtc_lld.h')
-rw-r--r-- | os/hal/platforms/STM32F4xx/rtc_lld.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32F4xx/rtc_lld.h b/os/hal/platforms/STM32F4xx/rtc_lld.h index 529215483..dd5a4160e 100644 --- a/os/hal/platforms/STM32F4xx/rtc_lld.h +++ b/os/hal/platforms/STM32F4xx/rtc_lld.h @@ -41,7 +41,7 @@ #define RTC_SUPPORTS_CALLBACKS TRUE
/**
- * @brief One alarm comparator available.
+ * @brief Two alarm comparators available on STM32F4x.
*/
#define RTC_ALARMS 2
@@ -62,6 +62,10 @@ #error "invalid source selected for RTC clock"
#endif
+#if RTC_SUPPORTS_CALLBACKS && !(HAL_USE_EXT)
+#error "interrupts from STM32 RTC works only through EXTI"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
@@ -97,13 +101,18 @@ typedef void (*rtccb_t)(RTCDriver *rtcp, rtcevent_t event); */
struct RTCTime {
/**
- * @brief RTC date register in BCD format.
+ * @brief RTC date register in STM32 BCD format.
*/
uint32_t tv_date;
/**
- * @brief RTC time register in BCD format.
+ * @brief RTC time register in STM32 BCD format.
*/
uint32_t tv_time;
+ /**
+ * @brief Fractional part of time.
+ * @note If platform does not support subseconds than always zero.
+ */
+ uint16_t tv_msec;
};
@@ -112,7 +121,7 @@ struct RTCTime { */
struct RTCAlarm {
/**
- * @brief Date and time of alarm in BCD.
+ * @brief Date and time of alarm in STM32 BCD.
*/
uint32_t tv_datetime;
};
|