aboutsummaryrefslogtreecommitdiff
path: root/stmhal/systick.h
diff options
context:
space:
mode:
authorDave Hylands2014-08-23 12:21:12 -0700
committerDamien George2014-08-25 17:38:55 +0100
commit2bf044442eae7dbdaff91051d2c135b4aa51f1b2 (patch)
treef22d657138d316cc1e3b1669d001c90d14809741 /stmhal/systick.h
parent8c0add4eeeb77b8b4c6cb5a0313e6f06b0a62d32 (diff)
Add support for pyb.micros() by using the systick timer.
I also removed trailing spaces from modpyb.c which affected a couple of lines technically not part of this patch. Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py which eventually fails due to wraparound issues (I could fix the test to compensate but didn't bother)
Diffstat (limited to 'stmhal/systick.h')
-rw-r--r--stmhal/systick.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/systick.h b/stmhal/systick.h
index 1e7f62335..98045d16c 100644
--- a/stmhal/systick.h
+++ b/stmhal/systick.h
@@ -26,3 +26,4 @@
void sys_tick_wait_at_least(uint32_t stc, uint32_t delay_ms);
bool sys_tick_has_passed(uint32_t stc, uint32_t delay_ms);
+uint32_t sys_tick_get_microseconds(void);