aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorPerry Hung <iperry@gmail.com>2011-03-10 00:04:58 -0500
committerPerry Hung <iperry@gmail.com>2011-03-11 00:45:33 -0500
commit9872b3975bd40c55652bb9dead5f54e2be9740d0 (patch)
tree0937d0416fc307d0de10e4c3e0916b03fb525872 /wirish
parent4651227fa9f7dece1dd24d2170db16c2e35dc04e (diff)
downloadlibrambutan-9872b3975bd40c55652bb9dead5f54e2be9740d0.tar.gz
librambutan-9872b3975bd40c55652bb9dead5f54e2be9740d0.zip
Fix merge error and compile error.
Diffstat (limited to 'wirish')
-rw-r--r--wirish/time.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/wirish/time.c b/wirish/time.c
index c0a0649..b5663b0 100644
--- a/wirish/time.c
+++ b/wirish/time.c
@@ -29,6 +29,7 @@
#include "libmaple.h"
#include "systick.h"
#include "time.h"
+#include "delay.h"
void delay(unsigned long ms) {
uint32 i;
@@ -38,15 +39,5 @@ void delay(unsigned long ms) {
}
void delayMicroseconds(uint32 us) {
- /* So (2^32)/12 micros max, or less than 6 minutes */
- us *= 12;
-
- /* fudge for function call overhead */
- us--;
- asm volatile(" mov r0, %[us] \n\t"
- "1: subs r0, #1 \n\t"
- " bhi 1b \n\t"
- :
- : [us] "r" (us)
- : "r0");
+ delay_us(us);
}