IncrementalEncoder: Disconnect interrupt handler during deinit.

Closes: #4557
This commit is contained in:
Jeff Epler 2021-04-04 13:48:10 -05:00
parent bcd90dd927
commit 93d6ceedd9
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o
if (common_hal_rotaryio_incrementalencoder_deinited(self)) { if (common_hal_rotaryio_incrementalencoder_deinited(self)) {
return; return;
} }
common_hal_rp2pio_statemachine_set_interrupt_handler(&self->state_machine, NULL, NULL, 0);
common_hal_rp2pio_statemachine_deinit(&self->state_machine); common_hal_rp2pio_statemachine_deinit(&self->state_machine);
} }