mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
nrf/uarte: deconfigure pins on drop
This commit is contained in:
parent
11f9ad6867
commit
39c420733f
@ -15,7 +15,7 @@ use futures::future::poll_fn;
|
||||
use crate::chip::EASY_DMA_SIZE;
|
||||
use crate::fmt::{assert, panic, *};
|
||||
use crate::gpio::sealed::Pin as _;
|
||||
use crate::gpio::{OptionalPin as GpioOptionalPin, Pin as GpioPin};
|
||||
use crate::gpio::{self, OptionalPin as GpioOptionalPin, Pin as GpioPin};
|
||||
use crate::interrupt::Interrupt;
|
||||
use crate::pac;
|
||||
use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task};
|
||||
@ -166,9 +166,12 @@ impl<'a, T: Instance> Drop for Uarte<'a, T> {
|
||||
// Finally we can disable!
|
||||
r.enable.write(|w| w.enable().disabled());
|
||||
|
||||
info!("uarte drop: done");
|
||||
gpio::deconfigure_pin(r.psel.rxd.read().bits());
|
||||
gpio::deconfigure_pin(r.psel.txd.read().bits());
|
||||
gpio::deconfigure_pin(r.psel.rts.read().bits());
|
||||
gpio::deconfigure_pin(r.psel.cts.read().bits());
|
||||
|
||||
// TODO: disable pins
|
||||
info!("uarte drop: done");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user