mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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:
parent
89ccd5c145
commit
c5dedd7d76
26 changed files with 44 additions and 208 deletions
|
|
@ -31,7 +31,7 @@ void INT_TIMER1(void)
|
|||
TIMER1_INTCLR = 0; /* clear interrupt */
|
||||
}
|
||||
|
||||
bool __timer_set(long cycles, bool start)
|
||||
bool timer_set(long cycles, bool start)
|
||||
{
|
||||
if (start)
|
||||
{
|
||||
|
|
@ -53,14 +53,14 @@ bool __timer_set(long cycles, bool start)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool __timer_start(void)
|
||||
bool timer_start(void)
|
||||
{
|
||||
CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
|
||||
VIC_INT_ENABLE |= INTERRUPT_TIMER1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void __timer_stop(void)
|
||||
void timer_stop(void)
|
||||
{
|
||||
TIMER1_CONTROL &= 0x10; /* disable timer 1 (don't modify bit 4) */
|
||||
VIC_INT_EN_CLEAR = INTERRUPT_TIMER1; /* disable interrupt */
|
||||
|
|
|
|||
|
|
@ -21,19 +21,6 @@
|
|||
#ifndef TIMER_TARGET_H
|
||||
#define TIMER_TARGET_H
|
||||
|
||||
bool __timer_set(long cycles, bool set);
|
||||
bool __timer_start(void);
|
||||
void __timer_stop(void);
|
||||
|
||||
#define TIMER_FREQ (24000000 / 16)
|
||||
|
||||
#define __TIMER_SET(cycles, set) \
|
||||
__timer_set(cycles, set)
|
||||
|
||||
#define __TIMER_START() \
|
||||
__timer_start()
|
||||
|
||||
#define __TIMER_STOP(...) \
|
||||
__timer_stop()
|
||||
|
||||
#endif /* TIMER_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue