From ae263f1c0564f616b3b557498532163ffb60595f Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 25 Aug 2008 11:32:52 +0000 Subject: [PATCH] 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 --- bertos/drv/timer.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; -- 2.25.1