stm32/time: add Cargo features to choose tim2/tim3

This commit is contained in:
Dario Nieuwenhuis
2021-08-04 12:05:22 +02:00
parent 0ea6a2d890
commit b1d631d639
10 changed files with 39 additions and 19 deletions

View File

@ -20,6 +20,7 @@ pub mod time;
pub mod dma;
pub mod gpio;
pub mod rcc;
#[cfg(feature = "_time-driver")]
mod time_driver;
// Sometimes-present hardware
@ -88,6 +89,7 @@ pub fn init(config: Config) -> Peripherals {
rcc::init(config.rcc);
// must be after rcc init
#[cfg(feature = "_time-driver")]
time_driver::init();
}