summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/tcc780x/system-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc780x/system-target.h')
-rw-r--r--firmware/target/arm/tcc780x/system-target.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/system-target.h b/firmware/target/arm/tcc780x/system-target.h
index 0802bb92e0..6e2e7be980 100644
--- a/firmware/target/arm/tcc780x/system-target.h
+++ b/firmware/target/arm/tcc780x/system-target.h
@@ -35,10 +35,12 @@
#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
/* TC32 is configured to 1MHz in clock_init() */
+#define USEC_TIMER TC32MCNT
+
static inline void udelay(unsigned usecs)
{
- unsigned stop = TC32MCNT + usecs;
- while (TIME_BEFORE(TC32MCNT, stop));
+ unsigned stop = USEC_TIMER + usecs;
+ while (TIME_BEFORE(USEC_TIMER, stop));
}
#endif /* SYSTEM_TARGET_H */