diff options
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 8cd165bd35..077176b96f 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) |