embassy-stm32-wpan

Crates

git

Versions

default

Flavors

embassy_stm32_wpan

Struct TlMbox

Source
pub struct TlMbox<'d> {
    pub sys_subsystem: Sys,
    pub mm_subsystem: MemoryManager,
    pub ble_subsystem: Ble,
    pub mac_subsystem: Mac,
    /* private fields */
}
Expand description

Transport Layer for the Mailbox interface

Fields§

§sys_subsystem: Sys§mm_subsystem: MemoryManager§ble_subsystem: Ble§mac_subsystem: Mac

Implementations§

Source§

impl<'d> TlMbox<'d>

Source

pub fn init( ipcc: impl Peripheral<P = IPCC> + 'd, _irqs: impl Binding<IPCC_C1_RX, ReceiveInterruptHandler> + Binding<IPCC_C1_TX, TransmitInterruptHandler>, config: Config, ) -> Self

Initialise the Transport Layer, and creates and returns a wrapper around it.

This method performs the initialisation laid out in AN5289 annex 14.1. However, it differs from the implementation documented in Figure 64, to avoid needing to reference any C function pointers.

Annex 14.1 lays out the following methods that should be called: 1. tl_mbox.c/TL_Init, which initialises the reference table that is shared between CPU1 and CPU2. 2. shci_tl.c/shci_init(), which initialises the system transport layer, and in turn calls tl_mbox.c/TL_SYS_Init, which initialises SYSTEM_EVT_QUEUE channel. 3. tl_mbox.c/TL_MM_Init(), which initialises the channel used for sending memory manager commands. 4. tl_mbox.c/TL_Enable(), which enables the IPCC, and starts CPU2. This implementation initialises all of the shared refernce tables and all IPCC channel that would be initialised by this process. The developer should therefore treat this method as completing all steps in Figure 64.

Once this method has been called, no system commands may be sent until the CPU2 ready signal is received, via [sys_subsystem.read]; this completes the procedure laid out in Figure 65.

If the ble feature is enabled, at this point, the user should call [sys_subsystem.shci_c2_ble_init], before any commands are written to the [TlMbox.ble_subsystem] (sub::ble::Ble::new() completes the process that would otherwise be handled by TL_BLE_Init; see Figure 66). This completes the procedure laid out in Figure 66.

Auto Trait Implementations§

§

impl<'d> Freeze for TlMbox<'d>

§

impl<'d> RefUnwindSafe for TlMbox<'d>

§

impl<'d> Send for TlMbox<'d>

§

impl<'d> Sync for TlMbox<'d>

§

impl<'d> Unpin for TlMbox<'d>

§

impl<'d> !UnwindSafe for TlMbox<'d>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.