From a97284423eba9470c16c5f02fadea14bd8263751 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 14 Oct 2016 20:13:02 +0300 Subject: extmod/utime_mphal: Factor out implementations in terms of mp_hal_* for reuse. As long as a port implement mp_hal_sleep_ms(), mp_hal_ticks_ms(), etc. functions, it can just use standard implementations of utime.sleel_ms(), utime.ticks_ms(), etc. Python-level functions. --- py/mphal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'py/mphal.h') diff --git a/py/mphal.h b/py/mphal.h index 54a45b0240..8d5654f9e3 100644 --- a/py/mphal.h +++ b/py/mphal.h @@ -66,6 +66,10 @@ mp_uint_t mp_hal_ticks_ms(void); mp_uint_t mp_hal_ticks_us(void); #endif +#ifndef mp_hal_ticks_cpu +mp_uint_t mp_hal_ticks_cpu(void); +#endif + // If port HAL didn't define its own pin API, use generic // "virtual pin" API from the core. #ifndef mp_hal_pin_obj_t -- cgit v1.2.3