diff options
Diffstat (limited to 'os/rt/include/chheap.h')
-rw-r--r-- | os/rt/include/chheap.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/os/rt/include/chheap.h b/os/rt/include/chheap.h index e8baae9a7..b041646b5 100644 --- a/os/rt/include/chheap.h +++ b/os/rt/include/chheap.h @@ -28,7 +28,7 @@ #ifndef _CHHEAP_H_
#define _CHHEAP_H_
-#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
+#if (CH_CFG_USE_HEAP == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -42,11 +42,11 @@ /* Derived constants and error checks. */
/*===========================================================================*/
-#if !CH_CFG_USE_MEMCORE
+#if CH_CFG_USE_MEMCORE == FALSE
#error "CH_CFG_USE_HEAP requires CH_CFG_USE_MEMCORE"
#endif
-#if !CH_CFG_USE_MUTEXES && !CH_CFG_USE_SEMAPHORES
+#if (CH_CFG_USE_MUTEXES == FALSE) && (CH_CFG_USE_SEMAPHORES == FALSE)
#error "CH_CFG_USE_HEAP requires CH_CFG_USE_MUTEXES and/or CH_CFG_USE_SEMAPHORES"
#endif
@@ -80,7 +80,7 @@ struct memory_heap { memgetfunc_t h_provider; /**< @brief Memory blocks provider for
this heap. */
union heap_header h_free; /**< @brief Free blocks list header. */
-#if CH_CFG_USE_MUTEXES
+#if CH_CFG_USE_MUTEXES == TRUE
mutex_t h_mtx; /**< @brief Heap access mutex. */
#else
semaphore_t h_sem; /**< @brief Heap access semaphore. */
@@ -111,7 +111,7 @@ extern "C" { /* Module inline functions. */
/*===========================================================================*/
-#endif /* CH_CFG_USE_HEAP */
+#endif /* CH_CFG_USE_HEAP == TRUE */
#endif /* _CHHEAP_H_ */
|