From d447fd6ceeda74abded59704247d259e0f710fff Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 24 Nov 2017 07:59:12 +0000 Subject: 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 --- os/rt/include/ch.h | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'os/rt/include/ch.h') 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" -- cgit v1.2.3