forked from len0rd/rockbox
Change the timer interrupt setup so that TIMER_FREQ is changed for HAVE_SCROLLWHEEL (which read the scrollwheel between tick tasks too) instead of the generated variable. No functional change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21177 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
52a8e38806
commit
d1b0ee9f04
2 changed files with 8 additions and 6 deletions
|
@ -57,11 +57,6 @@ void tick_start(unsigned int interval_in_ms)
|
||||||
int prescale = 1;
|
int prescale = 1;
|
||||||
int cycles = TIMER_FREQ / 1000 * interval_in_ms;
|
int cycles = TIMER_FREQ / 1000 * interval_in_ms;
|
||||||
|
|
||||||
#ifdef HAVE_SCROLLWHEEL
|
|
||||||
/* let the timer interrupt twice as often for the scrollwheel polling */
|
|
||||||
cycles >>= 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while(cycles > 0x10000)
|
while(cycles > 0x10000)
|
||||||
{
|
{
|
||||||
phi++;
|
phi++;
|
||||||
|
|
|
@ -25,7 +25,14 @@ bool __timer_set(long cycles, bool set);
|
||||||
bool __timer_register(void);
|
bool __timer_register(void);
|
||||||
void __timer_unregister(void);
|
void __timer_unregister(void);
|
||||||
|
|
||||||
#define TIMER_FREQ (24000000 / 16)
|
#ifdef HAVE_SCROLLWHEEL
|
||||||
|
/* The scrollwheel is polled every 5 ms (the tick tasks still every 10ms) */
|
||||||
|
#define TIMER_DIV (16*2)
|
||||||
|
#else
|
||||||
|
#define TIMER_DIV (16)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TIMER_FREQ (24000000 / TIMER_DIV)
|
||||||
|
|
||||||
#define __TIMER_SET(cycles, set) \
|
#define __TIMER_SET(cycles, set) \
|
||||||
__timer_set(cycles, set)
|
__timer_set(cycles, set)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue