X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.c;h=c0106d85bbe515a32747c977e1ced7e48016b5e8;hb=b0f0b3a926d4cb1e8d65b1eca28f37acba9e6016;hp=f282478aa361a42e77e69762ffab5f8fbabbf968;hpb=111a5049211f2adee08a0e483bfd560f3ee88e14;p=bertos.git diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index f282478a..c0106d85 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -54,7 +54,8 @@ * Try the CPU specific one for bare-metal environments. */ #if OS_HOSTED - #include OS_CSOURCE(timer) + //#include OS_CSOURCE(timer) + #include #else #include CPU_CSOURCE(timer) #endif @@ -324,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;