summaryrefslogtreecommitdiff
path: root/firmware/export/timer.h
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-03-17 00:08:39 +0000
committerThom Johansen <thomj@rockbox.org>2006-03-17 00:08:39 +0000
commit46de4c21fee7d31b8a76c4ae7df75e29800cd587 (patch)
treed9efe96f84d81fecbfd84cb2cfcb86bbb41ac8fd /firmware/export/timer.h
parentf7b14efc7f8d1ac6c8cd5bb4dc7fd8b9f36c33d0 (diff)
downloadrockbox-46de4c21fee7d31b8a76c4ae7df75e29800cd587.zip
rockbox-46de4c21fee7d31b8a76c4ae7df75e29800cd587.tar.gz
rockbox-46de4c21fee7d31b8a76c4ae7df75e29800cd587.tar.bz2
rockbox-46de4c21fee7d31b8a76c4ae7df75e29800cd587.tar.xz
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
Diffstat (limited to 'firmware/export/timer.h')
-rw-r--r--firmware/export/timer.h8
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);