Merge pull request #1493 from linusharberg/nrf-buffered-uarte-drop
Disable ppi group in BufferedUarte drop
This commit is contained in:
commit
a8b426d0fe
2 changed files with 3 additions and 1 deletions
|
@ -646,6 +646,8 @@ mod _embedded_io {
|
||||||
|
|
||||||
impl<'a, U: UarteInstance, T: TimerInstance> Drop for BufferedUarte<'a, U, T> {
|
impl<'a, U: UarteInstance, T: TimerInstance> Drop for BufferedUarte<'a, U, T> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
self._ppi_group.disable_all();
|
||||||
|
|
||||||
let r = U::regs();
|
let r = U::regs();
|
||||||
|
|
||||||
self.timer.stop();
|
self.timer.stop();
|
||||||
|
|
|
@ -124,7 +124,7 @@ impl<'d, T: Instance> Timer<'d, T> {
|
||||||
this.stop();
|
this.stop();
|
||||||
|
|
||||||
if is_counter {
|
if is_counter {
|
||||||
regs.mode.write(|w| w.mode().counter());
|
regs.mode.write(|w| w.mode().low_power_counter());
|
||||||
} else {
|
} else {
|
||||||
regs.mode.write(|w| w.mode().timer());
|
regs.mode.write(|w| w.mode().timer());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue