aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/oslib/include/chfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/oslib/include/chfactory.h')
-rw-r--r--os/common/oslib/include/chfactory.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/os/common/oslib/include/chfactory.h b/os/common/oslib/include/chfactory.h
index a2f27c626..1843d6a36 100644
--- a/os/common/oslib/include/chfactory.h
+++ b/os/common/oslib/include/chfactory.h
@@ -90,8 +90,30 @@
/* Derived constants and error checks. */
/*===========================================================================*/
+#if (CH_CFG_FACTORY_SEMAPHORES == TRUE) && (CH_CFG_USE_SEMAPHORES == FALSE)
+/*lint -save -e767 [20.5] Valid because the #undef.*/
+#undef CH_CFG_FACTORY_SEMAPHORES
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+/*lint restore*/
+#endif
+
+#if (CH_CFG_FACTORY_MAILBOXES == TRUE) && (CH_CFG_USE_MAILBOXES == FALSE)
+/*lint -save -e767 [20.5] Valid because the #undef.*/
+#undef CH_CFG_FACTORY_MAILBOXES
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+/*lint restore*/
+#endif
+
+#if (CH_CFG_FACTORY_OBJ_FIFOS == TRUE) && (CH_CFG_USE_OBJ_FIFOS == FALSE)
+/*lint -save -e767 [20.5] Valid because the #undef.*/
+#undef CH_CFG_FACTORY_OBJ_FIFOS
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+/*lint restore*/
+#endif
+
#define CH_FACTORY_REQUIRES_POOLS \
- ((CH_CFG_FACTORY_SEMAPHORES == TRUE))
+ ((CH_CFG_FACTORY_OBJECTS_REGISTRY == TRUE) || \
+ (CH_CFG_FACTORY_SEMAPHORES == TRUE))
#define CH_FACTORY_REQUIRES_HEAP \
((CH_CFG_FACTORY_GENERIC_BUFFERS == TRUE) || \
@@ -119,18 +141,6 @@
#error "CH_CFG_USE_HEAP is required"
#endif
-#if (CH_CFG_FACTORY_SEMAPHORES == TRUE) && (CH_CFG_USE_SEMAPHORES == FALSE)
-#error "CH_CFG_FACTORY_SEMAPHORES requires CH_CFG_USE_SEMAPHORES"
-#endif
-
-#if (CH_CFG_FACTORY_MAILBOXES == TRUE) && (CH_CFG_USE_MAILBOXES == FALSE)
-#error "CH_CFG_FACTORY_MAILBOXES requires CH_CFG_USE_MAILBOXES"
-#endif
-
-#if (CH_CFG_FACTORY_OBJ_FIFOS == TRUE) && (CH_CFG_USE_OBJ_FIFOS == FALSE)
-#error "CH_CFG_FACTORY_OBJ_FIFOS requires CH_CFG_USE_OBJ_FIFOS"
-#endif
-
/*===========================================================================*/
/* Module data structures and types. */
/*===========================================================================*/