rp/pio: disable state machines on drop
This commit is contained in:
parent
62841dd5b9
commit
17e78175a6
@ -324,6 +324,9 @@ pub struct PioStateMachineInstance<'d, PIO: PioInstance, const SM: usize> {
|
||||
|
||||
impl<'d, PIO: PioInstance, const SM: usize> Drop for PioStateMachineInstance<'d, PIO, SM> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
PIO::PIO.ctrl().write_clear(|w| w.set_sm_enable(1 << SM));
|
||||
}
|
||||
on_pio_drop::<PIO>();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user