timer: check for initialization of irq module when it is enabled
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 11:32:52 +0000 (11:32 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 11:32:52 +0000 (11:32 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1686 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/timer.c

index 485cc0229d2192796b6c2cfe2d1ae630654a9984..c0106d85bbe515a32747c977e1ced7e48016b5e8 100644 (file)
@@ -325,11 +325,15 @@ MOD_DEFINE(timer)
  */
 void timer_init(void)
 {
-       TIMER_STROBE_INIT;
+       #if CONFIG_KERN_IRQ
+               MOD_CHECK(irq);
+       #endif
 
-#if CONFIG_TIMER_EVENTS
-       LIST_INIT(&timers_queue);
-#endif
+       #if CONFIG_TIMER_EVENTS
+               LIST_INIT(&timers_queue);
+       #endif
+
+       TIMER_STROBE_INIT;
 
        _clock = 0;