From 5f7e0eb2aea6f7f6e23d9a5b7400b29377e57d8e Mon Sep 17 00:00:00 2001 From: Zoey Riordan Date: Wed, 21 Sep 2022 14:06:56 +0200 Subject: [PATCH] Fix builds on other nrf pacs --- embassy-nrf/src/buffered_uarte.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs index e212e989..eb0b1b0c 100644 --- a/embassy-nrf/src/buffered_uarte.rs +++ b/embassy-nrf/src/buffered_uarte.rs @@ -431,13 +431,13 @@ impl<'a, U: UarteInstance, T: TimerInstance> Drop for StateInner<'a, U, T> { r.inten.reset(); r.events_rxto.reset(); - r.tasks_stoprx.write(|w| w.tasks_stoprx().set_bit()); + r.tasks_stoprx.write(|w| unsafe { w.bits(1) }); r.events_txstopped.reset(); - r.tasks_stoptx.write(|w| w.tasks_stoptx().set_bit()); - while !r.events_txstopped.read().events_txstopped().bit_is_set() {} + r.tasks_stoptx.write(|w| unsafe { w.bits(1) }); + while r.events_txstopped.read().bits() == 0 {} - while !r.events_rxto.read().events_rxto().bit_is_set() {} + while r.events_rxto.read().bits() == 0 {} r.enable.write(|w| w.enable().disabled());