Add DCMI peripheral support.
This commit is contained in:
@ -73,6 +73,7 @@ pub struct Config {
|
||||
pub pll2: PllConfig,
|
||||
pub pll3: PllConfig,
|
||||
pub enable_dma1: bool,
|
||||
pub enable_dma2: bool,
|
||||
}
|
||||
|
||||
pub struct Rcc<'d> {
|
||||
@ -334,6 +335,10 @@ impl<'d> Rcc<'d> {
|
||||
RCC.ahb1enr().modify(|w| w.set_dma1en(true));
|
||||
}
|
||||
|
||||
if self.config.enable_dma2 {
|
||||
RCC.ahb1enr().modify(|w| w.set_dma2en(true));
|
||||
}
|
||||
|
||||
CoreClocks {
|
||||
hclk: Hertz(rcc_hclk),
|
||||
pclk1: Hertz(rcc_pclk1),
|
||||
|
Reference in New Issue
Block a user