mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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
This commit is contained in:
parent
249aae587a
commit
f96406c5f3
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ static bool hold_button = false;
|
|||
#ifdef HAVE_SCROLLWHEEL
|
||||
#define SCROLLWHEEL_BITS (1<<7|1<<6)
|
||||
/* TIMER units */
|
||||
#define TIMER_TICK (TIMER_FREQ/HZ) /* how long a tick lasts */
|
||||
#define TIMER_TICK (KERNEL_TIMER_FREQ/HZ)/* how long a tick lasts */
|
||||
#define TIMER_MS (TIMER_TICK/(1000/HZ))/* how long a ms lasts */
|
||||
|
||||
#define WHEEL_REPEAT_INTERVAL (300*TIMER_MS) /* 300ms */
|
||||
|
|
@ -90,7 +90,7 @@ static void scrollwheel(unsigned int wheel_value)
|
|||
}
|
||||
|
||||
int repeat = 1; /* assume repeat */
|
||||
long time = TIMER1_VALUE + current_tick*TIMER_TICK; /* to timer unit */
|
||||
long time = TIMER2_VALUE + current_tick*TIMER_TICK; /* to timer unit */
|
||||
long v = (time - last_wheel_post);
|
||||
|
||||
/* interpolate velocity in timer_freq/timer_unit == 1/s */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue