From 9872b3975bd40c55652bb9dead5f54e2be9740d0 Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Thu, 10 Mar 2011 00:04:58 -0500 Subject: Fix merge error and compile error. --- wirish/time.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'wirish/time.c') 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); } -- cgit v1.2.3