aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include/ch.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-24 07:59:12 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-24 07:59:12 +0000
commitd447fd6ceeda74abded59704247d259e0f710fff (patch)
treef79ba4c58ef8675980151b15698a7ee937dac612 /os/rt/include/ch.h
parent972c282b7fc8b1458326616180d414c708ae3691 (diff)
downloadChibiOS-d447fd6ceeda74abded59704247d259e0f710fff.tar.gz
ChibiOS-d447fd6ceeda74abded59704247d259e0f710fff.tar.bz2
ChibiOS-d447fd6ceeda74abded59704247d259e0f710fff.zip
New hooks added to RT, stronger checks on RT chconf.h files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11071 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include/ch.h')
-rw-r--r--os/rt/include/ch.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/os/rt/include/ch.h b/os/rt/include/ch.h
index d3bd8217b..a81916522 100644
--- a/os/rt/include/ch.h
+++ b/os/rt/include/ch.h
@@ -66,19 +66,33 @@
#define CH_KERNEL_PATCH 0
/** @} */
-/* Configuration headers and checks.*/
-#include "chtypes.h"
-#include "chconf.h"
-
-#if !defined(_CHIBIOS_RT_CONF_)
-#error "invalid configuration file"
+/**
+ * @name Constants for configuration options
+ */
+/**
+ * @brief Generic 'false' preprocessor boolean constant.
+ * @note It is meant to be used in configuration files as switch.
+ */
+#if !defined(FALSE) || defined(__DOXYGEN__)
+#define FALSE 0
#endif
-#if !defined(_CHIBIOS_RT_CONF_VER_5_0_)
-#error "obsolete or unknown configuration file"
+/**
+ * @brief Generic 'true' preprocessor boolean constant.
+ * @note It is meant to be used in configuration files as switch.
+ */
+#if !defined(TRUE) || defined(__DOXYGEN__)
+#define TRUE 1
#endif
+/** @} */
+
+/* Configuration headers, checks and licensing restrictions.*/
+#include "chconf.h"
+#include "chchecks.h"
+#include "chlicense.h"
+#include "chrestrictions.h"
-/* Early function prototypes required by the following headers.*/
+/* Early function prototype required by the following headers.*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -87,9 +101,8 @@ extern "C" {
}
#endif
-/* Including everything else.*/
-#include "chlicense.h"
-#include "chchecks.h"
+/* Base kernel headers.*/
+#include "chtypes.h" /* TODO: Rename and rework.*/
#include "chsystypes.h"
#include "chdebug.h"
#include "chtime.h"
@@ -111,6 +124,8 @@ extern "C" {
#include "chcond.h"
#include "chevents.h"
#include "chmsg.h"
+
+/* OSLIB headers.*/
#include "chmboxes.h"
#include "chmemcore.h"
#include "chheap.h"