pulsein works on m4

This commit is contained in:
Scott Shawcroft 2018-02-15 15:12:58 -08:00
parent 07230f2637
commit fcde138ea3
1 changed files with 3 additions and 0 deletions

View File

@ -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);