summaryrefslogtreecommitdiffstats
path: root/firmware/timer.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
commitc5dedd7d762f48e940ecc0bd17dd2173d59a92e1 (patch)
treecd4d9dc085b4c40f281f17953a3e126dd1c0c02b /firmware/timer.c
parent89ccd5c145e45ad541a02f38e2ad07fb916f7135 (diff)
downloadrockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.tar.gz
rockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.zip
Remove the TIMER_* macros and declare target-specific functions in timer.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21559 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/timer.c')
-rw-r--r--firmware/timer.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/firmware/timer.c b/firmware/timer.c
index 077176b96f..a923290a94 100644
--- a/firmware/timer.c
+++ b/firmware/timer.c
@@ -30,11 +30,6 @@ static int timer_prio = -1;
void SHAREDBSS_ATTR (*pfn_timer)(void) = NULL; /* timer callback */
void SHAREDBSS_ATTR (*pfn_unregister)(void) = NULL; /* unregister callback */
-static bool timer_set(long cycles, bool start)
-{
- return __TIMER_SET(cycles, start);
-}
-
/* Register a user timer, called every <cycles> TIMER_FREQ cycles */
bool timer_register(int reg_prio, void (*unregister_callback)(void),
long cycles, void (*timer_callback)(void)
@@ -50,11 +45,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
pfn_unregister = unregister_callback;
timer_prio = reg_prio;
-#if NUM_CORES > 1
- return __TIMER_START(core);
-#else
- return __TIMER_START();
-#endif
+ return timer_start(IF_COP(core));
}
bool timer_set_period(long cycles)
@@ -64,7 +55,7 @@ bool timer_set_period(long cycles)
void timer_unregister(void)
{
- __TIMER_STOP();
+ timer_stop();
pfn_timer = NULL;
pfn_unregister = NULL;