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.
This commit is contained in:
Ulf Lilleengen
2021-05-25 17:09:01 +02:00
parent a126e17fb2
commit c501b162fc
7 changed files with 614 additions and 25 deletions

View File

@ -528,6 +528,6 @@ impl<'d> Rcc<'d> {
}
}
pub unsafe fn init(config: Config) {
// TODO
}
// TODO
pub type SystemClock = ();
pub unsafe fn init(_config: Config) -> SystemClock {}