From: bernie Date: Mon, 25 Aug 2008 11:32:52 +0000 (+0000) Subject: timer: check for initialization of irq module when it is enabled X-Git-Tag: 2.0.0~248 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ae263f1c0564f616b3b557498532163ffb60595f;p=bertos.git timer: check for initialization of irq module when it is enabled git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1686 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index 485cc022..c0106d85 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -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;