+/*
+ * Sanity check for config parameters required by this module.
+ */
+#if !defined(CONFIG_KERNEL) || ((CONFIG_KERNEL != 0) && CONFIG_KERNEL != 1)
+ #error CONFIG_KERNEL must be set to either 0 or 1 in config.h
+#endif
+#if !defined(CONFIG_WATCHDOG) || ((CONFIG_WATCHDOG != 0) && CONFIG_WATCHDOG != 1)
+ #error CONFIG_WATCHDOG must be set to either 0 or 1 in config.h
+#endif
+
+#if CONFIG_WATCHDOG
+ #include <drv/wdt.h>
+#endif
+
+#if CONFIG_KERNEL
+ #include <config_kern.h>
+ #if CONFIG_KERN_SIGNALS
+ #include <kern/signal.h> /* sig_wait(), sig_check() */
+ #include <kern/proc.h> /* proc_current() */
+ #include <cfg/macros.h> /* BV() */
+ #endif
+#endif
+
+
+/**
+ * \def CONFIG_TIMER_STROBE
+ *
+ * This is a debug facility that can be used to
+ * monitor timer interrupt activity on an external pin.
+ *
+ * To use strobes, redefine the macros TIMER_STROBE_ON,
+ * TIMER_STROBE_OFF and TIMER_STROBE_INIT and set
+ * CONFIG_TIMER_STROBE to 1.
+ */
+#if !defined(CONFIG_TIMER_STROBE) || !CONFIG_TIMER_STROBE
+ #define TIMER_STROBE_ON do {/*nop*/} while(0)
+ #define TIMER_STROBE_OFF do {/*nop*/} while(0)
+ #define TIMER_STROBE_INIT do {/*nop*/} while(0)
+#endif
+
+
+/// Master system clock (1 tick accuracy)
+volatile ticks_t _clock;