From 7d8e3951ba3ff3a89df1d21210c4a76686d4f142 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Thu, 10 Aug 2023 22:18:26 +0200 Subject: [PATCH] fix: ensure spi irq is disabled when dropped --- embassy-nrf/src/spim.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/embassy-nrf/src/spim.rs b/embassy-nrf/src/spim.rs index 4673a017..d131a43d 100644 --- a/embassy-nrf/src/spim.rs +++ b/embassy-nrf/src/spim.rs @@ -378,6 +378,9 @@ impl<'d, T: Instance> Drop for Spim<'d, T> { gpio::deconfigure_pin(r.psel.miso.read().bits()); gpio::deconfigure_pin(r.psel.mosi.read().bits()); + // Disable all events interrupts + T::Interrupt::disable(); + trace!("spim drop: done"); } }