From a93b1141e9ebcddc1286fe8b752db9fc7f18de0d Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 30 Dec 2021 10:50:28 +0100 Subject: [PATCH] stm32f1: Store adc clock rate in Clocks struct --- embassy-stm32/src/rcc/f1/mod.rs | 1 + embassy-stm32/src/rcc/mod.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/embassy-stm32/src/rcc/f1/mod.rs b/embassy-stm32/src/rcc/f1/mod.rs index fc9fc128f..d613f5a2f 100644 --- a/embassy-stm32/src/rcc/f1/mod.rs +++ b/embassy-stm32/src/rcc/f1/mod.rs @@ -202,6 +202,7 @@ impl<'d> Rcc<'d> { apb1_tim: Hertz(pclk1 * timer_mul1), apb2_tim: Hertz(pclk2 * timer_mul2), ahb: Hertz(hclk), + adc: Hertz(adcclk), } } } diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index 619316df8..0a7edb37a 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs @@ -46,6 +46,9 @@ pub struct Clocks { #[cfg(rcc_f4)] pub pll48: Option, + + #[cfg(rcc_f1)] + pub adc: Hertz, } /// Frozen clock frequencies