diff options
| author | Sjoerd Simons <[email protected]> | 2021-12-30 10:50:28 +0100 |
|---|---|---|
| committer | Sjoerd Simons <[email protected]> | 2021-12-30 10:50:28 +0100 |
| commit | a93b1141e9ebcddc1286fe8b752db9fc7f18de0d (patch) | |
| tree | 20835f04005b19aab4e76d0b48d44b4c0c2deffc | |
| parent | ecb09b7313fa88fb02ac88f39acef0ee555ccd49 (diff) | |
stm32f1: Store adc clock rate in Clocks struct
| -rw-r--r-- | embassy-stm32/src/rcc/f1/mod.rs | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/mod.rs | 3 |
2 files changed, 4 insertions, 0 deletions
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> { | |||
| 202 | apb1_tim: Hertz(pclk1 * timer_mul1), | 202 | apb1_tim: Hertz(pclk1 * timer_mul1), |
| 203 | apb2_tim: Hertz(pclk2 * timer_mul2), | 203 | apb2_tim: Hertz(pclk2 * timer_mul2), |
| 204 | ahb: Hertz(hclk), | 204 | ahb: Hertz(hclk), |
| 205 | adc: Hertz(adcclk), | ||
| 205 | } | 206 | } |
| 206 | } | 207 | } |
| 207 | } | 208 | } |
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 { | |||
| 46 | 46 | ||
| 47 | #[cfg(rcc_f4)] | 47 | #[cfg(rcc_f4)] |
| 48 | pub pll48: Option<Hertz>, | 48 | pub pll48: Option<Hertz>, |
| 49 | |||
| 50 | #[cfg(rcc_f1)] | ||
| 51 | pub adc: Hertz, | ||
| 49 | } | 52 | } |
| 50 | 53 | ||
| 51 | /// Frozen clock frequencies | 54 | /// Frozen clock frequencies |
