diff options
Diffstat (limited to 'embassy-stm32/src/rcc/mod.rs')
| -rw-r--r-- | embassy-stm32/src/rcc/mod.rs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index 3aab01afd..5c223bc43 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | use crate::time::Hertz; | 3 | use crate::time::Hertz; |
| 4 | use core::mem::MaybeUninit; | 4 | use core::mem::MaybeUninit; |
| 5 | 5 | ||
| 6 | #[cfg_attr(any(rcc_f0, rcc_f0x0), path = "f0.rs")] | 6 | #[cfg_attr(rcc_f0, path = "f0.rs")] |
| 7 | #[cfg_attr(rcc_f1, path = "f1.rs")] | 7 | #[cfg_attr(rcc_f1, path = "f1.rs")] |
| 8 | #[cfg_attr(rcc_f3, path = "f3.rs")] | 8 | #[cfg_attr(rcc_f3, path = "f3.rs")] |
| 9 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] | 9 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] |
| @@ -24,46 +24,29 @@ pub use _version::*; | |||
| 24 | pub struct Clocks { | 24 | pub struct Clocks { |
| 25 | pub sys: Hertz, | 25 | pub sys: Hertz, |
| 26 | 26 | ||
| 27 | #[cfg(rcc_g0)] | 27 | // APB |
| 28 | pub apb: Hertz, | ||
| 29 | #[cfg(rcc_g0)] | ||
| 30 | pub apb_tim: Hertz, | ||
| 31 | |||
| 32 | #[cfg(not(rcc_g0))] | ||
| 33 | pub apb1: Hertz, | 28 | pub apb1: Hertz, |
| 34 | #[cfg(not(rcc_g0))] | ||
| 35 | pub apb1_tim: Hertz, | 29 | pub apb1_tim: Hertz, |
| 36 | |||
| 37 | #[cfg(not(rcc_g0))] | 30 | #[cfg(not(rcc_g0))] |
| 38 | pub apb2: Hertz, | 31 | pub apb2: Hertz, |
| 39 | #[cfg(not(rcc_g0))] | 32 | #[cfg(not(rcc_g0))] |
| 40 | pub apb2_tim: Hertz, | 33 | pub apb2_tim: Hertz, |
| 41 | |||
| 42 | #[cfg(any(rcc_wl5, rcc_u5))] | 34 | #[cfg(any(rcc_wl5, rcc_u5))] |
| 43 | pub apb3: Hertz, | 35 | pub apb3: Hertz, |
| 36 | #[cfg(any(rcc_h7))] | ||
| 37 | pub apb4: Hertz, | ||
| 44 | 38 | ||
| 45 | #[cfg(any(rcc_l0, rcc_l1, rcc_f0, rcc_f1, rcc_f3, rcc_f0x0, rcc_g0))] | 39 | // AHB |
| 46 | pub ahb: Hertz, | ||
| 47 | |||
| 48 | #[cfg(any( | ||
| 49 | rcc_l4, rcc_f4, rcc_f410, rcc_f7, rcc_h7, rcc_g4, rcc_u5, rcc_wb, rcc_wl5 | ||
| 50 | ))] | ||
| 51 | pub ahb1: Hertz, | 40 | pub ahb1: Hertz, |
| 52 | |||
| 53 | #[cfg(any( | 41 | #[cfg(any( |
| 54 | rcc_l4, rcc_f4, rcc_f410, rcc_f7, rcc_h7, rcc_g4, rcc_u5, rcc_wb, rcc_wl5 | 42 | rcc_l4, rcc_f4, rcc_f410, rcc_f7, rcc_h7, rcc_g4, rcc_u5, rcc_wb, rcc_wl5 |
| 55 | ))] | 43 | ))] |
| 56 | pub ahb2: Hertz, | 44 | pub ahb2: Hertz, |
| 57 | |||
| 58 | #[cfg(any(rcc_l4, rcc_f4, rcc_f410, rcc_f7, rcc_h7, rcc_u5, rcc_wb, rcc_wl5))] | 45 | #[cfg(any(rcc_l4, rcc_f4, rcc_f410, rcc_f7, rcc_h7, rcc_u5, rcc_wb, rcc_wl5))] |
| 59 | pub ahb3: Hertz, | 46 | pub ahb3: Hertz, |
| 60 | |||
| 61 | #[cfg(any(rcc_h7))] | 47 | #[cfg(any(rcc_h7))] |
| 62 | pub ahb4: Hertz, | 48 | pub ahb4: Hertz, |
| 63 | 49 | ||
| 64 | #[cfg(any(rcc_h7))] | ||
| 65 | pub apb4: Hertz, | ||
| 66 | |||
| 67 | #[cfg(any(rcc_f4, rcc_f410, rcc_f7))] | 50 | #[cfg(any(rcc_f4, rcc_f410, rcc_f7))] |
| 68 | pub pll48: Option<Hertz>, | 51 | pub pll48: Option<Hertz>, |
| 69 | 52 | ||
