summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/timer-as3525.c6
-rw-r--r--firmware/target/arm/as3525/timer-target.h13
2 files changed, 3 insertions, 16 deletions
diff --git a/firmware/target/arm/as3525/timer-as3525.c b/firmware/target/arm/as3525/timer-as3525.c
index 50f0e73158..673e3b8f47 100644
--- a/firmware/target/arm/as3525/timer-as3525.c
+++ b/firmware/target/arm/as3525/timer-as3525.c
@@ -31,7 +31,7 @@ void INT_TIMER1(void)
31 TIMER1_INTCLR = 0; /* clear interrupt */ 31 TIMER1_INTCLR = 0; /* clear interrupt */
32} 32}
33 33
34bool __timer_set(long cycles, bool start) 34bool timer_set(long cycles, bool start)
35{ 35{
36 if (start) 36 if (start)
37 { 37 {
@@ -53,14 +53,14 @@ bool __timer_set(long cycles, bool start)
53 return true; 53 return true;
54} 54}
55 55
56bool __timer_start(void) 56bool timer_start(void)
57{ 57{
58 CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */ 58 CGU_PERI |= CGU_TIMER1_CLOCK_ENABLE; /* enable peripheral */
59 VIC_INT_ENABLE |= INTERRUPT_TIMER1; 59 VIC_INT_ENABLE |= INTERRUPT_TIMER1;
60 return true; 60 return true;
61} 61}
62 62
63void __timer_stop(void) 63void timer_stop(void)
64{ 64{
65 TIMER1_CONTROL &= 0x10; /* disable timer 1 (don't modify bit 4) */ 65 TIMER1_CONTROL &= 0x10; /* disable timer 1 (don't modify bit 4) */
66 VIC_INT_EN_CLEAR = INTERRUPT_TIMER1; /* disable interrupt */ 66 VIC_INT_EN_CLEAR = INTERRUPT_TIMER1; /* disable interrupt */
diff --git a/firmware/target/arm/as3525/timer-target.h b/firmware/target/arm/as3525/timer-target.h
index b1bdfed78f..f6b4fae370 100644
--- a/firmware/target/arm/as3525/timer-target.h
+++ b/firmware/target/arm/as3525/timer-target.h
@@ -21,19 +21,6 @@
21#ifndef TIMER_TARGET_H 21#ifndef TIMER_TARGET_H
22#define TIMER_TARGET_H 22#define TIMER_TARGET_H
23 23
24bool __timer_set(long cycles, bool set);
25bool __timer_start(void);
26void __timer_stop(void);
27
28#define TIMER_FREQ (24000000 / 16) 24#define TIMER_FREQ (24000000 / 16)
29 25
30#define __TIMER_SET(cycles, set) \
31 __timer_set(cycles, set)
32
33#define __TIMER_START() \
34 __timer_start()
35
36#define __TIMER_STOP(...) \
37 __timer_stop()
38
39#endif /* TIMER_TARGET_H */ 26#endif /* TIMER_TARGET_H */