aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-nrf/src/radio/event.rs29
-rw-r--r--embassy-nrf/src/radio/ieee802154.rs2
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 {
97 feature = "nrf52811", 97 feature = "nrf52811",
98 feature = "nrf52820", 98 feature = "nrf52820",
99 feature = "nrf52833", 99 feature = "nrf52833",
100 feature = "nrf52840",
100 feature = "_nrf5340-net" 101 feature = "_nrf5340-net"
101 ))] 102 ))]
102 if radio.events_framestart.read().events_framestart().bit_is_set() { 103 if radio.events_framestart.read().events_framestart().bit_is_set() {
@@ -106,6 +107,7 @@ impl Event {
106 feature = "nrf52811", 107 feature = "nrf52811",
107 feature = "nrf52820", 108 feature = "nrf52820",
108 feature = "nrf52833", 109 feature = "nrf52833",
110 feature = "nrf52840",
109 feature = "_nrf5340-net" 111 feature = "_nrf5340-net"
110 ))] 112 ))]
111 if radio.events_edend.read().events_edend().bit_is_set() { 113 if radio.events_edend.read().events_edend().bit_is_set() {
@@ -115,20 +117,36 @@ impl Event {
115 feature = "nrf52811", 117 feature = "nrf52811",
116 feature = "nrf52820", 118 feature = "nrf52820",
117 feature = "nrf52833", 119 feature = "nrf52833",
120 feature = "nrf52840",
118 feature = "_nrf5340-net" 121 feature = "_nrf5340-net"
119 ))] 122 ))]
120 if radio.events_edstopped.read().events_edstopped().bit_is_set() { 123 if radio.events_edstopped.read().events_edstopped().bit_is_set() {
121 value |= Self::ED_STOPPED; 124 value |= Self::ED_STOPPED;
122 } 125 }
123 #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] 126 #[cfg(any(
127 feature = "nrf52820",
128 feature = "nrf52833",
129 feature = "nrf52840",
130 feature = "_nrf5340-net"
131 ))]
124 if radio.events_ccaidle.read().events_ccaidle().bit_is_set() { 132 if radio.events_ccaidle.read().events_ccaidle().bit_is_set() {
125 value |= Self::CCA_IDLE; 133 value |= Self::CCA_IDLE;
126 } 134 }
127 #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] 135 #[cfg(any(
136 feature = "nrf52820",
137 feature = "nrf52833",
138 feature = "nrf52840",
139 feature = "_nrf5340-net"
140 ))]
128 if radio.events_ccabusy.read().events_ccabusy().bit_is_set() { 141 if radio.events_ccabusy.read().events_ccabusy().bit_is_set() {
129 value |= Self::CCA_BUSY; 142 value |= Self::CCA_BUSY;
130 } 143 }
131 #[cfg(any(feature = "nrf52820", feature = "nrf52833", feature = "_nrf5340-net"))] 144 #[cfg(any(
145 feature = "nrf52820",
146 feature = "nrf52833",
147 feature = "nrf52840",
148 feature = "_nrf5340-net"
149 ))]
132 if radio.events_ccastopped.read().events_ccastopped().bit_is_set() { 150 if radio.events_ccastopped.read().events_ccastopped().bit_is_set() {
133 value |= Self::CCA_STOPPED; 151 value |= Self::CCA_STOPPED;
134 } 152 }
@@ -136,6 +154,7 @@ impl Event {
136 feature = "nrf52811", 154 feature = "nrf52811",
137 feature = "nrf52820", 155 feature = "nrf52820",
138 feature = "nrf52833", 156 feature = "nrf52833",
157 feature = "nrf52840",
139 feature = "_nrf5340-net" 158 feature = "_nrf5340-net"
140 ))] 159 ))]
141 if radio.events_rateboost.read().events_rateboost().bit_is_set() { 160 if radio.events_rateboost.read().events_rateboost().bit_is_set() {
@@ -146,6 +165,7 @@ impl Event {
146 feature = "nrf52811", 165 feature = "nrf52811",
147 feature = "nrf52820", 166 feature = "nrf52820",
148 feature = "nrf52833", 167 feature = "nrf52833",
168 feature = "nrf52840",
149 feature = "_nrf5340-net" 169 feature = "_nrf5340-net"
150 ))] 170 ))]
151 if radio.events_txready.read().events_txready().bit_is_set() { 171 if radio.events_txready.read().events_txready().bit_is_set() {
@@ -156,6 +176,7 @@ impl Event {
156 feature = "nrf52811", 176 feature = "nrf52811",
157 feature = "nrf52820", 177 feature = "nrf52820",
158 feature = "nrf52833", 178 feature = "nrf52833",
179 feature = "nrf52840",
159 feature = "_nrf5340-net" 180 feature = "_nrf5340-net"
160 ))] 181 ))]
161 if radio.events_rxready.read().events_rxready().bit_is_set() { 182 if radio.events_rxready.read().events_rxready().bit_is_set() {
@@ -165,6 +186,7 @@ impl Event {
165 feature = "nrf52811", 186 feature = "nrf52811",
166 feature = "nrf52820", 187 feature = "nrf52820",
167 feature = "nrf52833", 188 feature = "nrf52833",
189 feature = "nrf52840",
168 feature = "_nrf5340-net" 190 feature = "_nrf5340-net"
169 ))] 191 ))]
170 if radio.events_mhrmatch.read().events_mhrmatch().bit_is_set() { 192 if radio.events_mhrmatch.read().events_mhrmatch().bit_is_set() {
@@ -179,6 +201,7 @@ impl Event {
179 feature = "nrf52811", 201 feature = "nrf52811",
180 feature = "nrf52820", 202 feature = "nrf52820",
181 feature = "nrf52833", 203 feature = "nrf52833",
204 feature = "nrf52840",
182 feature = "_nrf5340-net" 205 feature = "_nrf5340-net"
183 ))] 206 ))]
184 if radio.events_phyend.read().events_phyend().bit_is_set() { 207 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> {
164 } 164 }
165 } 165 }
166 166
167 /// Changes the Start of Frame Delimiter 167 /// Changes the Start of Frame Delimiter (SFD)
168 pub fn set_sfd(&mut self, sfd: u8) { 168 pub fn set_sfd(&mut self, sfd: u8) {
169 let r = T::regs(); 169 let r = T::regs();
170 r.sfd.write(|w| unsafe { w.sfd().bits(sfd) }); 170 r.sfd.write(|w| unsafe { w.sfd().bits(sfd) });