diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
| commit | 4901c34d9c4cd326ab9bca02dd099a663da2567f (patch) | |
| tree | 8225afebb595fb10c1d67148c0d19b7b732853da /embassy-lora/src | |
| parent | 8a9d2f59af004902d3978a2922843833b98bcce0 (diff) | |
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-lora/src')
| -rw-r--r-- | embassy-lora/src/stm32wl/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-lora/src/stm32wl/mod.rs b/embassy-lora/src/stm32wl/mod.rs index 49991db13..b0d101b77 100644 --- a/embassy-lora/src/stm32wl/mod.rs +++ b/embassy-lora/src/stm32wl/mod.rs | |||
| @@ -3,7 +3,7 @@ use core::future::Future; | |||
| 3 | use core::mem::MaybeUninit; | 3 | use core::mem::MaybeUninit; |
| 4 | 4 | ||
| 5 | use embassy::channel::signal::Signal; | 5 | use embassy::channel::signal::Signal; |
| 6 | use embassy_hal_common::{unborrow, Unborrowed}; | 6 | use embassy_hal_common::{into_ref, PeripheralRef}; |
| 7 | use embassy_stm32::dma::NoDma; | 7 | use embassy_stm32::dma::NoDma; |
| 8 | use embassy_stm32::gpio::{AnyPin, Output}; | 8 | use embassy_stm32::gpio::{AnyPin, Output}; |
| 9 | use embassy_stm32::interrupt::{InterruptExt, SUBGHZ_RADIO}; | 9 | use embassy_stm32::interrupt::{InterruptExt, SUBGHZ_RADIO}; |
| @@ -12,7 +12,7 @@ use embassy_stm32::subghz::{ | |||
| 12 | LoRaSyncWord, Ocp, PaConfig, PaSel, PacketType, RampTime, RegMode, RfFreq, SpreadingFactor as SF, StandbyClk, | 12 | LoRaSyncWord, Ocp, PaConfig, PaSel, PacketType, RampTime, RegMode, RfFreq, SpreadingFactor as SF, StandbyClk, |
| 13 | Status, SubGhz, TcxoMode, TcxoTrim, Timeout, TxParams, | 13 | Status, SubGhz, TcxoMode, TcxoTrim, Timeout, TxParams, |
| 14 | }; | 14 | }; |
| 15 | use embassy_stm32::Unborrow; | 15 | use embassy_stm32::Peripheral; |
| 16 | use lorawan_device::async_device::radio::{Bandwidth, PhyRxTx, RfConfig, RxQuality, SpreadingFactor, TxConfig}; | 16 | use lorawan_device::async_device::radio::{Bandwidth, PhyRxTx, RfConfig, RxQuality, SpreadingFactor, TxConfig}; |
| 17 | use lorawan_device::async_device::Timings; | 17 | use lorawan_device::async_device::Timings; |
| 18 | 18 | ||
| @@ -46,7 +46,7 @@ impl<'d> SubGhzState<'d> { | |||
| 46 | /// The radio peripheral keeping the radio state and owning the radio IRQ. | 46 | /// The radio peripheral keeping the radio state and owning the radio IRQ. |
| 47 | pub struct SubGhzRadio<'d> { | 47 | pub struct SubGhzRadio<'d> { |
| 48 | state: *mut StateInner<'d>, | 48 | state: *mut StateInner<'d>, |
| 49 | _irq: Unborrowed<'d, SUBGHZ_RADIO>, | 49 | _irq: PeripheralRef<'d, SUBGHZ_RADIO>, |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | impl<'d> SubGhzRadio<'d> { | 52 | impl<'d> SubGhzRadio<'d> { |
| @@ -58,9 +58,9 @@ impl<'d> SubGhzRadio<'d> { | |||
| 58 | state: &'d mut SubGhzState<'d>, | 58 | state: &'d mut SubGhzState<'d>, |
| 59 | radio: SubGhz<'d, NoDma, NoDma>, | 59 | radio: SubGhz<'d, NoDma, NoDma>, |
| 60 | switch: RadioSwitch<'d>, | 60 | switch: RadioSwitch<'d>, |
| 61 | irq: impl Unborrow<Target = SUBGHZ_RADIO> + 'd, | 61 | irq: impl Peripheral<P = SUBGHZ_RADIO> + 'd, |
| 62 | ) -> Self { | 62 | ) -> Self { |
| 63 | unborrow!(irq); | 63 | into_ref!(irq); |
| 64 | 64 | ||
| 65 | let mut inner = StateInner { radio, switch }; | 65 | let mut inner = StateInner { radio, switch }; |
| 66 | inner.radio.reset(); | 66 | inner.radio.reset(); |
