summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/mphalport.h
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/mphalport.h')
-rw-r--r--stmhal/mphalport.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/mphalport.h b/stmhal/mphalport.h
index d342f96e17..29a9fd6c39 100644
--- a/stmhal/mphalport.h
+++ b/stmhal/mphalport.h
@@ -34,12 +34,12 @@ extern const unsigned char mp_hal_status_to_errno_table[4];
NORETURN void mp_hal_raise(HAL_StatusTypeDef status);
void mp_hal_set_interrupt_char(int c); // -1 to disable
-#define mp_hal_delay_ms HAL_Delay
-#define mp_hal_ticks_ms HAL_GetTick
-
-// needed for machine.I2C
+// timing functions
#include "stmhal/systick.h"
+#define mp_hal_delay_ms HAL_Delay
#define mp_hal_delay_us_fast(us) sys_tick_udelay(us)
+#define mp_hal_ticks_ms HAL_GetTick
+#define mp_hal_ticks_us() sys_tick_get_microseconds()
// C-level pin HAL
#include "stmhal/pin.h"