summaryrefslogtreecommitdiff
path: root/firmware/target/sh/archos
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-29 14:29:57 +0000
commitc5dedd7d762f48e940ecc0bd17dd2173d59a92e1 (patch)
treecd4d9dc085b4c40f281f17953a3e126dd1c0c02b /firmware/target/sh/archos
parent89ccd5c145e45ad541a02f38e2ad07fb916f7135 (diff)
downloadrockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.tar.gz
rockbox-c5dedd7d762f48e940ecc0bd17dd2173d59a92e1.zip
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
Diffstat (limited to 'firmware/target/sh/archos')
-rw-r--r--firmware/target/sh/archos/timer-archos.c6
-rw-r--r--firmware/target/sh/archos/timer-target.h13
2 files changed, 3 insertions, 16 deletions
diff --git a/firmware/target/sh/archos/timer-archos.c b/firmware/target/sh/archos/timer-archos.c
index c61318f721..07d63ed3a8 100644
--- a/firmware/target/sh/archos/timer-archos.c
+++ b/firmware/target/sh/archos/timer-archos.c
@@ -32,7 +32,7 @@ void IMIA4(void)
32 and_b(~0x01, &TSR4); /* clear the interrupt */ 32 and_b(~0x01, &TSR4); /* clear the interrupt */
33} 33}
34 34
35bool __timer_set(long cycles, bool start) 35bool timer_set(long cycles, bool start)
36{ 36{
37 int phi = 0; /* bits for the prescaler */ 37 int phi = 0; /* bits for the prescaler */
38 int prescale = 1; 38 int prescale = 1;
@@ -71,14 +71,14 @@ bool __timer_set(long cycles, bool start)
71 return true; 71 return true;
72} 72}
73 73
74bool __timer_start(void) 74bool timer_start(void)
75{ 75{
76 IPRD = (IPRD & 0xFF0F) | 1 << 4; /* interrupt priority */ 76 IPRD = (IPRD & 0xFF0F) | 1 << 4; /* interrupt priority */
77 or_b(0x10, &TSTR); /* start timer 4 */ 77 or_b(0x10, &TSTR); /* start timer 4 */
78 return true; 78 return true;
79} 79}
80 80
81void __timer_stop(void) 81void timer_stop(void)
82{ 82{
83 and_b(~0x10, &TSTR); /* stop the timer 4 */ 83 and_b(~0x10, &TSTR); /* stop the timer 4 */
84 IPRD = (IPRD & 0xFF0F); /* disable interrupt */ 84 IPRD = (IPRD & 0xFF0F); /* disable interrupt */
diff --git a/firmware/target/sh/archos/timer-target.h b/firmware/target/sh/archos/timer-target.h
index 89dfe57eb3..6cdd442917 100644
--- a/firmware/target/sh/archos/timer-target.h
+++ b/firmware/target/sh/archos/timer-target.h
@@ -23,19 +23,6 @@
23 23
24#include "config.h" 24#include "config.h"
25 25
26bool __timer_set(long cycles, bool start);
27bool __timer_start(void);
28void __timer_stop(void);
29
30#define TIMER_FREQ CPU_FREQ 26#define TIMER_FREQ CPU_FREQ
31 27
32#define __TIMER_SET(cycles, set) \
33 __timer_set(cycles, set)
34
35#define __TIMER_START() \
36 __timer_start()
37
38#define __TIMER_STOP(...) \
39 __timer_stop()
40
41#endif /* TIMER_TARGET_H */ 28#endif /* TIMER_TARGET_H */