Add rtask module.
[bertos.git] / bertos / drv / timer.c
index 91784f9a8c96a2a033cfe0a4846a6bc2cd361f12..62f272ddc93274db3b20598edc425ebf7ba9ba56 100644 (file)
@@ -158,6 +158,8 @@ INLINE void timer_addToList(Timer *timer, List *queue)
  * When the delay indicated by the timer expires, the timer
  * device will execute the event associated with it.
  *
+ * You should not call this function on an already running timer.
+ *
  * \note Interrupt safe
  */
 void timer_add(Timer *timer)
@@ -400,17 +402,14 @@ void timer_init(void)
 }
 
 
-#if (ARCH & ARCH_EMUL)
+#if (ARCH & ARCH_EMUL) || (CPU_ARM_AT91)
 /**
- * Stop timer (only used by emulator)
+ * Stop timer
  */
 void timer_cleanup(void)
 {
        MOD_CLEANUP(timer);
 
        timer_hw_cleanup();
-
-       // Hmmm... apparently, the demo app does not cleanup properly
-       //ASSERT(LIST_EMPTY(&timers_queue));
 }
-#endif /* ARCH_EMUL */
+#endif