aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-18 16:40:15 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-18 16:40:15 +0000
commit814b642a0ced73a71ceb3b548c2c570e8631dd58 (patch)
treeb2fb649dca949d8781a2421ae9a52c58780448ca /os/kernel/include
parente394b3218a459c2dd323c7b1dcaf0c547d37ad8f (diff)
downloadChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.tar.gz
ChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.tar.bz2
ChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4112 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include')
-rw-r--r--os/kernel/include/ch.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/os/kernel/include/ch.h b/os/kernel/include/ch.h
index 7386b622b..3696f78b3 100644
--- a/os/kernel/include/ch.h
+++ b/os/kernel/include/ch.h
@@ -62,25 +62,43 @@
#define CH_KERNEL_PATCH 0
/** @} */
-/*
- * Common values.
+/**
+ * @name Common constants
+ */
+/**
+ * @brief Generic 'false' boolean constant.
*/
-#ifndef FALSE
+#if !defined(FALSE) || defined(__DOXYGEN__)
#define FALSE 0
#endif
-#ifndef TRUE
+
+/**
+ * @brief Generic 'true' boolean constant.
+ */
+#if !defined(TRUE) || defined(__DOXYGEN__)
#define TRUE (!FALSE)
#endif
-/*
- * Human readable boolean error conditions.
+/**
+ * @brief Generic success constant.
+ * @details This constant is functionally equivalent to @p FALSE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
*/
-#ifndef CH_SUCCESS
+#if !defined(CH_SUCCESS) || defined(__DOXYGEN__)
#define CH_SUCCESS FALSE
#endif
-#ifndef CH_FAILED
+
+/**
+ * @brief Generic failure constant.
+ * @details This constant is functionally equivalent to @p TRUE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
+ */
+#if !defined(CH_FAILED) || defined(__DOXYGEN__)
#define CH_FAILED TRUE
#endif
+/** @} */
#include "chconf.h"
#include "chtypes.h"