diff options
Diffstat (limited to 'firmware/timer.c')
-rw-r--r-- | firmware/timer.c | 13 |
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; | |||
30 | void SHAREDBSS_ATTR (*pfn_timer)(void) = NULL; /* timer callback */ | 30 | void SHAREDBSS_ATTR (*pfn_timer)(void) = NULL; /* timer callback */ |
31 | void SHAREDBSS_ATTR (*pfn_unregister)(void) = NULL; /* unregister callback */ | 31 | void SHAREDBSS_ATTR (*pfn_unregister)(void) = NULL; /* unregister callback */ |
32 | 32 | ||
33 | static bool timer_set(long cycles, bool start) | ||
34 | { | ||
35 | return __TIMER_SET(cycles, start); | ||
36 | } | ||
37 | |||
38 | /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ | 33 | /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ |
39 | bool timer_register(int reg_prio, void (*unregister_callback)(void), | 34 | bool timer_register(int reg_prio, void (*unregister_callback)(void), |
40 | long cycles, void (*timer_callback)(void) | 35 | long cycles, void (*timer_callback)(void) |
@@ -50,11 +45,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), | |||
50 | pfn_unregister = unregister_callback; | 45 | pfn_unregister = unregister_callback; |
51 | timer_prio = reg_prio; | 46 | timer_prio = reg_prio; |
52 | 47 | ||
53 | #if NUM_CORES > 1 | 48 | return timer_start(IF_COP(core)); |
54 | return __TIMER_START(core); | ||
55 | #else | ||
56 | return __TIMER_START(); | ||
57 | #endif | ||
58 | } | 49 | } |
59 | 50 | ||
60 | bool timer_set_period(long cycles) | 51 | bool timer_set_period(long cycles) |
@@ -64,7 +55,7 @@ bool timer_set_period(long cycles) | |||
64 | 55 | ||
65 | void timer_unregister(void) | 56 | void timer_unregister(void) |
66 | { | 57 | { |
67 | __TIMER_STOP(); | 58 | timer_stop(); |
68 | 59 | ||
69 | pfn_timer = NULL; | 60 | pfn_timer = NULL; |
70 | pfn_unregister = NULL; | 61 | pfn_unregister = NULL; |