aboutsummaryrefslogtreecommitdiffstats
path: root/demos/AVR/RT-TEENSY2-USB
diff options
context:
space:
mode:
Diffstat (limited to 'demos/AVR/RT-TEENSY2-USB')
-rw-r--r--demos/AVR/RT-TEENSY2-USB/chconf.h132
1 files changed, 112 insertions, 20 deletions
diff --git a/demos/AVR/RT-TEENSY2-USB/chconf.h b/demos/AVR/RT-TEENSY2-USB/chconf.h
index 176c9ca77..e86eda769 100644
--- a/demos/AVR/RT-TEENSY2-USB/chconf.h
+++ b/demos/AVR/RT-TEENSY2-USB/chconf.h
@@ -25,10 +25,10 @@
* @{
*/
-#ifndef CHCONF_H_
-#define CHCONF_H_
+#ifndef CHCONF_H
+#define CHCONF_H
-#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_5_0_
/*===========================================================================*/
@@ -52,6 +52,18 @@
#define CH_CFG_ST_FREQUENCY 1000
/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#define CH_CFG_INTERVALS_SIZE 16
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#define CH_CFG_TIME_TYPES_SIZE 16
+
+/**
* @brief Time delta constant for the tick-less mode.
* @note If this value is zero then the system uses the classic
* periodic tick. This value represents the minimum number
@@ -81,7 +93,7 @@
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
*/
-#define CH_CFG_TIME_QUANTUM 20
+#define CH_CFG_TIME_QUANTUM 0
/**
* @brief Managed RAM size.
@@ -94,7 +106,7 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
-#define CH_CFG_MEMCORE_SIZE 1536
+#define CH_CFG_MEMCORE_SIZE 128
/**
* @brief Idle thread automatic spawn suppression.
@@ -326,15 +338,15 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_MEMPOOLS TRUE
-
-/**
- * @brief Objects FIFOs APIs.
- * @details If enabled then the objects FIFOs APIs are included
- * in the kernel.
- *
- * @note The default is @p TRUE.
- */
+#define CH_CFG_USE_MEMPOOLS TRUE
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
#define CH_CFG_USE_OBJ_FIFOS FALSE
/**
@@ -352,6 +364,56 @@
/*===========================================================================*/
/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_CFG_USE_FACTORY FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
* @name Debug options
* @{
*/
@@ -394,12 +456,26 @@
/**
* @brief Debug option, trace buffer.
- * @details If enabled then the context switch circular trace buffer is
- * activated.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_ENABLE_TRACE CH_DBG_TRACE_MASK_DISABLED
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -444,6 +520,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK(tp) { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -452,9 +544,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p _thread_init() function.
+ * @details User initialization code added to the @p chThdInit() API.
*
- * @note It is invoked from within @p _thread_init() and implicitly from all
+ * @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
@@ -554,6 +646,6 @@
#define SHELL_CMD_TEST_ENABLED FALSE
-#endif /* CHCONF_H_ */
+#endif /* CHCONF_H */
/** @} */