Skip to content

Commit

Permalink
Merge pull request #5509 from DavePutz/issue_5469
Browse files Browse the repository at this point in the history
Added reset of pulsein buffer pointer
  • Loading branch information
dhalbert committed Oct 25, 2021
2 parents 66e7dbe + d2febfa commit 644272e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/raspberrypi/common-hal/pulseio/PulseIn.c
Expand Up @@ -165,6 +165,8 @@ void common_hal_pulseio_pulsein_interrupt(pulseio_pulsein_obj_t *self) {
pio_sm_init(self->state_machine.pio, self->state_machine.state_machine, self->state_machine.offset, &self->state_machine.sm_config);
pio_sm_restart(self->state_machine.pio,self->state_machine.state_machine);
pio_sm_set_enabled(self->state_machine.pio, self->state_machine.state_machine, true);
self->buf_index = 0;
self->start = 0;
}
}
void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t *self,
Expand Down

0 comments on commit 644272e

Please sign in to comment.