* @{\r
*/\r
\r
-#ifndef _CHCONF_H_\r
-#define _CHCONF_H_\r
+#ifndef CHCONF_H\r
+#define CHCONF_H\r
+\r
+#define _CHIBIOS_RT_CONF_\r
\r
/*===========================================================================*/\r
/**\r
*/\r
#define CH_CFG_NO_IDLE_THREAD FALSE\r
\r
+/* Use __WFI in the idle thread for waiting. Does lower the power\r
+ * consumption. */\r
+#define CORTEX_ENABLE_WFI_IDLE TRUE\r
+\r
/** @} */\r
\r
/*===========================================================================*/\r
* requirements.\r
* @note Requires @p CH_CFG_USE_SEMAPHORES.\r
*/\r
-#define CH_CFG_USE_SEMAPHORES_PRIORITY TRUE\r
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE\r
\r
/**\r
* @brief Mutexes APIs.\r
*/\r
#define CH_CFG_USE_MAILBOXES TRUE\r
\r
-/**\r
- * @brief I/O Queues APIs.\r
- * @details If enabled then the I/O queues APIs are included in the kernel.\r
- *\r
- * @note The default is @p TRUE.\r
- */\r
-#define CH_CFG_USE_QUEUES TRUE\r
-\r
/**\r
* @brief Core Memory Manager APIs.\r
* @details If enabled then the core memory manager APIs are included\r
\r
/**\r
* @brief Debug option, trace buffer.\r
- * @details If enabled then the context switch circular trace buffer is\r
- * activated.\r
+ * @details If enabled then the trace buffer is activated.\r
*\r
- * @note The default is @p FALSE.\r
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.\r
+ */\r
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED\r
+\r
+/**\r
+ * @brief Trace buffer entries.\r
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is\r
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.\r
*/\r
-#define CH_DBG_ENABLE_TRACE TRUE\r
+#define CH_DBG_TRACE_BUFFER_SIZE 128\r
\r
/**\r
* @brief Debug option, stack checks.\r
/**\r
* @brief Threads finalization hook.\r
* @details User finalization code added to the @p chThdExit() API.\r
- *\r
- * @note It is inserted into lock zone.\r
- * @note It is also invoked when the threads simply return in order to\r
- * terminate.\r
*/\r
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \\r
/* Add threads finalization code here.*/ \\r
/* Context switch code here.*/ \\r
}\r
\r
+/**\r
+ * @brief ISR enter hook.\r
+ */\r
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \\r
+ /* IRQ prologue code here.*/ \\r
+}\r
+\r
+/**\r
+ * @brief ISR exit hook.\r
+ */\r
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \\r
+ /* IRQ epilogue code here.*/ \\r
+}\r
+\r
/**\r
* @brief Idle thread enter hook.\r
* @note This hook is invoked within a critical zone, no OS functions\r
* @note This macro can be used to activate a power saving mode.\r
*/\r
#define CH_CFG_IDLE_ENTER_HOOK() { \\r
+ /* Idle-enter code here.*/ \\r
}\r
\r
/**\r
* @note This macro can be used to deactivate a power saving mode.\r
*/\r
#define CH_CFG_IDLE_LEAVE_HOOK() { \\r
+ /* Idle-leave code here.*/ \\r
}\r
\r
/**\r
/* System halt code here.*/ \\r
}\r
\r
+/**\r
+ * @brief Trace hook.\r
+ * @details This hook is invoked each time a new record is written in the\r
+ * trace buffer.\r
+ */\r
+#define CH_CFG_TRACE_HOOK(tep) { \\r
+ /* Trace code here.*/ \\r
+}\r
+\r
/** @} */\r
\r
/*===========================================================================*/\r
/* Port-specific settings (override port settings defaulted in chcore.h). */\r
/*===========================================================================*/\r
\r
-#endif /* _CHCONF_H_ */\r
+#endif /* CHCONF_H */\r
\r
/** @} */\r