mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -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
|
|
@ -33,7 +33,7 @@ void TCU1(void)
|
|||
pfn_timer();
|
||||
}
|
||||
|
||||
bool __timer_set(long cycles, bool start)
|
||||
bool timer_set(long cycles, bool start)
|
||||
{
|
||||
unsigned int divider = cycles, prescaler_bit = 0, prescaler = 1, old_irq;
|
||||
|
||||
|
|
@ -79,14 +79,14 @@ bool __timer_set(long cycles, bool start)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool __timer_start(void)
|
||||
bool timer_start(void)
|
||||
{
|
||||
__tcu_start_counter(1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void __timer_stop(void)
|
||||
void timer_stop(void)
|
||||
{
|
||||
unsigned int old_irq = disable_irq_save();
|
||||
__tcu_stop_counter(1);
|
||||
|
|
|
|||
|
|
@ -26,17 +26,4 @@
|
|||
|
||||
#define TIMER_FREQ (CFG_EXTAL) /* For full precision! */
|
||||
|
||||
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_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue