diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-08 21:19:58 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-08 21:19:58 +0000 |
commit | ce7f7103df5f634f7b57d90e115c5824adcb68a0 (patch) | |
tree | 48064ba690d7002bb8fc7b78f3f9dd76729b785c /os/hal/include/icu.h | |
parent | 63bf265ddf9ad40ad981c5a145c601972b91426e (diff) | |
download | ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.tar.gz ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.tar.bz2 ChibiOS-ce7f7103df5f634f7b57d90e115c5824adcb68a0.zip |
MISRA fixes for high level HAL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7738 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/icu.h')
-rw-r--r-- | os/hal/include/icu.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/os/hal/include/icu.h b/os/hal/include/icu.h index ad2f13a10..fc0b29e50 100644 --- a/os/hal/include/icu.h +++ b/os/hal/include/icu.h @@ -28,7 +28,7 @@ #ifndef _ICU_H_
#define _ICU_H_
-#if HAL_USE_ICU || defined(__DOXYGEN__)
+#if (HAL_USE_ICU == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
@@ -54,7 +54,7 @@ typedef enum { ICU_STOP = 1, /**< Stopped. */
ICU_READY = 2, /**< Ready. */
ICU_WAITING = 3, /**< Waiting for first front. */
- ICU_ACTIVE = 4, /**< First front detected. */
+ ICU_ACTIVE = 4 /**< First front detected. */
} icustate_t;
/**
@@ -88,8 +88,8 @@ typedef void (*icucallback_t)(ICUDriver *icup); */
#define icuStartCaptureI(icup) do { \
icu_lld_start_capture(icup); \
- icup->state = ICU_WAITING; \
-} while (0)
+ (icup)->state = ICU_WAITING; \
+} while (false)
/**
* @brief Stops the input capture.
@@ -100,8 +100,8 @@ typedef void (*icucallback_t)(ICUDriver *icup); */
#define icuStopCaptureI(icup) do { \
icu_lld_stop_capture(icup); \
- icup->state = ICU_READY; \
-} while (0)
+ (icup)->state = ICU_READY; \
+} while (false)
/**
* @brief Enables notifications.
@@ -234,7 +234,7 @@ extern "C" { }
#endif
-#endif /* HAL_USE_ICU */
+#endif /* HAL_USE_ICU == TRUE */
#endif /* _ICU_H_ */
|