embassy-stm32

Crates

git

Versions

stm32h745xi-cm4

Flavors

📣 We want to hear from you! Fill the Rust Embedded 2024 micro-survey.

Function embassy_stm32::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.