From 89a23a05b3feb2f81fb00d272202b274c2a325cd Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 24 Jun 2019 13:18:43 +1000 Subject: esp8266: Provide custom machine_time_pulse_us that feeds soft WDT. So that the timeout for machine.time_pulse_us() can be large. Fixes issue #2775. --- extmod/machine_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod') diff --git a/extmod/machine_pulse.c b/extmod/machine_pulse.c index 5f837479d..7178b22d7 100644 --- a/extmod/machine_pulse.c +++ b/extmod/machine_pulse.c @@ -30,7 +30,7 @@ #if MICROPY_PY_MACHINE_PULSE -mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t timeout_us) { +MP_WEAK mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t timeout_us) { mp_uint_t start = mp_hal_ticks_us(); while (mp_hal_pin_read(pin) != pulse_level) { if ((mp_uint_t)(mp_hal_ticks_us() - start) >= timeout_us) { -- cgit v1.2.3