diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-01-27 10:57:41 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-01-27 10:57:41 +0000 |
commit | bb3dee47edaa6d226391410b696c14cf63e2c745 (patch) | |
tree | 4f50f5da035676eb441511fa8b40de8ef2be9c81 /os | |
parent | 9d9cbba7a6550075f2fc3c0a1b85d9dc64655458 (diff) | |
download | ChibiOS-bb3dee47edaa6d226391410b696c14cf63e2c745.tar.gz ChibiOS-bb3dee47edaa6d226391410b696c14cf63e2c745.tar.bz2 ChibiOS-bb3dee47edaa6d226391410b696c14cf63e2c745.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6647 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/nil/ports/ARMCMx/nilcore.h | 4 | ||||
-rw-r--r-- | os/nil/templates/nilcore.h | 16 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/chcore.h | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/os/nil/ports/ARMCMx/nilcore.h b/os/nil/ports/ARMCMx/nilcore.h index b7f60d1ff..9d9c643b4 100644 --- a/os/nil/ports/ARMCMx/nilcore.h +++ b/os/nil/ports/ARMCMx/nilcore.h @@ -221,13 +221,15 @@ struct port_intctx {}; #endif
#if !defined(_FROM_ASM_)
+
#if NIL_CFG_ST_TIMEDELTA > 0
#if !PORT_USE_ALT_TIMER
#include "nilcore_timer.h"
#else /* PORT_USE_ALT_TIMER */
#include "nilcore_timer_alt.h"
#endif /* PORT_USE_ALT_TIMER */
-#endif
+#endif /* NIL_CFG_ST_TIMEDELTA > 0 */
+
#endif /* !defined(_FROM_ASM_) */
#endif /* _NILCORE_H_ */
diff --git a/os/nil/templates/nilcore.h b/os/nil/templates/nilcore.h index 82f46d342..c49b425e1 100644 --- a/os/nil/templates/nilcore.h +++ b/os/nil/templates/nilcore.h @@ -96,6 +96,16 @@ #define PORT_INT_REQUIRED_STACK 32
#endif
+/**
+ * @brief Enables an alternative timer implementation.
+ * @details Usually the port uses a timer interface defined in the file
+ * @p nilcore_timer.h, if this option is enabled then the file
+ * @p nilcore_timer_alt.h is included instead.
+ */
+#if !defined(PORT_USE_ALT_TIMER)
+#define PORT_USE_ALT_TIMER FALSE
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
@@ -352,8 +362,12 @@ static inline rtcnt_t port_rt_get_counter_value(void) { #if !defined(_FROM_ASM_)
#if NIL_CFG_ST_TIMEDELTA > 0
+#if !PORT_USE_ALT_TIMER
#include "nilcore_timer.h"
-#endif
+#else /* PORT_USE_ALT_TIMER */
+#include "nilcore_timer_alt.h"
+#endif /* PORT_USE_ALT_TIMER */
+#endif /* NIL_CFG_ST_TIMEDELTA > 0 */
#endif /* !defined(_FROM_ASM_) */
diff --git a/os/rt/ports/ARMCMx/chcore.h b/os/rt/ports/ARMCMx/chcore.h index 1ad0026d9..ca6ae60e7 100644 --- a/os/rt/ports/ARMCMx/chcore.h +++ b/os/rt/ports/ARMCMx/chcore.h @@ -231,6 +231,7 @@ struct context { #endif
#if !defined(_FROM_ASM_)
+
#if CH_CFG_ST_TIMEDELTA > 0
#if !PORT_USE_ALT_TIMER
#include "chcore_timer.h"
@@ -238,6 +239,7 @@ struct context { #include "chcore_timer_alt.h"
#endif /* PORT_USE_ALT_TIMER */
#endif /* CH_CFG_ST_TIMEDELTA > 0 */
+
#endif /* !defined(_FROM_ASM_) */
#endif /* _CHCORE_H_ */
|