Merge pull request #1769 from embassy-rs/spim-disable-irq-on-drop

fix: ensure spi irq is disabled when dropped
This commit is contained in:
Dario Nieuwenhuis 2023-08-10 21:46:06 +00:00 committed by GitHub
commit c1da2c0219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.miso.read().bits());
gpio::deconfigure_pin(r.psel.mosi.read().bits()); gpio::deconfigure_pin(r.psel.mosi.read().bits());
// Disable all events interrupts
T::Interrupt::disable();
trace!("spim drop: done"); trace!("spim drop: done");
} }
} }