diff options
Diffstat (limited to 'firmware/export/timer.h')
-rw-r--r-- | firmware/export/timer.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/export/timer.h b/firmware/export/timer.h index 15b5f108a3..2fb7c6495f 100644 --- a/firmware/export/timer.h +++ b/firmware/export/timer.h | |||
@@ -25,12 +25,15 @@ | |||
25 | 25 | ||
26 | #ifndef SIMULATOR | 26 | #ifndef SIMULATOR |
27 | 27 | ||
28 | /* Assume timer base freq. is CPU clock base freq. Portalplayer chips use a | 28 | |
29 | microsecond timer instead. */ | ||
30 | #if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 29 | #if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 |
31 | #define TIMER_FREQ 1000000 | 30 | /* Portalplayer chips use a microsecond timer. */ |
31 | #define TIMER_FREQ 1000000 | ||
32 | #elif defined(CPU_COLDFIRE) | ||
33 | /* timer is based on busclk == cpuclk/2 */ | ||
34 | #define TIMER_FREQ (CPU_FREQ/2) | ||
32 | #else | 35 | #else |
33 | #define TIMER_FREQ CPU_FREQ | 36 | #define TIMER_FREQ CPU_FREQ |
34 | #endif | 37 | #endif |
35 | 38 | ||
36 | bool timer_register(int reg_prio, void (*unregister_callback)(void), | 39 | bool timer_register(int reg_prio, void (*unregister_callback)(void), |