diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-07 07:36:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-07 07:36:07 +0000 |
commit | 0a3c31495e264b010180a5ec627bcff98e9c0501 (patch) | |
tree | 9a07cb9a625e12d2c27c2d3a2e0dfc434c2d8348 /os | |
parent | 7b14ebcc5f0701bc03944730ae2f3c40da0701e5 (diff) | |
download | ChibiOS-0a3c31495e264b010180a5ec627bcff98e9c0501.tar.gz ChibiOS-0a3c31495e264b010180a5ec627bcff98e9c0501.tar.bz2 ChibiOS-0a3c31495e264b010180a5ec627bcff98e9c0501.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3756 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM32/RTCv2/rtc_lld.c | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM32/RTCv2/rtc_lld.h | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.c b/os/hal/platforms/STM32/RTCv2/rtc_lld.c index 6f7a93457..81393f8c6 100644 --- a/os/hal/platforms/STM32/RTCv2/rtc_lld.c +++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.c @@ -109,7 +109,7 @@ void rtc_lld_init(void){ preload |= ((RTC_CLK / (PREDIV_A + 1)) - 1) & 0x7FFF;
/* Selects clock source (previously enabled and stabilized).*/
- RCC->BDCR = (RCC->BDCR & ~RCC_BDCR_RTCSEL) | STM32_RTC;
+ RCC->BDCR = (RCC->BDCR & ~RCC_BDCR_RTCSEL) | STM32_RTCSEL;
/* RTC enabled regardless its previous status.*/
RCC->BDCR |= RCC_BDCR_RTCEN;
diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.h b/os/hal/platforms/STM32/RTCv2/rtc_lld.h index 08d58c898..f6526538f 100644 --- a/os/hal/platforms/STM32/RTCv2/rtc_lld.h +++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.h @@ -40,11 +40,13 @@ /*===========================================================================*/
/**
- * @brief This RTC implementation supports callbacks.
+ * @brief This RTC implementation doesn't support callbacks.
*/
-#if !defined(RTC_SUPPORTS_CALLBACKS) || defined(__DOXYGEN__)
#define RTC_SUPPORTS_CALLBACKS FALSE
-#endif
+
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
/**
* @brief Two alarm comparators available on STM32F4x.
@@ -71,8 +73,9 @@ #error "RTC not present in the selected device"
#endif
-#if !(STM32_RTC == STM32_RTC_LSE) && !(STM32_RTC == STM32_RTC_LSI) && \
- !(STM32_RTC == STM32_RTC_HSE)
+#if !(STM32_RTCSEL == STM32_RTCSEL_LSE) && \
+ !(STM32_RTCSEL == STM32_RTCSEL_LSI) && \
+ !(STM32_RTCSEL == STM32_RTCSEL_HSEDIV)
#error "invalid source selected for RTC clock"
#endif
|