From 0b52731897322ed7e002a713bd6eab6a59c15ebc Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Fri, 11 Jun 2021 17:53:05 +0200 Subject: [PATCH] Add clocks for h7 --- embassy-stm32/src/rcc/h7/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/embassy-stm32/src/rcc/h7/mod.rs b/embassy-stm32/src/rcc/h7/mod.rs index f15dbe07..bd133dc7 100644 --- a/embassy-stm32/src/rcc/h7/mod.rs +++ b/embassy-stm32/src/rcc/h7/mod.rs @@ -12,6 +12,15 @@ mod pll; use pll::pll_setup; pub use pll::PllConfig; +// Clock type used by peripherals +#[derive(Clone, Copy)] +pub struct Clocks { + pub apb1: Hertz, + pub apb2: Hertz, + pub apb4: Hertz, + pub ahb2: Hertz, +} + const HSI: Hertz = Hertz(64_000_000); const CSI: Hertz = Hertz(4_000_000); const HSI48: Hertz = Hertz(48_000_000);