From 93d6ceedd9ab313f4efa7df5886099039fc23165 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 4 Apr 2021 13:48:10 -0500 Subject: [PATCH] IncrementalEncoder: Disconnect interrupt handler during deinit. Closes: #4557 --- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index ee49f4e321..5c61e0915c 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -101,6 +101,7 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o if (common_hal_rotaryio_incrementalencoder_deinited(self)) { return; } + common_hal_rp2pio_statemachine_set_interrupt_handler(&self->state_machine, NULL, NULL, 0); common_hal_rp2pio_statemachine_deinit(&self->state_machine); }