embassy-stm32

Crates

git

Versions

stm32h755ii-cm4

Flavors

embassy_stm32

Function init_secondary

Source
pub fn init_secondary(
    shared_data: &'static MaybeUninit<SharedData>,
) -> Peripherals
Expand description

Initialize the embassy-stm32 HAL based on the init done by the other core using init_primary.

This returns the peripheral singletons that can be used for creating drivers when the other core is done with its init. If the other core is not done yet, this will spinloop wait on it.

This should only be called once at startup, otherwise it may panic.

The shared_data is used to coordinate the init with the second core. Read the SharedData docs for more information on its requirements.