forked from len0rd/rockbox
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
This commit is contained in:
parent
15e40dd3a6
commit
e0640c3c4b
17 changed files with 68 additions and 78 deletions
|
|
@ -39,9 +39,8 @@ static long SHAREDBSS_ATTR cycles_new = 0;
|
|||
/* 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
|
||||
#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
|
||||
int_prio, timer_callback) false
|
||||
#define __TIMER_UNREGISTER(...)
|
||||
#define __TIMER_START() false
|
||||
#define __TIMER_STOP(...)
|
||||
#endif
|
||||
|
||||
/* interrupt handler */
|
||||
|
|
@ -288,8 +287,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
|
|||
irq_enable_int(IRQ_TIMER1);
|
||||
return true;
|
||||
#else
|
||||
return __TIMER_REGISTER(reg_prio, unregister_callback, cycles,
|
||||
int_prio, timer_callback);
|
||||
return __TIMER_START();
|
||||
#endif
|
||||
/* Cover for targets that don't use all these */
|
||||
(void)reg_prio;
|
||||
|
|
@ -321,7 +319,7 @@ void timer_unregister(void)
|
|||
TIMER1.ctrl &= ~0x80; /* disable timer 1 */
|
||||
irq_disable_int(IRQ_TIMER1);
|
||||
#else
|
||||
__TIMER_UNREGISTER();
|
||||
__TIMER_STOP();
|
||||
#endif
|
||||
pfn_timer = NULL;
|
||||
pfn_unregister = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue