time: replace dyn clock/alarm with a global Driver trait

This commit is contained in:
Dario Nieuwenhuis
2021-08-03 22:08:13 +02:00
parent a4c0ee6df7
commit 0ea6a2d890
47 changed files with 663 additions and 814 deletions

View File

@ -20,13 +20,12 @@ pub mod time;
pub mod dma;
pub mod gpio;
pub mod rcc;
mod time_driver;
// Sometimes-present hardware
#[cfg(adc)]
pub mod adc;
#[cfg(timer)]
pub mod clock;
#[cfg(dac)]
pub mod dac;
#[cfg(dbgmcu)]
@ -87,6 +86,9 @@ pub fn init(config: Config) -> Peripherals {
exti::init();
rcc::init(config.rcc);
// must be after rcc init
time_driver::init();
}
p