diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2018-02-15 15:12:58 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2018-02-15 15:12:58 -0800 |
| commit | fcde138ea358cfdcf8e7c315e9f3b8c33986ae7e (patch) | |
| tree | 91f71b2fab90b3665500af9e55f30247da8cfd9b | |
| parent | 07230f263789df2b7ecaaf8f82415496f9b95de2 (diff) | |
pulsein works on m4
| -rw-r--r-- | ports/atmel-samd/common-hal/pulseio/PulseIn.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |
