aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/include/rtc.h4
-rw-r--r--os/hal/platforms/STM32/rtc_lld.c2
-rw-r--r--os/hal/platforms/STM32/rtc_lld.h9
3 files changed, 4 insertions, 11 deletions
diff --git a/os/hal/include/rtc.h b/os/hal/include/rtc.h
index ad66fcd8b..0c545c3a6 100644
--- a/os/hal/include/rtc.h
+++ b/os/hal/include/rtc.h
@@ -73,8 +73,8 @@ extern "C" {
void rtcStart(RTCDriver *rtcp, const RTCConfig *rtccfgp);
void rtcStop(void);
#else /* RTC_SUPPORTS_CALLBACKS */
- #define rtcStart(rtcp, rtccfgp){;}
- #define rtcStop(){;}
+ #define rtcStart(rtcp, rtccfgp)
+ #define rtcStop()
#endif /* RTC_SUPPORTS_CALLBACKS */
void rtcSetTime(uint32_t tv_sec);
diff --git a/os/hal/platforms/STM32/rtc_lld.c b/os/hal/platforms/STM32/rtc_lld.c
index 3f8468bae..ba89a3c9e 100644
--- a/os/hal/platforms/STM32/rtc_lld.c
+++ b/os/hal/platforms/STM32/rtc_lld.c
@@ -163,7 +163,6 @@ void rtc_lld_init(void){
* @param[in] rtcp pointer to a @p RTCDriver object
* @param[in] rtccfgp pointer to a @p RTCDriver config object
*/
-#if RTC_SUPPORTS_CALLBACKS
void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp){
uint16_t isr_flags = 0;
@@ -192,7 +191,6 @@ void rtc_lld_stop(void){
NVICDisableVector(RTC_IRQn);
RTC->CRH = 0;
}
-#endif /* RTC_SUPPORTS_CALLBACKS */
/**
diff --git a/os/hal/platforms/STM32/rtc_lld.h b/os/hal/platforms/STM32/rtc_lld.h
index a0490b29a..3b4f69665 100644
--- a/os/hal/platforms/STM32/rtc_lld.h
+++ b/os/hal/platforms/STM32/rtc_lld.h
@@ -112,13 +112,8 @@ extern RTCDriver RTCD;
extern "C" {
#endif
void rtc_lld_init(void);
- #if RTC_SUPPORTS_CALLBACKS
- void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp);
- void rtc_lld_stop(void);
- #else /* RTC_SUPPORTS_CALLBACKS */
- #define rtc_lld_start(rtcp, rtccfgp){;}
- #define rtc_lld_stop(){;}
- #endif /* RTC_SUPPORTS_CALLBACKS */
+ void rtc_lld_start(RTCDriver *rtcp, const RTCConfig *rtccfgp);
+ void rtc_lld_stop(void);
void rtc_lld_set_time(uint32_t tv_sec);
uint32_t rtc_lld_get_sec(void);
uint16_t rtc_lld_get_msec(void);