From b7985b957d0c259e9869763199c5cbf8ae9f4709 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 9 Mar 2015 10:48:08 +0000 Subject: MISRA pass on low level device drivers templates. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7739 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/rtc_lld.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'os/hal/templates/rtc_lld.h') diff --git a/os/hal/templates/rtc_lld.h b/os/hal/templates/rtc_lld.h index 397aeb5af..3a52022e9 100644 --- a/os/hal/templates/rtc_lld.h +++ b/os/hal/templates/rtc_lld.h @@ -29,7 +29,7 @@ #ifndef _RTC_LLD_H_ #define _RTC_LLD_H_ -#if HAL_USE_RTC || defined(__DOXYGEN__) +#if (HAL_USE_RTC == TRUE) || defined(__DOXYGEN__) /*===========================================================================*/ /* Driver constants. */ @@ -62,6 +62,14 @@ * @name PLATFORM configuration options * @{ */ +/** + * @brief RTCD1 driver enable switch. + * @details If set to @p TRUE the support for RTC1 is included. + * @note The default is @p FALSE. + */ +#if !defined(PLATFORM_RTC_USE_RTC1) || defined(__DOXYGEN__) +#define PLATFORM_RTC_USE_RTC1 FALSE +#endif /** @} */ /*===========================================================================*/ @@ -120,7 +128,7 @@ struct RTCDriverVMT { * @brief Structure representing an RTC driver. */ struct RTCDriver { -#if RTC_HAS_STORAGE || defined(__DOXYGEN__) +#if (RTC_HAS_STORAGE == TRUE) || defined(__DOXYGEN__) /** * @brief Virtual Methods Table. */ @@ -138,11 +146,12 @@ struct RTCDriver { /* External declarations. */ /*===========================================================================*/ -#if !defined(__DOXYGEN__) +#if (PLATFORM_RTC_USE_RTC1 == TRUE) && !defined(__DOXYGEN__) extern RTCDriver RTCD1; -#if RTC_HAS_STORAGE -extern struct RTCDriverVMT _rtc_lld_vmt; #endif + +#if (RTC_HAS_STORAGE == TRUE) && !defined(__DOXYGEN__) +extern struct RTCDriverVMT _rtc_lld_vmt; #endif #ifdef __cplusplus @@ -166,7 +175,7 @@ extern "C" { } #endif -#endif /* HAL_USE_RTC */ +#endif /* HAL_USE_RTC == TRUE */ #endif /* _RTC_LLD_H_ */ -- cgit v1.2.3