Skip to content

Commit

Permalink
Added reset of pulsein buffer pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
DavePutz committed Oct 25, 2021
1 parent 00aeb6b commit d2febfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/raspberrypi/common-hal/pulseio/PulseIn.c
Original file line number Diff line number Diff line change
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 d2febfa

Please sign in to comment.