From 7b94e06306a4bc0a1a31ded7de00eb30ab14ac25 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 11 Jan 2021 11:24:34 +0100 Subject: [PATCH] nrf/buffered_uarte: fix stop not actually waiting for stop --- embassy-nrf/src/buffered_uarte.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs index c5f78a56..c61d111f 100644 --- a/embassy-nrf/src/buffered_uarte.rs +++ b/embassy-nrf/src/buffered_uarte.rs @@ -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); } } }