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

@ -34,7 +34,7 @@ void TIMER0(void)
pfn_timer();
}
bool __timer_set(long cycles, bool start)
bool timer_set(long cycles, bool start)
{
int oldlevel;
unsigned int divider=cycles, prescaler=0;
@ -82,7 +82,7 @@ static void stop_timer(void)
IO_CLK_MOD2 &= ~CLK_MOD2_TMR0; //disable TIMER0 clock
}
bool __timer_start(void)
bool timer_start(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
@ -100,7 +100,7 @@ bool __timer_start(void)
return true;
}
void __timer_stop(void)
void timer_stop(void)
{
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
stop_timer();

View file

@ -24,17 +24,4 @@
/* timer is based on PCLK and minimum division is 2 */
#define TIMER_FREQ (27000000)
bool __timer_set(long cycles, bool set);
bool __timer_start(void);
void __timer_stop(void);
#define __TIMER_SET(cycles, set) \
__timer_set(cycles, set)
#define __TIMER_START() \
__timer_start()
#define __TIMER_STOP(...) \
__timer_stop()
#endif /* TIMER_TARGET_H */