diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-03-30 21:15:15 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-03-30 21:15:15 +0000 |
commit | 75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac (patch) | |
tree | 30d308bcc748733e5eefd7684aafa2d7e62c67a1 /firmware/target/arm/tcc780x/system-target.h | |
parent | 8739af490e03e243848720c5987f566a56479136 (diff) | |
download | rockbox-75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac.tar.gz rockbox-75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac.zip |
TCC78x: Implement the user timer, rework some of the timer register #defines, and use udelay() instead of the hacky sleep_ms() in the D2 LCD driver. Doom works now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20585 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x/system-target.h')
-rw-r--r-- | firmware/target/arm/tcc780x/system-target.h | 6 |
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 @@ | |||
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() */ | 37 | /* TC32 is configured to 1MHz in clock_init() */ |
38 | #define USEC_TIMER TC32MCNT | ||
39 | |||
38 | static inline void udelay(unsigned usecs) | 40 | static inline void udelay(unsigned usecs) |
39 | { | 41 | { |
40 | unsigned stop = TC32MCNT + usecs; | 42 | unsigned stop = USEC_TIMER + usecs; |
41 | while (TIME_BEFORE(TC32MCNT, stop)); | 43 | while (TIME_BEFORE(USEC_TIMER, stop)); |
42 | } | 44 | } |
43 | 45 | ||
44 | #endif /* SYSTEM_TARGET_H */ | 46 | #endif /* SYSTEM_TARGET_H */ |