diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-stm32-wpan/src/lib.rs | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-stm32-wpan/src/lib.rs')
| -rw-r--r-- | embassy-stm32-wpan/src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/embassy-stm32-wpan/src/lib.rs b/embassy-stm32-wpan/src/lib.rs index 25e6d965a..40ff14795 100644 --- a/embassy-stm32-wpan/src/lib.rs +++ b/embassy-stm32-wpan/src/lib.rs | |||
| @@ -23,7 +23,7 @@ mod fmt; | |||
| 23 | use core::mem::MaybeUninit; | 23 | use core::mem::MaybeUninit; |
| 24 | use core::sync::atomic::{compiler_fence, Ordering}; | 24 | use core::sync::atomic::{compiler_fence, Ordering}; |
| 25 | 25 | ||
| 26 | use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; | 26 | use embassy_hal_internal::Peri; |
| 27 | use embassy_stm32::interrupt; | 27 | use embassy_stm32::interrupt; |
| 28 | use embassy_stm32::ipcc::{Config, Ipcc, ReceiveInterruptHandler, TransmitInterruptHandler}; | 28 | use embassy_stm32::ipcc::{Config, Ipcc, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 29 | use embassy_stm32::peripherals::IPCC; | 29 | use embassy_stm32::peripherals::IPCC; |
| @@ -52,7 +52,7 @@ type PacketHeader = LinkedListNode; | |||
| 52 | 52 | ||
| 53 | /// Transport Layer for the Mailbox interface | 53 | /// Transport Layer for the Mailbox interface |
| 54 | pub struct TlMbox<'d> { | 54 | pub struct TlMbox<'d> { |
| 55 | _ipcc: PeripheralRef<'d, IPCC>, | 55 | _ipcc: Peri<'d, IPCC>, |
| 56 | 56 | ||
| 57 | pub sys_subsystem: Sys, | 57 | pub sys_subsystem: Sys, |
| 58 | pub mm_subsystem: MemoryManager, | 58 | pub mm_subsystem: MemoryManager, |
| @@ -92,13 +92,11 @@ impl<'d> TlMbox<'d> { | |||
| 92 | /// Figure 66. | 92 | /// Figure 66. |
| 93 | // TODO: document what the user should do after calling init to use the mac_802_15_4 subsystem | 93 | // TODO: document what the user should do after calling init to use the mac_802_15_4 subsystem |
| 94 | pub fn init( | 94 | pub fn init( |
| 95 | ipcc: impl Peripheral<P = IPCC> + 'd, | 95 | ipcc: Peri<'d, IPCC>, |
| 96 | _irqs: impl interrupt::typelevel::Binding<interrupt::typelevel::IPCC_C1_RX, ReceiveInterruptHandler> | 96 | _irqs: impl interrupt::typelevel::Binding<interrupt::typelevel::IPCC_C1_RX, ReceiveInterruptHandler> |
| 97 | + interrupt::typelevel::Binding<interrupt::typelevel::IPCC_C1_TX, TransmitInterruptHandler>, | 97 | + interrupt::typelevel::Binding<interrupt::typelevel::IPCC_C1_TX, TransmitInterruptHandler>, |
| 98 | config: Config, | 98 | config: Config, |
| 99 | ) -> Self { | 99 | ) -> Self { |
| 100 | into_ref!(ipcc); | ||
| 101 | |||
| 102 | // this is an inlined version of TL_Init from the STM32WB firmware as requested by AN5289. | 100 | // this is an inlined version of TL_Init from the STM32WB firmware as requested by AN5289. |
| 103 | // HW_IPCC_Init is not called, and its purpose is (presumably?) covered by this | 101 | // HW_IPCC_Init is not called, and its purpose is (presumably?) covered by this |
| 104 | // implementation | 102 | // implementation |
