aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx/EICU/chconf.h
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2016-03-15 10:19:56 +0300
committerbarthess <barthess@yandex.ru>2016-03-15 10:19:56 +0300
commit04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c (patch)
tree0ca05f1814b8202dc6eacbac28d60369437e4584 /testhal/STM32/STM32F4xx/EICU/chconf.h
parent37ac6a4611ca3625343ef1a17943e66459f825af (diff)
downloadChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.tar.gz
ChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.tar.bz2
ChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.zip
Updated some testhal projects to new ChibiOS code
Diffstat (limited to 'testhal/STM32/STM32F4xx/EICU/chconf.h')
-rw-r--r--testhal/STM32/STM32F4xx/EICU/chconf.h85
1 files changed, 58 insertions, 27 deletions
diff --git a/testhal/STM32/STM32F4xx/EICU/chconf.h b/testhal/STM32/STM32F4xx/EICU/chconf.h
index c8a8f19..a554d39 100644
--- a/testhal/STM32/STM32F4xx/EICU/chconf.h
+++ b/testhal/STM32/STM32F4xx/EICU/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,6 +28,8 @@
#ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -46,7 +48,7 @@
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
-#define CH_CFG_ST_FREQUENCY 100000
+#define CH_CFG_ST_FREQUENCY 10000
/**
* @brief Time delta constant for the tick-less mode.
@@ -99,7 +101,8 @@
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread. The application @p main()
* function becomes the idle thread and must implement an
- * infinite loop. */
+ * infinite loop.
+ */
#define CH_CFG_NO_IDLE_THREAD FALSE
/** @} */
@@ -137,7 +140,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_TM false
+#define CH_CFG_USE_TM TRUE
/**
* @brief Threads registry APIs.
@@ -162,7 +165,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_SEMAPHORES FALSE
+#define CH_CFG_USE_SEMAPHORES TRUE
/**
* @brief Semaphores queuing mode.
@@ -181,7 +184,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_MUTEXES FALSE
+#define CH_CFG_USE_MUTEXES TRUE
/**
* @brief Enables recursive behavior on mutexes.
@@ -201,7 +204,7 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
-#define CH_CFG_USE_CONDVARS FALSE
+#define CH_CFG_USE_CONDVARS TRUE
/**
* @brief Conditional Variables APIs with timeout.
@@ -211,7 +214,7 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
-#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
/**
* @brief Events Flags APIs.
@@ -219,7 +222,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_EVENTS FALSE
+#define CH_CFG_USE_EVENTS TRUE
/**
* @brief Events Flags APIs with timeout.
@@ -229,7 +232,7 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
-#define CH_CFG_USE_EVENTS_TIMEOUT FALSE
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
/**
* @brief Synchronous Messages APIs.
@@ -238,7 +241,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_MESSAGES FALSE
+#define CH_CFG_USE_MESSAGES TRUE
/**
* @brief Synchronous Messages queuing mode.
@@ -259,7 +262,7 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
-#define CH_CFG_USE_MAILBOXES FALSE
+#define CH_CFG_USE_MAILBOXES TRUE
/**
* @brief I/O Queues APIs.
@@ -267,7 +270,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_QUEUES FALSE
+#define CH_CFG_USE_QUEUES TRUE
/**
* @brief Core Memory Manager APIs.
@@ -276,7 +279,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_MEMCORE FALSE
+#define CH_CFG_USE_MEMCORE TRUE
/**
* @brief Heap Allocator APIs.
@@ -288,7 +291,7 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
-#define CH_CFG_USE_HEAP FALSE
+#define CH_CFG_USE_HEAP TRUE
/**
* @brief Memory Pools Allocator APIs.
@@ -297,7 +300,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_MEMPOOLS FALSE
+#define CH_CFG_USE_MEMPOOLS TRUE
/**
* @brief Dynamic Threads APIs.
@@ -308,7 +311,7 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
-#define CH_CFG_USE_DYNAMIC FALSE
+#define CH_CFG_USE_DYNAMIC TRUE
/** @} */
@@ -359,9 +362,16 @@
* @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE
+
+/**
+ * @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_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -383,7 +393,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_FILL_THREADS TRUE
+#define CH_DBG_FILL_THREADS FALSE
/**
* @brief Debug option, threads profiling.
@@ -426,10 +436,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.*/ \
@@ -440,7 +446,21 @@
* @details This hook is invoked just before switching between threads.
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
- /* System halt code here.*/ \
+ /* Context switch code here.*/ \
+}
+
+/**
+ * @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.*/ \
}
/**
@@ -449,7 +469,8 @@
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
-#define CH_CFG_IDLE_ENTER_HOOK() { \
+#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -458,7 +479,8 @@
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
-#define CH_CFG_IDLE_LEAVE_HOOK() { \
+#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -487,6 +509,15 @@
/* 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.*/ \
+}
+
/** @} */
/*===========================================================================*/