From ca3cc2d5554a99aad1c499fabb9ce3d72fd7aacb Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 1 Sep 2011 17:44:44 +0000 Subject: RTC. Readability improvements. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3278 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/rtc.h | 4 ++-- os/hal/platforms/STM32/rtc_lld.c | 2 -- os/hal/platforms/STM32/rtc_lld.h | 9 ++------- 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); -- cgit v1.2.3