timer: Convert to new-style CONFIG_XYZ parameters
[bertos.git] / bertos / drv / timer.c
index 0d78d198aaa3a6bb5690bab53f2ad59e49acb80f..bfc4feb2c1a02a619a3acb02ee25473353afa145 100644 (file)
 volatile ticks_t _clock;
 
 
-#ifndef CONFIG_TIMER_DISABLE_EVENTS
+#if CONFIG_TIMER_EVENTS
 
 /**
  * List of active asynchronous timers.
@@ -172,7 +172,7 @@ Timer *timer_abort(Timer *timer)
        return timer;
 }
 
-#endif /* CONFIG_TIMER_DISABLE_EVENTS */
+#endif /* CONFIG_TIMER_EVENTS */
 
 
 /**
@@ -208,7 +208,7 @@ void timer_delayTicks(ticks_t delay)
 }
 
 
-#ifndef CONFIG_TIMER_DISABLE_UDELAY
+#if CONFIG_TIMER_UDELAY
 
 /**
  * Busy wait until the specified amount of high-precision ticks have elapsed.
@@ -254,7 +254,7 @@ void timer_delayHp(hptime_t delay)
 
        timer_busyWait(delay);
 }
-#endif /* CONFIG_TIMER_DISABLE_UDELAY */
+#endif /* CONFIG_TIMER_UDELAY */
 
 
 /**
@@ -272,9 +272,10 @@ DEFINE_TIMER_ISR
        #pragma interrupt saveall
        #endif
 
-#ifndef CONFIG_TIMER_DISABLE_EVENTS
+#if CONFIG_TIMER_EVENTS
        Timer *timer;
 #endif
+
        /*
         * On systems sharing IRQ line and vector, this check is needed
         * to ensure that IRQ is generated by timer source.
@@ -290,7 +291,7 @@ DEFINE_TIMER_ISR
        /* Update the master ms counter */
        ++_clock;
 
-#ifndef CONFIG_TIMER_DISABLE_EVENTS
+#if CONFIG_TIMER_EVENTS
        /*
         * Check the first timer request in the list and process
         * it when it has expired. Repeat this check until the
@@ -311,7 +312,7 @@ DEFINE_TIMER_ISR
                /* Execute the associated event */
                event_do(&timer->expire);
        }
-#endif /* CONFIG_TIMER_DISABLE_EVENTS */
+#endif /* CONFIG_TIMER_EVENTS */
 
        TIMER_STROBE_OFF;
 }
@@ -325,7 +326,7 @@ void timer_init(void)
 {
        TIMER_STROBE_INIT;
 
-#ifndef CONFIG_TIMER_DISABLE_EVENTS
+#if CONFIG_TIMER_EVENTS
        LIST_INIT(&timers_queue);
 #endif