Generalize RCC enabling for BDMA peris.
This commit is contained in:
parent
ff1cb9ac74
commit
45964c658c
@ -164,6 +164,8 @@ unsafe fn on_irq() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use crate::rcc::sealed::RccPeripheral;
|
||||||
|
|
||||||
/// safety: must be called only once
|
/// safety: must be called only once
|
||||||
pub(crate) unsafe fn init() {
|
pub(crate) unsafe fn init() {
|
||||||
pac::interrupts! {
|
pac::interrupts! {
|
||||||
@ -172,11 +174,8 @@ pub(crate) unsafe fn init() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
pac::peripherals! {
|
pac::peripherals! {
|
||||||
(bdma, DMA1) => {
|
(bdma, $peri:ident) => {
|
||||||
//critical_section::with(|_| {
|
crate::peripherals::$peri::enable();
|
||||||
//pac::RCC.ahbenr().modify(|w| w.set_dmaen(true));
|
|
||||||
//});
|
|
||||||
crate::peripherals::DMA1::enable();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user