aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorPerry Hung <iperry@gmail.com>2011-03-21 02:45:58 -0400
committerPerry Hung <iperry@gmail.com>2011-03-21 02:47:53 -0400
commit7241820179bb729d14900676fbff943f7f44cb97 (patch)
treed60a38f908eda00b934b6d3452f6a777c4277be6 /wirish
parent1591fc9e3f851327c16bbcb88e6abee1706f9cfc (diff)
parentc73306508820705eef4f2cb9f8542acdba599cd8 (diff)
downloadlibrambutan-7241820179bb729d14900676fbff943f7f44cb97.tar.gz
librambutan-7241820179bb729d14900676fbff943f7f44cb97.zip
Merge branch 'i2c-wip' into refactor
Conflicts: examples/test-fsmc.cpp libmaple/rules.mk wirish/boards.h
Diffstat (limited to 'wirish')
-rw-r--r--wirish/time.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/wirish/time.cpp b/wirish/time.cpp
index c0a0649..b5663b0 100644
--- a/wirish/time.cpp
+++ b/wirish/time.cpp
@@ -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);
}