diff options
Diffstat (limited to 'embassy-nrf/src/radio/ieee802154.rs')
| -rw-r--r-- | embassy-nrf/src/radio/ieee802154.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/embassy-nrf/src/radio/ieee802154.rs b/embassy-nrf/src/radio/ieee802154.rs index 2f0bcbe04..7f4f8f462 100644 --- a/embassy-nrf/src/radio/ieee802154.rs +++ b/embassy-nrf/src/radio/ieee802154.rs | |||
| @@ -5,10 +5,11 @@ use core::task::Poll; | |||
| 5 | 5 | ||
| 6 | use embassy_hal_internal::drop::OnDrop; | 6 | use embassy_hal_internal::drop::OnDrop; |
| 7 | 7 | ||
| 8 | use super::{state, Error, Instance, InterruptHandler, RadioState, TxPower}; | 8 | use super::{Error, Instance, InterruptHandler, TxPower}; |
| 9 | use crate::interrupt::typelevel::Interrupt; | 9 | use crate::interrupt::typelevel::Interrupt; |
| 10 | use crate::interrupt::{self}; | 10 | use crate::interrupt::{self}; |
| 11 | use crate::pac::radio::vals; | 11 | use crate::pac::radio::vals; |
| 12 | pub use crate::pac::radio::vals::State as RadioState; | ||
| 12 | use crate::Peri; | 13 | use crate::Peri; |
| 13 | 14 | ||
| 14 | /// Default (IEEE compliant) Start of Frame Delimiter | 15 | /// Default (IEEE compliant) Start of Frame Delimiter |
| @@ -200,7 +201,7 @@ impl<'d, T: Instance> Radio<'d, T> { | |||
| 200 | 201 | ||
| 201 | /// Get the current radio state | 202 | /// Get the current radio state |
| 202 | fn state(&self) -> RadioState { | 203 | fn state(&self) -> RadioState { |
| 203 | state(T::regs()) | 204 | T::regs().state().read().state() |
| 204 | } | 205 | } |
| 205 | 206 | ||
| 206 | /// Moves the radio from any state to the DISABLED state | 207 | /// Moves the radio from any state to the DISABLED state |
| @@ -293,7 +294,7 @@ impl<'d, T: Instance> Radio<'d, T> { | |||
| 293 | r.shorts().write(|_| {}); | 294 | r.shorts().write(|_| {}); |
| 294 | r.tasks_stop().write_value(1); | 295 | r.tasks_stop().write_value(1); |
| 295 | loop { | 296 | loop { |
| 296 | match state(r) { | 297 | match r.state().read().state() { |
| 297 | RadioState::DISABLED | RadioState::RX_IDLE => break, | 298 | RadioState::DISABLED | RadioState::RX_IDLE => break, |
| 298 | _ => (), | 299 | _ => (), |
| 299 | } | 300 | } |
