From 63bac4a4c1bfb2689a6f46fb9e065b51d55b3d86 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 20 Oct 2011 23:05:33 -0400 Subject: Fix micros() bug. Thanks to ala42 for the fix. Signed-off-by: Marti Bolivar --- wirish/wirish_time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3