summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/kernel-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/kernel-as3525.c')
-rw-r--r--firmware/target/arm/as3525/kernel-as3525.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/kernel-as3525.c b/firmware/target/arm/as3525/kernel-as3525.c
index 986ceb3189..fd3b219e64 100644
--- a/firmware/target/arm/as3525/kernel-as3525.c
+++ b/firmware/target/arm/as3525/kernel-as3525.c
@@ -25,8 +25,8 @@
25#include "timer-target.h" 25#include "timer-target.h"
26 26
27#ifdef HAVE_SCROLLWHEEL 27#ifdef HAVE_SCROLLWHEEL
28#include "button-target.h"
28/* The scrollwheel is polled every 5 ms (the tick tasks only every 10) */ 29/* The scrollwheel is polled every 5 ms (the tick tasks only every 10) */
29extern void button_read_dbop(void);
30static volatile int poll_scrollwheel = 0; 30static volatile int poll_scrollwheel = 0;
31 31
32void INT_TIMER2(void) 32void INT_TIMER2(void)
@@ -34,7 +34,10 @@ void INT_TIMER2(void)
34 if (!poll_scrollwheel) 34 if (!poll_scrollwheel)
35 call_tick_tasks(); /* Run through the list of tick tasks */ 35 call_tick_tasks(); /* Run through the list of tick tasks */
36 else 36 else
37 button_read_dbop(); 37 {
38 if (!button_hold())
39 button_read_dbop();
40 }
38 41
39 poll_scrollwheel ^= 1; 42 poll_scrollwheel ^= 1;
40 TIMER2_INTCLR = 0; /* clear interrupt */ 43 TIMER2_INTCLR = 0; /* clear interrupt */