diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:29:46 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:29:46 +0000 |
| commit | 89ccd5c145e45ad541a02f38e2ad07fb916f7135 (patch) | |
| tree | 5fc32e78d793022246e3893f7c420f52d624c96e /firmware/timer.c | |
| parent | b955dff268005d3d55ee3f38af0875718ab6021a (diff) | |
| download | rockbox-89ccd5c145e45ad541a02f38e2ad07fb916f7135.zip rockbox-89ccd5c145e45ad541a02f38e2ad07fb916f7135.tar.gz rockbox-89ccd5c145e45ad541a02f38e2ad07fb916f7135.tar.bz2 rockbox-89ccd5c145e45ad541a02f38e2ad07fb916f7135.tar.xz | |
Remove int_prio argument from timer_register, and move the only use for it into alpine_cdc plugin, since this plugin is only built on SH7034
Also remove it from TIMER_START()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/timer.c')
| -rw-r--r-- | firmware/timer.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/firmware/timer.c b/firmware/timer.c index 8cd165b..077176b 100644 --- a/firmware/timer.c +++ b/firmware/timer.c @@ -30,18 +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 */ -#ifndef __TIMER_SET -/* Define these if not defined by target to make the #else cases compile - * even if the target doesn't have them implemented. */ -#define __TIMER_SET(cycles, set) false -#if NUM_CORES > 1 -#define __TIMER_START(int_prio, core) false -#else -#define __TIMER_START(int_prio) false -#endif -#define __TIMER_STOP() -#endif - static bool timer_set(long cycles, bool start) { return __TIMER_SET(cycles, start); @@ -49,17 +37,12 @@ static bool timer_set(long cycles, bool start) /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ bool timer_register(int reg_prio, void (*unregister_callback)(void), - long cycles, int int_prio, void (*timer_callback)(void) + long cycles, void (*timer_callback)(void) IF_COP(, int core)) { if (reg_prio <= timer_prio || cycles == 0) return false; -#if CONFIG_CPU == SH7034 - if (int_prio < 1 || int_prio > 15) - return false; -#endif - if (!timer_set(cycles, true)) return false; @@ -68,18 +51,10 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), timer_prio = reg_prio; #if NUM_CORES > 1 - return __TIMER_START(int_prio, core); + return __TIMER_START(core); #else - return __TIMER_START(int_prio); + return __TIMER_START(); #endif - - /* Cover for targets that don't use all these */ - (void)reg_prio; - (void)unregister_callback; - (void)cycles; - /* TODO: Implement for PortalPlayer and iFP (if possible) */ - (void)int_prio; - (void)timer_callback; } bool timer_set_period(long cycles) |