Remove the TIMER_* macros and declare target-specific functions in timer.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21559 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2009-06-29 14:29:57 +00:00
parent 89ccd5c145
commit c5dedd7d76
26 changed files with 44 additions and 208 deletions

View file

@ -43,7 +43,7 @@ void TIMER1_ISR(void)
TIMER1.clr = 1; /* clear the interrupt */
}
bool __timer_set(long cycles, bool start)
bool timer_set(long cycles, bool start)
{
if (start)
{
@ -68,14 +68,14 @@ bool __timer_set(long cycles, bool start)
return true;
}
bool __timer_start(void)
bool timer_start(void)
{
irq_set_int_handler(IRQ_TIMER1, TIMER1_ISR);
irq_enable_int(IRQ_TIMER1);
return true;
}
void __timer_stop(void)
void timer_stop(void)
{
TIMER1.ctrl &= ~0x80; /* disable timer 1 */
irq_disable_int(IRQ_TIMER1);

View file

@ -21,19 +21,6 @@
#ifndef TIMER_TARGET_H
#define TIMER_TARGET_H
bool __timer_set(long cycles, bool start);
bool __timer_start(void);
void __timer_stop(void);
#define TIMER_FREQ 3000000
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
#define __TIMER_START() \
__timer_start()
#define __TIMER_STOP(...) \
__timer_stop()
#endif /* TIMER_TARGET_H */