Ulf Lilleengen c501b162fc Enable clock by default for stm32l0
Modify init function to return a Clock instance defined by a per-chip
SystemClock type and use this in macro setup

A proof of concept implementation for STM32 L0 chips.

This allows using embassy::main macros for STM32 devices that have the
clock setup logic.
2021-05-26 12:33:07 +02:00

16 lines
362 B
Rust

cfg_if::cfg_if! {
if #[cfg(feature = "_stm32h7")] {
mod h7;
pub use h7::*;
} else if #[cfg(feature = "_stm32l0")] {
mod l0;
pub use l0::*;
} else {
pub type SystemClock = ();
#[derive(Default)]
pub struct Config {}
pub unsafe fn init(_config: Config) -> SystemClock {
}
}
}