aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-04 19:23:04 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-04 19:23:04 +0000
commit6c18028a35db35c45c8c342d43abd74b13ef1605 (patch)
tree3593608d310f95a350ff3de0160c50b46a0e1412 /os/nil
parentec1b4e72512e7e958a4168444a56182736218bff (diff)
downloadChibiOS-6c18028a35db35c45c8c342d43abd74b13ef1605.tar.gz
ChibiOS-6c18028a35db35c45c8c342d43abd74b13ef1605.tar.bz2
ChibiOS-6c18028a35db35c45c8c342d43abd74b13ef1605.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10946 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil')
-rw-r--r--os/nil/include/ch.h62
-rw-r--r--os/nil/nil.mk12
2 files changed, 69 insertions, 5 deletions
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 */
diff --git a/os/nil/nil.mk b/os/nil/nil.mk
index f0717ba68..800b702c8 100644
--- a/os/nil/nil.mk
+++ b/os/nil/nil.mk
@@ -15,12 +15,16 @@ endif
ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmempools.c
endif
+ifneq ($(findstring CH_CFG_USE_FACTORY TRUE,$(CHCONF)),)
+KERNSRC += $(CHIBIOS)/os/common/oslib/src/chfactory.c
+endif
else
KERNSRC := ${CHIBIOS}/os/nil/src/ch.c \
- ${CHIBIOS}/os/common/oslib/src/chmboxes.c \
- ${CHIBIOS}/os/common/oslib/src/chmemcore.c \
- ${CHIBIOS}/os/common/oslib/src/chmempools.c \
- ${CHIBIOS}/os/common/oslib/src/chheap.c
+ $(CHIBIOS)/os/common/oslib/src/chmboxes.c \
+ $(CHIBIOS)/os/common/oslib/src/chmemcore.c \
+ $(CHIBIOS)/os/common/oslib/src/chheap.c \
+ $(CHIBIOS)/os/common/oslib/src/chmempools.c \
+ $(CHIBIOS)/os/common/oslib/src/chfactory.c
endif
# Required include directories