From 35febae570ef6b89eb52948ee13684754b23da4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20B=C3=A5nvik?= Date: Thu, 29 Feb 2024 01:31:07 +0100 Subject: [PATCH] Fixed missing nrf52840 in Event --- embassy-nrf/src/radio/event.rs | 29 ++++++++++++++++++++++++++--- embassy-nrf/src/radio/ieee802154.rs | 2 +- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/embassy-nrf/src/radio/event.rs b/embassy-nrf/src/radio/event.rs index 11056b4d8..8fb0958d5 100644 --- a/embassy-nrf/src/radio/event.rs +++ b/embassy-nrf/src/radio/event.rs @@ -97,6 +97,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_framestart.read().events_framestart().bit_is_set() { @@ -106,6 +107,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_edend.read().events_edend().bit_is_set() { @@ -115,20 +117,36 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_edstopped.read().events_edstopped().bit_is_set() { value |= Self::ED_STOPPED; } - #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] + #[cfg(any( + feature = "nrf52820", + feature = "nrf52833", + feature = "nrf52840", + feature = "_nrf5340-net" + ))] if radio.events_ccaidle.read().events_ccaidle().bit_is_set() { value |= Self::CCA_IDLE; } - #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] + #[cfg(any( + feature = "nrf52820", + feature = "nrf52833", + feature = "nrf52840", + feature = "_nrf5340-net" + ))] if radio.events_ccabusy.read().events_ccabusy().bit_is_set() { value |= Self::CCA_BUSY; } - #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] + #[cfg(any( + feature = "nrf52820", + feature = "nrf52833", + feature = "nrf52840", + feature = "_nrf5340-net" + ))] if radio.events_ccastopped.read().events_ccastopped().bit_is_set() { value |= Self::CCA_STOPPED; } @@ -136,6 +154,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_rateboost.read().events_rateboost().bit_is_set() { @@ -146,6 +165,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_txready.read().events_txready().bit_is_set() { @@ -156,6 +176,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_rxready.read().events_rxready().bit_is_set() { @@ -165,6 +186,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_mhrmatch.read().events_mhrmatch().bit_is_set() { @@ -179,6 +201,7 @@ impl Event { feature = "nrf52811", feature = "nrf52820", feature = "nrf52833", + feature = "nrf52840", feature = "_nrf5340-net" ))] if radio.events_phyend.read().events_phyend().bit_is_set() { diff --git a/embassy-nrf/src/radio/ieee802154.rs b/embassy-nrf/src/radio/ieee802154.rs index 4d7949cb3..adc6f8aaa 100644 --- a/embassy-nrf/src/radio/ieee802154.rs +++ b/embassy-nrf/src/radio/ieee802154.rs @@ -164,7 +164,7 @@ impl<'d, T: Instance> Radio<'d, T> { } } - /// Changes the Start of Frame Delimiter + /// Changes the Start of Frame Delimiter (SFD) pub fn set_sfd(&mut self, sfd: u8) { let r = T::regs(); r.sfd.write(|w| unsafe { w.sfd().bits(sfd) });