#[cfg] exti

This commit is contained in:
Thales Fragoso 2021-06-24 19:36:42 -03:00
parent 210104e6dc
commit 1c33a3b94c

View File

@ -16,7 +16,6 @@ pub mod interrupt;
pub mod time; pub mod time;
// Always-present hardware // Always-present hardware
pub mod exti;
pub mod gpio; pub mod gpio;
pub mod rcc; pub mod rcc;
@ -31,6 +30,8 @@ pub mod dac;
pub mod dma; pub mod dma;
#[cfg(all(eth, feature = "net"))] #[cfg(all(eth, feature = "net"))]
pub mod eth; pub mod eth;
#[cfg(exti_v1)]
pub mod exti;
#[cfg(i2c)] #[cfg(i2c)]
pub mod i2c; pub mod i2c;
#[cfg(pwr)] #[cfg(pwr)]
@ -83,10 +84,9 @@ pub fn init(config: Config) -> Peripherals {
let p = Peripherals::take(); let p = Peripherals::take();
unsafe { unsafe {
exti::init();
#[cfg(dma)] #[cfg(dma)]
dma::init(); dma::init();
#[cfg(exti_v1)]
exti::init(); exti::init();
rcc::init(config.rcc); rcc::init(config.rcc);
} }