X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Femul%2Ftimer_qt.c;h=e0883abd87059b2f809e992f91ca4ae26dd586bf;hb=bacf2d16464c810fef1bce0ea54d9bb0a5808486;hp=7c2a0c34d23cd9345c6b11a11b633f1ac551c878;hpb=42e61240ce8a55e92fe0942fecbee3abe371c507;p=bertos.git diff --git a/bertos/emul/timer_qt.c b/bertos/emul/timer_qt.c index 7c2a0c34..e0883abd 100644 --- a/bertos/emul/timer_qt.c +++ b/bertos/emul/timer_qt.c @@ -30,7 +30,6 @@ * * --> * - * \version $Id$ * * \author Bernie Innocenti * @@ -42,6 +41,10 @@ #include #include +#if CONFIG_KERN_IRQ +#include +#endif + // The user interrupt server routine void timer_isr(void); @@ -87,6 +90,10 @@ public: // Record initial time system_time.start(); + #if CONFIG_KERN_IRQ + irq_register(SIGALRM, timer_isr); + #endif + // Activate timer interrupt connect(&timer, SIGNAL(timeout()), SLOT(timerInterrupt())); timer.start(1000 / TIMER_TICKS_PER_SEC); @@ -116,7 +123,11 @@ public slots: void timerInterrupt(void) { // Just call user interrupt server, timer restarts automatically. - timer_isr(); + #if CONFIG_KERN_IRQ + irq_entry(SIGALRM); + #else + timer_isr(); + #endif } };