summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc77x/system-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc77x/system-target.h')
-rw-r--r--firmware/target/arm/tcc77x/system-target.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc77x/system-target.h b/firmware/target/arm/tcc77x/system-target.h
index 16cfb9127d..55dd52ef47 100644
--- a/firmware/target/arm/tcc77x/system-target.h
+++ b/firmware/target/arm/tcc77x/system-target.h
@@ -34,4 +34,13 @@
34#define inw(a) (*(volatile unsigned short *) (a)) 34#define inw(a) (*(volatile unsigned short *) (a))
35#define outw(a,b) (*(volatile unsigned short *) (b) = (a)) 35#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
36 36
37/* TC32 is configured to 1MHz in clock_init() */
38#define USEC_TIMER TC32MCNT
39
40static inline void udelay(unsigned usecs)
41{
42 unsigned stop = USEC_TIMER + usecs;
43 while (TIME_BEFORE(USEC_TIMER, stop));
44}
45
37#endif /* SYSTEM_TARGET_H */ 46#endif /* SYSTEM_TARGET_H */