embassy-stm32

Crates

git

Versions

stm32h755ii-cm7

Flavors

embassy_stm32

Function init_primary

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

Initialize the embassy-stm32 HAL with the provided configuration. This function does the actual initialization of the hardware, in contrast to init_secondary or try_init_secondary. Any core can do the init, but it’s important only one core does it.

This returns the peripheral singletons that can be used for creating drivers.

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

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