fix: ensure spi irq is disabled when dropped

This commit is contained in:
Ulf Lilleengen 2023-08-10 22:18:26 +02:00
parent 5d5cd23715
commit 7d8e3951ba

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