From fcde138ea358cfdcf8e7c315e9f3b8c33986ae7e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 15 Feb 2018 15:12:58 -0800 Subject: pulsein works on m4 --- ports/atmel-samd/common-hal/pulseio/PulseIn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/atmel-samd/common-hal/pulseio/PulseIn.c b/ports/atmel-samd/common-hal/pulseio/PulseIn.c index d8d3e56c9..72a2a2cef 100644 --- a/ports/atmel-samd/common-hal/pulseio/PulseIn.c +++ b/ports/atmel-samd/common-hal/pulseio/PulseIn.c @@ -236,6 +236,9 @@ void common_hal_pulseio_pulsein_pause(pulseio_pulsein_obj_t* self) { void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t* self, uint16_t trigger_duration) { + // Make sure we're paused. + common_hal_pulseio_pulsein_pause(self); + // Send the trigger pulse. if (trigger_duration > 0) { gpio_set_pin_pull_mode(self->pin, GPIO_PULL_OFF); -- cgit v1.2.3