aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-02-05 15:08:12 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-02-05 15:08:12 +0000
commit5995950eb617d50beb043576eccf6f112bce188e (patch)
treed04e51caba669f3af46b84743d05882d42a77349 /os/hal/templates
parent1474f60da3ac5bf5bc04eddfea7e3d41b1932658 (diff)
downloadChibiOS-5995950eb617d50beb043576eccf6f112bce188e.tar.gz
ChibiOS-5995950eb617d50beb043576eccf6f112bce188e.tar.bz2
ChibiOS-5995950eb617d50beb043576eccf6f112bce188e.zip
MISRA-related fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10085 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/hal_i2s_lld.c4
-rw-r--r--os/hal/templates/hal_qspi_lld.c4
-rw-r--r--os/hal/templates/hal_qspi_lld.h8
-rw-r--r--os/hal/templates/hal_rtc_lld.c6
-rw-r--r--os/hal/templates/hal_wdg_lld.c4
5 files changed, 15 insertions, 11 deletions
diff --git a/os/hal/templates/hal_i2s_lld.c b/os/hal/templates/hal_i2s_lld.c
index 7424a663a..0321d6464 100644
--- a/os/hal/templates/hal_i2s_lld.c
+++ b/os/hal/templates/hal_i2s_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_I2S || defined(__DOXYGEN__)
+#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -35,7 +35,7 @@
/*===========================================================================*/
/** @brief I2S2 driver identifier.*/
-#if PLATFORM_I2S_USE_I2S1 || defined(__DOXYGEN__)
+#if (PLATFORM_I2S_USE_I2S1 == TRUE) || defined(__DOXYGEN__)
I2SDriver I2SD1;
#endif
diff --git a/os/hal/templates/hal_qspi_lld.c b/os/hal/templates/hal_qspi_lld.c
index d380b6c20..6ba358168 100644
--- a/os/hal/templates/hal_qspi_lld.c
+++ b/os/hal/templates/hal_qspi_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_QSPI || defined(__DOXYGEN__)
+#if (HAL_USE_QSPI == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -35,7 +35,7 @@
/*===========================================================================*/
/** @brief QSPID1 driver identifier.*/
-#if PLATFORM_QSPI_USE_QSPI1 || defined(__DOXYGEN__)
+#if (PLATFORM_QSPI_USE_QSPI1 == TRUE) || defined(__DOXYGEN__)
QSPIDriver QSPID1;
#endif
diff --git a/os/hal/templates/hal_qspi_lld.h b/os/hal/templates/hal_qspi_lld.h
index 18e07f9e6..b36b228c1 100644
--- a/os/hal/templates/hal_qspi_lld.h
+++ b/os/hal/templates/hal_qspi_lld.h
@@ -25,7 +25,7 @@
#ifndef HAL_QSPI_LLD_H
#define HAL_QSPI_LLD_H
-#if HAL_USE_QSPI || defined(__DOXYGEN__)
+#if (HAL_USE_QSPI == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
@@ -100,13 +100,13 @@ struct QSPIDriver {
* @brief Current configuration data.
*/
const QSPIConfig *config;
-#if QSPI_USE_WAIT || defined(__DOXYGEN__)
+#if (QSPI_USE_WAIT == TRUE) || defined(__DOXYGEN__)
/**
* @brief Waiting thread.
*/
thread_reference_t thread;
#endif /* QSPI_USE_WAIT */
-#if QSPI_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__)
+#if (QSPI_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__)
/**
* @brief Mutex protecting the peripheral.
*/
@@ -126,7 +126,7 @@ struct QSPIDriver {
/* External declarations. */
/*===========================================================================*/
-#if PLATFORM_QSPI_USE_QSPI1 && !defined(__DOXYGEN__)
+#if (PLATFORM_QSPI_USE_QSPI1 == TRUE) && !defined(__DOXYGEN__)
extern QSPIDriver QSPID1;
#endif
diff --git a/os/hal/templates/hal_rtc_lld.c b/os/hal/templates/hal_rtc_lld.c
index d32ac5df4..007172df6 100644
--- a/os/hal/templates/hal_rtc_lld.c
+++ b/os/hal/templates/hal_rtc_lld.c
@@ -28,7 +28,7 @@
#include "hal.h"
-#if HAL_USE_RTC || defined(__DOXYGEN__)
+#if (HAL_USE_RTC == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -41,7 +41,9 @@
/**
* @brief RTC driver identifier.
*/
+#if (PLATFORM_RTC_USE_RTC1 == TRUE) && !defined(__DOXYGEN__)
RTCDriver RTCD1;
+#endif
/*===========================================================================*/
/* Driver local variables and types. */
@@ -67,7 +69,9 @@ RTCDriver RTCD1;
void rtc_lld_init(void) {
/* RTC object initialization.*/
+#if PLATFORM_RTC_USE_RTC1 == TRUE
rtcObjectInit(&RTCD1);
+#endif
}
/**
diff --git a/os/hal/templates/hal_wdg_lld.c b/os/hal/templates/hal_wdg_lld.c
index b446a30d5..b24213381 100644
--- a/os/hal/templates/hal_wdg_lld.c
+++ b/os/hal/templates/hal_wdg_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_WDG || defined(__DOXYGEN__)
+#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -34,7 +34,7 @@
/* Driver exported variables. */
/*===========================================================================*/
-#if PLATFORM_WDG_USE_WDG1 || defined(__DOXYGEN__)
+#if (PLATFORM_WDG_USE_WDG1 == TRUE) || defined(__DOXYGEN__)
WDGDriver WDGD1;
#endif