diff options
author | Thom Johansen <thomj@rockbox.org> | 2006-01-24 22:16:27 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2006-01-24 22:16:27 +0000 |
commit | 289ec0164b77b4c6b35b818efc881c6d8b479e9f (patch) | |
tree | 24e3fb848f31f4044d56457fa914cedad07606f9 /firmware | |
parent | 465982b2af2fc524d954c01bf4fe9e6790c9a871 (diff) | |
download | rockbox-289ec0164b77b4c6b35b818efc881c6d8b479e9f.tar.gz rockbox-289ec0164b77b4c6b35b818efc881c6d8b479e9f.zip |
Properly configurable tick timer for PP5020.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8437 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/kernel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 614f9cf402..7d392a013b 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -346,8 +346,6 @@ void tick_start(unsigned int interval_in_ms) | |||
346 | 346 | ||
347 | #elif CONFIG_CPU == PP5020 | 347 | #elif CONFIG_CPU == PP5020 |
348 | 348 | ||
349 | #define USECS_PER_INT 0x2710 | ||
350 | |||
351 | #ifndef BOOTLOADER | 349 | #ifndef BOOTLOADER |
352 | void TIMER1(void) | 350 | void TIMER1(void) |
353 | { | 351 | { |
@@ -371,12 +369,10 @@ void TIMER1(void) | |||
371 | void tick_start(unsigned int interval_in_ms) | 369 | void tick_start(unsigned int interval_in_ms) |
372 | { | 370 | { |
373 | #ifndef BOOTLOADER | 371 | #ifndef BOOTLOADER |
374 | /* TODO: use interval_in_ms to set timer periode */ | ||
375 | (void)interval_in_ms; | ||
376 | PP5020_TIMER1 = 0x0; | 372 | PP5020_TIMER1 = 0x0; |
377 | PP5020_TIMER1_ACK; | 373 | PP5020_TIMER1_ACK; |
378 | /* enable timer, period, trigger value 0x2710 -> 100Hz */ | 374 | /* enable timer */ |
379 | PP5020_TIMER1 = 0xc0000000 | USECS_PER_INT; | 375 | PP5020_TIMER1 = 0xc0000000 | (interval_in_ms*1000); |
380 | /* unmask interrupt source */ | 376 | /* unmask interrupt source */ |
381 | PP5020_CPU_INT_EN = PP5020_TIMER1_MASK; | 377 | PP5020_CPU_INT_EN = PP5020_TIMER1_MASK; |
382 | #else | 378 | #else |