aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-10-20 23:05:33 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-10-20 23:05:33 -0400
commit63bac4a4c1bfb2689a6f46fb9e065b51d55b3d86 (patch)
tree03f227b2d3429f5e19acf2aba032738fc95d77a7 /wirish
parent8f97a6061ad5e7a9fe42b98f5ec1e2fa8aa7051c (diff)
downloadlibrambutan-63bac4a4c1bfb2689a6f46fb9e065b51d55b3d86.tar.gz
librambutan-63bac4a4c1bfb2689a6f46fb9e065b51d55b3d86.zip
Fix micros() bug.
Thanks to ala42 for the fix. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish')
-rw-r--r--wirish/wirish_time.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/wirish/wirish_time.h b/wirish/wirish_time.h
index ab225e8..719a775 100644
--- a/wirish/wirish_time.h
+++ b/wirish/wirish_time.h
@@ -59,8 +59,8 @@ static inline uint32 micros(void) {
uint32 res;
do {
- cycle_cnt = systick_get_count();
ms = millis();
+ cycle_cnt = systick_get_count();
} while (ms != millis());
/* SYSTICK_RELOAD_VAL is 1 less than the number of cycles it