aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/templates
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-01-27 10:57:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-01-27 10:57:41 +0000
commitbb3dee47edaa6d226391410b696c14cf63e2c745 (patch)
tree4f50f5da035676eb441511fa8b40de8ef2be9c81 /os/nil/templates
parent9d9cbba7a6550075f2fc3c0a1b85d9dc64655458 (diff)
downloadChibiOS-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/nil/templates')
-rw-r--r--os/nil/templates/nilcore.h16
1 files changed, 15 insertions, 1 deletions
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_) */