From 6c18028a35db35c45c8c342d43abd74b13ef1605 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 4 Nov 2017 19:23:04 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10946 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/include/ch.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) (limited to 'os/nil/include') diff --git a/os/nil/include/ch.h b/os/nil/include/ch.h index f413585af..b55133b9c 100644 --- a/os/nil/include/ch.h +++ b/os/nil/include/ch.h @@ -263,6 +263,60 @@ #if !defined(CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) #define CH_CFG_USE_MEMPOOLS TRUE #endif +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) || defined(__DOXYGEN__) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif /*-* * @brief Debug option, kernel statistics. @@ -414,6 +468,10 @@ #error "missing or wrong configuration file" #endif +#if !defined(_CHIBIOS_NIL_CONF_VER_3_0_) +#error "obsolete or unknown configuration file" +#endif + #if CH_CFG_NUM_THREADS < 1 #error "at least one thread must be defined" #endif @@ -1501,8 +1559,10 @@ extern "C" { /* Optional subsystems.*/ #include "chmboxes.h" #include "chmemcore.h" -#include "chmempools.h" #include "chheap.h" +#include "chmempools.h" +#include "chfifo.h" +#include "chfactory.h" #endif /* CH_H */ -- cgit v1.2.3