diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:28:56 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:28:56 +0000 |
commit | e0640c3c4b6d238e38155c863e542335ce57a425 (patch) | |
tree | ec0d956f861090a91021aee1d360e4a2c6449670 /firmware/timer.c | |
parent | 15e40dd3a6ac8e9df88b77c0dbd9a90870ad91e6 (diff) | |
download | rockbox-e0640c3c4b6d238e38155c863e542335ce57a425.tar.gz rockbox-e0640c3c4b6d238e38155c863e542335ce57a425.zip |
Rename TIMER_REGISTER macro to TIMER_START and TIMER_UNREGISTER to TIMER_STOP to reflect what they does exactly.
registering and unregistering are handled by the non target-specific functions of timer.c
Remove arguments from the new TIMER_START since they are unused by targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21553 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/timer.c')
-rw-r--r-- | firmware/timer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/firmware/timer.c b/firmware/timer.c index bcaacba307..e5a60902b6 100644 --- a/firmware/timer.c +++ b/firmware/timer.c | |||
@@ -39,9 +39,8 @@ static long SHAREDBSS_ATTR cycles_new = 0; | |||
39 | /* Define these if not defined by target to make the #else cases compile | 39 | /* Define these if not defined by target to make the #else cases compile |
40 | * even if the target doesn't have them implemented. */ | 40 | * even if the target doesn't have them implemented. */ |
41 | #define __TIMER_SET(cycles, set) false | 41 | #define __TIMER_SET(cycles, set) false |
42 | #define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \ | 42 | #define __TIMER_START() false |
43 | int_prio, timer_callback) false | 43 | #define __TIMER_STOP(...) |
44 | #define __TIMER_UNREGISTER(...) | ||
45 | #endif | 44 | #endif |
46 | 45 | ||
47 | /* interrupt handler */ | 46 | /* interrupt handler */ |
@@ -288,8 +287,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), | |||
288 | irq_enable_int(IRQ_TIMER1); | 287 | irq_enable_int(IRQ_TIMER1); |
289 | return true; | 288 | return true; |
290 | #else | 289 | #else |
291 | return __TIMER_REGISTER(reg_prio, unregister_callback, cycles, | 290 | return __TIMER_START(); |
292 | int_prio, timer_callback); | ||
293 | #endif | 291 | #endif |
294 | /* Cover for targets that don't use all these */ | 292 | /* Cover for targets that don't use all these */ |
295 | (void)reg_prio; | 293 | (void)reg_prio; |
@@ -321,7 +319,7 @@ void timer_unregister(void) | |||
321 | TIMER1.ctrl &= ~0x80; /* disable timer 1 */ | 319 | TIMER1.ctrl &= ~0x80; /* disable timer 1 */ |
322 | irq_disable_int(IRQ_TIMER1); | 320 | irq_disable_int(IRQ_TIMER1); |
323 | #else | 321 | #else |
324 | __TIMER_UNREGISTER(); | 322 | __TIMER_STOP(); |
325 | #endif | 323 | #endif |
326 | pfn_timer = NULL; | 324 | pfn_timer = NULL; |
327 | pfn_unregister = NULL; | 325 | pfn_unregister = NULL; |