Add DCMI peripheral support.

This commit is contained in:
Matous Hybl
2021-11-10 14:47:16 +01:00
parent 8ad8e3b718
commit 1dd5a71c07
3 changed files with 488 additions and 0 deletions

View File

@ -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),