From 46de4c21fee7d31b8a76c4ae7df75e29800cd587 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Fri, 17 Mar 2006 00:08:39 +0000 Subject: Add timer.c module support for ipods. Remove uneeded SIMULATOR check. Introduce TIMER_FREQ define. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9067 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/timer.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/timer.h b/firmware/export/timer.h index afd60ac66c..15b5f108a3 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); -- cgit v1.2.3