aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/NRF51/NRF51822/RNG/chconf.h
diff options
context:
space:
mode:
authorStephane D'Alu <sdalu@sdalu.com>2016-07-07 23:17:36 +0200
committerStephane D'Alu <sdalu@sdalu.com>2016-07-07 23:17:36 +0200
commit022cad04527a776e4b60a8211206a0ed2d402fcb (patch)
tree0a3626bbfcf9cc09e146b6f8d392a47e2ffd2efc /testhal/NRF51/NRF51822/RNG/chconf.h
parentc7f7b70596d200afb76c3c8a24d4ddaaa61a2f1e (diff)
downloadChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.tar.gz
ChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.tar.bz2
ChibiOS-Contrib-022cad04527a776e4b60a8211206a0ed2d402fcb.zip
code cleanup, fixed testhal
Diffstat (limited to 'testhal/NRF51/NRF51822/RNG/chconf.h')
-rw-r--r--testhal/NRF51/NRF51822/RNG/chconf.h59
1 files changed, 40 insertions, 19 deletions
diff --git a/testhal/NRF51/NRF51822/RNG/chconf.h b/testhal/NRF51/NRF51822/RNG/chconf.h
index 20d7b4b..c0af32b 100644
--- a/testhal/NRF51/NRF51822/RNG/chconf.h
+++ b/testhal/NRF51/NRF51822/RNG/chconf.h
@@ -25,8 +25,10 @@
* @{
*/
-#ifndef _CHCONF_H_
-#define _CHCONF_H_
+#ifndef CHCONF_H
+#define CHCONF_H
+
+#define _CHIBIOS_RT_CONF_
/*===========================================================================*/
/**
@@ -263,14 +265,6 @@
#define CH_CFG_USE_MAILBOXES TRUE
/**
- * @brief I/O Queues APIs.
- * @details If enabled then the I/O queues APIs are included in the kernel.
- *
- * @note The default is @p TRUE.
- */
-#define CH_CFG_USE_QUEUES TRUE
-
-/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
@@ -357,12 +351,18 @@
/**
* @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 FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL
+
+/**
+ * @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_ENABLE_TRACE TRUE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -427,10 +427,6 @@
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -445,12 +441,27 @@
}
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -460,6 +471,7 @@
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -488,12 +500,21 @@
/* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
-#endif /* _CHCONF_H_ */
+#endif /* CHCONF_H */
/** @} */