/*
* $Log$
+ * Revision 1.9 2004/07/21 00:15:13 bernie
+ * Put timer driver on diet.
+ *
* Revision 1.8 2004/07/18 21:57:07 bernie
* Fix preprocessor warning with potentially undefined symbol.
*
//! Master system clock (1ms accuracy)
volatile time_t _clock;
-REGISTER static List timers_queue; /*!< Active timers */
+
+#ifndef CONFIG_TIMER_DISABLE_EVENTS
+
+/*!
+ * List of active asynchronous timers.
+ */
+REGISTER static List timers_queue;
/*!
return timer;
}
+#endif /* CONFIG_TIMER_DISABLE_EVENTS */
+
/*!
* Wait for the specified amount of time (expressed in ms)
}
+#ifndef CONFIG_TIMER_DISABLE_UDELAY
/*!
* Wait for the specified amount of time (expressed in microseconds)
*
while (timer_hw_hpread() - start < delay)
{}
}
+#endif /* CONFIG_TIMER_DISABLE_UDELAY */
/*!
*/
DEFINE_TIMER_ISR
{
- /* With the Metrowerks compiler, the only way to force the compiler generate
- an interrupt service routine is to put a pragma directive within the function
- body. */
+ /*
+ * With the Metrowerks compiler, the only way to force the compiler generate
+ * an interrupt service routine is to put a pragma directive within the function
+ * body.
+ */
#ifdef __MWERKS__
#pragma interrupt saveall
#endif
+#ifndef CONFIG_TIMER_DISABLE_EVENTS
Timer *timer;
+#endif
TIMER_STROBE_ON;
/* Update the master ms counter */
++_clock;
+#ifndef CONFIG_TIMER_DISABLE_EVENTS
/*
* Check the first timer request in the list and process
* it when it has expired. Repeat this check until the
/* Execute the associated event */
event_doIntr(&timer->expire);
}
+#endif /* CONFIG_TIMER_DISABLE_EVENTS */
TIMER_STROBE_OFF;
}
{
TIMER_STROBE_INIT;
+#ifndef CONFIG_TIMER_DISABLE_EVENTS
INITLIST(&timers_queue);
+#endif
_clock = 0;