mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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
|
|
@ -53,14 +53,14 @@ bool __timer_set(long cycles, bool start)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool __timer_register(void)
|
||||
bool __timer_start(void)
|
||||
{
|
||||
CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
|
||||
VIC_INT_ENABLE |= INTERRUPT_TIMER1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void __timer_unregister(void)
|
||||
void __timer_stop(void)
|
||||
{
|
||||
TIMER1_CONTROL &= 0x10; /* disable timer 1 (don't modify bit 4) */
|
||||
VIC_INT_EN_CLEAR = INTERRUPT_TIMER1; /* disable interrupt */
|
||||
|
|
|
|||
|
|
@ -22,19 +22,18 @@
|
|||
#define TIMER_TARGET_H
|
||||
|
||||
bool __timer_set(long cycles, bool set);
|
||||
bool __timer_register(void);
|
||||
void __timer_unregister(void);
|
||||
bool __timer_start(void);
|
||||
void __timer_stop(void);
|
||||
|
||||
#define TIMER_FREQ (24000000 / 16)
|
||||
|
||||
#define __TIMER_SET(cycles, set) \
|
||||
__timer_set(cycles, set)
|
||||
|
||||
#define __TIMER_REGISTER(reg_prio, unregister_callback, cycles, \
|
||||
int_prio, timer_callback) \
|
||||
__timer_register()
|
||||
#define __TIMER_START() \
|
||||
__timer_start()
|
||||
|
||||
#define __TIMER_UNREGISTER(...) \
|
||||
__timer_unregister()
|
||||
#define __TIMER_STOP(...) \
|
||||
__timer_stop()
|
||||
|
||||
#endif /* TIMER_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue