nrf/buffered_uarte: fix stop not actually waiting for stop

This commit is contained in:
Dario Nieuwenhuis 2021-01-11 11:24:34 +01:00
parent 41160c0d8d
commit 7b94e06306

View file

@ -323,10 +323,10 @@ impl<'a, U: Instance, T: TimerInstance, P1: ConfigurablePpi, P2: ConfigurablePpi
self.uarte.tasks_stoptx.write(|w| unsafe { w.bits(1) });
}
if let RxState::Receiving = self.rx_state {
low_power_wait_until(|| self.uarte.events_endrx.read().bits() == 0);
low_power_wait_until(|| self.uarte.events_endrx.read().bits() == 1);
}
if let TxState::Transmitting(_) = self.tx_state {
low_power_wait_until(|| self.uarte.events_endtx.read().bits() == 0);
low_power_wait_until(|| self.uarte.events_endtx.read().bits() == 1);
}
}
}