aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/rtc_lld.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-09 10:48:08 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-09 10:48:08 +0000
commitb7985b957d0c259e9869763199c5cbf8ae9f4709 (patch)
treecb1cff3966c06b52cbba51cceb4b659dd9f25562 /os/hal/templates/rtc_lld.h
parentce7f7103df5f634f7b57d90e115c5824adcb68a0 (diff)
downloadChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.tar.gz
ChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.tar.bz2
ChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.zip
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
Diffstat (limited to 'os/hal/templates/rtc_lld.h')
-rw-r--r--os/hal/templates/rtc_lld.h21
1 files changed, 15 insertions, 6 deletions
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_ */