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.tar.gz rockbox-89ccd5c145e45ad541a02f38e2ad07fb916f7135.zip |
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 8cd165bd35..077176b96f 100644 --- a/firmware/timer.c +++ b/firmware/timer.c | |||
@@ -30,18 +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 | #ifndef __TIMER_SET | ||
34 | /* Define these if not defined by target to make the #else cases compile | ||
35 | * even if the target doesn't have them implemented. */ | ||
36 | #define __TIMER_SET(cycles, set) false | ||
37 | #if NUM_CORES > 1 | ||
38 | #define __TIMER_START(int_prio, core) false | ||
39 | #else | ||
40 | #define __TIMER_START(int_prio) false | ||
41 | #endif | ||
42 | #define __TIMER_STOP() | ||
43 | #endif | ||
44 | |||
45 | static bool timer_set(long cycles, bool start) | 33 | static bool timer_set(long cycles, bool start) |
46 | { | 34 | { |
47 | return __TIMER_SET(cycles, start); | 35 | return __TIMER_SET(cycles, start); |
@@ -49,17 +37,12 @@ static bool timer_set(long cycles, bool start) | |||
49 | 37 | ||
50 | /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ | 38 | /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ |
51 | bool timer_register(int reg_prio, void (*unregister_callback)(void), | 39 | bool timer_register(int reg_prio, void (*unregister_callback)(void), |
52 | long cycles, int int_prio, void (*timer_callback)(void) | 40 | long cycles, void (*timer_callback)(void) |
53 | IF_COP(, int core)) | 41 | IF_COP(, int core)) |
54 | { | 42 | { |
55 | if (reg_prio <= timer_prio || cycles == 0) | 43 | if (reg_prio <= timer_prio || cycles == 0) |
56 | return false; | 44 | return false; |
57 | 45 | ||
58 | #if CONFIG_CPU == SH7034 | ||
59 | if (int_prio < 1 || int_prio > 15) | ||
60 | return false; | ||
61 | #endif | ||
62 | |||
63 | if (!timer_set(cycles, true)) | 46 | if (!timer_set(cycles, true)) |
64 | return false; | 47 | return false; |
65 | 48 | ||
@@ -68,18 +51,10 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), | |||
68 | timer_prio = reg_prio; | 51 | timer_prio = reg_prio; |
69 | 52 | ||
70 | #if NUM_CORES > 1 | 53 | #if NUM_CORES > 1 |
71 | return __TIMER_START(int_prio, core); | 54 | return __TIMER_START(core); |
72 | #else | 55 | #else |
73 | return __TIMER_START(int_prio); | 56 | return __TIMER_START(); |
74 | #endif | 57 | #endif |
75 | |||
76 | /* Cover for targets that don't use all these */ | ||
77 | (void)reg_prio; | ||
78 | (void)unregister_callback; | ||
79 | (void)cycles; | ||
80 | /* TODO: Implement for PortalPlayer and iFP (if possible) */ | ||
81 | (void)int_prio; | ||
82 | (void)timer_callback; | ||
83 | } | 58 | } |
84 | 59 | ||
85 | bool timer_set_period(long cycles) | 60 | bool timer_set_period(long cycles) |