aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h10
-rw-r--r--os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
index ad2807a0e..eb376b948 100644
--- a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
+++ b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
@@ -111,10 +111,12 @@
#error "RTC not present in the selected device"
#endif
-#if !(STM32_RTCSEL == STM32_RTCSEL_LSE) && \
- !(STM32_RTCSEL == STM32_RTCSEL_LSI) && \
- !(STM32_RTCSEL == STM32_RTCSEL_HSEDIV)
-#error "invalid source selected for RTC clock"
+#if defined(STM32_RTC_CK) && !defined(STM32_RTCCLK)
+#define STM32_RTCCLK STM32_RTC_CK
+#endif
+
+#if !defined(STM32_RTCCLK)
+#error "RTC clock not exported by HAL layer"
#endif
#if STM32_PCLK1 < (STM32_RTCCLK * 7)
diff --git a/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c b/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
index dac05a706..45856cbe8 100644
--- a/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
+++ b/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
@@ -35,6 +35,10 @@
#define KR_KEY_WRITE 0x5555U
#define KR_KEY_PROTECT 0x0000U
+#if !defined(IWDG) && defined(IWDG1)
+#define IWDG IWDG1
+#endif
+
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/