diff --git a/firmware/target/arm/as3525/kernel-as3525.c b/firmware/target/arm/as3525/kernel-as3525.c index cb7622a..448211b 100644 --- a/firmware/target/arm/as3525/kernel-as3525.c +++ b/firmware/target/arm/as3525/kernel-as3525.c @@ -24,44 +24,16 @@ #include "panic.h" #include "timer.h" -#ifdef HAVE_SCROLLWHEEL -/* let the timer interrupt twice as often for the scrollwheel polling */ -#define KERNEL_TIMER_FREQ (TIMER_FREQ/2) -#else -#define KERNEL_TIMER_FREQ TIMER_FREQ -#endif - -#ifdef HAVE_SCROLLWHEEL -#include "button-target.h" -/* The scrollwheel is polled every 5 ms (the tick tasks only every 10) */ -static int poll_scrollwheel = 0; - -void INT_TIMER2(void) -{ - if (!poll_scrollwheel) - call_tick_tasks(); /* Run through the list of tick tasks - * (that includes reading the scrollwheel) */ - else - { - if (!button_hold()) - button_read_dbop(); /* Read the scrollwheel */ - } - - poll_scrollwheel ^= 1; - TIMER2_INTCLR = 0; /* clear interrupt */ -} -#else void INT_TIMER2(void) { call_tick_tasks(); /* Run through the list of tick tasks */ TIMER2_INTCLR = 0; /* clear interrupt */ } -#endif void tick_start(unsigned int interval_in_ms) { - int cycles = KERNEL_TIMER_FREQ / 1000 * interval_in_ms; + int cycles = TIMER_FREQ / 1000 * interval_in_ms; CGU_PERI |= CGU_TIMER2_CLOCK_ENABLE; /* enable peripheral */ VIC_INT_ENABLE |= INTERRUPT_TIMER2; /* enable interrupt */