summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-04-27 10:56:44 +0000
committerThomas Martitz <kugel@rockbox.org>2010-04-27 10:56:44 +0000
commitf96406c5f3aca04f3c0ab95275d857288fd8c2ea (patch)
tree91086ba613840537e4cc71f4f157ffe2e0326c24 /firmware/target/arm/as3525
parent249aae587a1f35f5df55613c6765ae763db39107 (diff)
downloadrockbox-f96406c5f3aca04f3c0ab95275d857288fd8c2ea.tar.gz
rockbox-f96406c5f3aca04f3c0ab95275d857288fd8c2ea.zip
Two corrections to the previous commit (wrong timer was used, KERNEL_TIMER_FREQ is a more trustworthy).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25737 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
index 9421076cce..5693ea0fa3 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
@@ -31,7 +31,7 @@ static bool hold_button = false;
31#ifdef HAVE_SCROLLWHEEL 31#ifdef HAVE_SCROLLWHEEL
32#define SCROLLWHEEL_BITS (1<<7|1<<6) 32#define SCROLLWHEEL_BITS (1<<7|1<<6)
33 /* TIMER units */ 33 /* TIMER units */
34#define TIMER_TICK (TIMER_FREQ/HZ) /* how long a tick lasts */ 34#define TIMER_TICK (KERNEL_TIMER_FREQ/HZ)/* how long a tick lasts */
35#define TIMER_MS (TIMER_TICK/(1000/HZ))/* how long a ms lasts */ 35#define TIMER_MS (TIMER_TICK/(1000/HZ))/* how long a ms lasts */
36 36
37#define WHEEL_REPEAT_INTERVAL (300*TIMER_MS) /* 300ms */ 37#define WHEEL_REPEAT_INTERVAL (300*TIMER_MS) /* 300ms */
@@ -90,7 +90,7 @@ static void scrollwheel(unsigned int wheel_value)
90 } 90 }
91 91
92 int repeat = 1; /* assume repeat */ 92 int repeat = 1; /* assume repeat */
93 long time = TIMER1_VALUE + current_tick*TIMER_TICK; /* to timer unit */ 93 long time = TIMER2_VALUE + current_tick*TIMER_TICK; /* to timer unit */
94 long v = (time - last_wheel_post); 94 long v = (time - last_wheel_post);
95 95
96 /* interpolate velocity in timer_freq/timer_unit == 1/s */ 96 /* interpolate velocity in timer_freq/timer_unit == 1/s */