From 7e778da6b0ac408d377da7e539d095ca7e796c53 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 19 Mar 2014 10:19:48 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6791 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/various/chrtclib.c | 4 ++++ os/various/chrtclib.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/os/various/chrtclib.c b/os/various/chrtclib.c index 6fcb3de41..9d3f4eb0c 100644 --- a/os/various/chrtclib.c +++ b/os/various/chrtclib.c @@ -33,6 +33,8 @@ #include "chrtclib.h" +#if HAL_USE_RTC || defined(__DOXYGEN__) + #if (defined(STM32F4XX) || defined(STM32F2XX) || defined(STM32L1XX) || \ defined(STM32F30X) || defined(STM32F37X) || \ defined(STM32F1XX) || defined(STM32F10X_MD) || defined(STM32F10X_LD) || \ @@ -440,4 +442,6 @@ uint32_t rtcGetTimeFatFromCounter(RTCDriver *rtcp) { #endif /* STM32_RTC_IS_CALENDAR || LPC17xx_RTC_IS_CALENDAR */ #endif /* (defined(STM32F4XX) || defined(STM32F2XX) || defined(STM32L1XX) || defined(STM32F1XX)) */ +#endif /* HAL_USE_RTC */ + /** @} */ diff --git a/os/various/chrtclib.h b/os/various/chrtclib.h index 895abc1a7..daf53ec85 100644 --- a/os/various/chrtclib.h +++ b/os/various/chrtclib.h @@ -31,6 +31,8 @@ #include +#if HAL_USE_RTC || defined(__DOXYGEN__) + /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ @@ -50,6 +52,8 @@ extern "C" { } #endif +#endif /* HAL_USE_RTC */ + #endif /* CHRTCLIB_H_ */ /** @} */