aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-nrf/src/uarte.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index 586c88b2d..032089635 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -791,20 +791,18 @@ impl<'d, T: Instance, U: TimerInstance> UarteRxWithIdle<'d, T, U> {
791 } 791 }
792} 792}
793 793
794#[cfg(not(any(feature = "_nrf9160", feature = "nrf5340")))] 794#[cfg(not(any(feature = "_nrf9160", feature = "_nrf5340")))]
795pub(crate) fn apply_workaround_for_enable_anomaly(_r: &crate::pac::uarte0::RegisterBlock) { 795pub(crate) fn apply_workaround_for_enable_anomaly(_r: &crate::pac::uarte0::RegisterBlock) {
796 // Do nothing 796 // Do nothing
797} 797}
798 798
799#[cfg(any(feature = "_nrf9160", feature = "nrf5340"))] 799#[cfg(any(feature = "_nrf9160", feature = "_nrf5340"))]
800pub(crate) fn apply_workaround_for_enable_anomaly(r: &crate::pac::uarte0::RegisterBlock) { 800pub(crate) fn apply_workaround_for_enable_anomaly(r: &crate::pac::uarte0::RegisterBlock) {
801 use core::ops::Deref;
802
803 // Apply workaround for anomalies: 801 // Apply workaround for anomalies:
804 // - nRF9160 - anomaly 23 802 // - nRF9160 - anomaly 23
805 // - nRF5340 - anomaly 44 803 // - nRF5340 - anomaly 44
806 let rxenable_reg: *const u32 = ((r.deref() as *const _ as usize) + 0x564) as *const u32; 804 let rxenable_reg: *const u32 = ((r as *const _ as usize) + 0x564) as *const u32;
807 let txenable_reg: *const u32 = ((r.deref() as *const _ as usize) + 0x568) as *const u32; 805 let txenable_reg: *const u32 = ((r as *const _ as usize) + 0x568) as *const u32;
808 806
809 // NB Safety: This is taken from Nordic's driver - 807 // NB Safety: This is taken from Nordic's driver -
810 // https://github.com/NordicSemiconductor/nrfx/blob/master/drivers/src/nrfx_uarte.c#L197 808 // https://github.com/NordicSemiconductor/nrfx/blob/master/drivers/src/nrfx_uarte.c#L197