diff options
Diffstat (limited to 'firmware/export/timer.h')
| -rw-r--r-- | firmware/export/timer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/export/timer.h b/firmware/export/timer.h index afd60ac..15b5f10 100644 --- a/firmware/export/timer.h +++ b/firmware/export/timer.h @@ -25,6 +25,14 @@ #ifndef SIMULATOR +/* Assume timer base freq. is CPU clock base freq. Portalplayer chips use a + microsecond timer instead. */ +#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 +#define TIMER_FREQ 1000000 +#else +#define TIMER_FREQ CPU_FREQ +#endif + bool timer_register(int reg_prio, void (*unregister_callback)(void), long cycles, int int_prio, void (*timer_callback)(void)); bool timer_set_period(long cycles); |