aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/rcc/h7/mod.rs31
-rw-r--r--examples/stm32h7/Cargo.toml2
2 files changed, 15 insertions, 18 deletions
diff --git a/embassy-stm32/src/rcc/h7/mod.rs b/embassy-stm32/src/rcc/h7/mod.rs
index ee0ba5a35..70632f280 100644
--- a/embassy-stm32/src/rcc/h7/mod.rs
+++ b/embassy-stm32/src/rcc/h7/mod.rs
@@ -71,81 +71,80 @@ pub struct Config {
71} 71}
72 72
73impl Config { 73impl Config {
74 pub fn sys_ck<T:Into<Hertz>>(mut self, freq: T) -> Self { 74 pub fn sys_ck<T: Into<Hertz>>(mut self, freq: T) -> Self {
75 self.sys_ck = Some(freq.into()); 75 self.sys_ck = Some(freq.into());
76 self 76 self
77 } 77 }
78 78
79 pub fn per_ck<T:Into<Hertz>>(mut self, freq: T) -> Self { 79 pub fn per_ck<T: Into<Hertz>>(mut self, freq: T) -> Self {
80 self.per_ck = Some(freq.into()); 80 self.per_ck = Some(freq.into());
81 self 81 self
82 } 82 }
83 83
84 pub fn pclk1<T:Into<Hertz>>(mut self, freq: T) -> Self { 84 pub fn pclk1<T: Into<Hertz>>(mut self, freq: T) -> Self {
85 self.pclk1 = Some(freq.into()); 85 self.pclk1 = Some(freq.into());
86 self 86 self
87 } 87 }
88 88
89 pub fn pclk2<T:Into<Hertz>>(mut self, freq: T) -> Self { 89 pub fn pclk2<T: Into<Hertz>>(mut self, freq: T) -> Self {
90 self.pclk2 = Some(freq.into()); 90 self.pclk2 = Some(freq.into());
91 self 91 self
92 } 92 }
93 93
94 pub fn pclk3<T:Into<Hertz>>(mut self, freq: T) -> Self { 94 pub fn pclk3<T: Into<Hertz>>(mut self, freq: T) -> Self {
95 self.pclk3 = Some(freq.into()); 95 self.pclk3 = Some(freq.into());
96 self 96 self
97 } 97 }
98 98
99 pub fn pclk4<T:Into<Hertz>>(mut self, freq: T) -> Self { 99 pub fn pclk4<T: Into<Hertz>>(mut self, freq: T) -> Self {
100 self.pclk4 = Some(freq.into()); 100 self.pclk4 = Some(freq.into());
101 self 101 self
102 } 102 }
103 103
104 pub fn pll1_p<T:Into<Hertz>>(mut self, freq: T) -> Self { 104 pub fn pll1_p<T: Into<Hertz>>(mut self, freq: T) -> Self {
105 self.pll1.p_ck = Some(freq.into()); 105 self.pll1.p_ck = Some(freq.into());
106 self 106 self
107 } 107 }
108 108
109 pub fn pll1_q<T:Into<Hertz>>(mut self, freq: T) -> Self { 109 pub fn pll1_q<T: Into<Hertz>>(mut self, freq: T) -> Self {
110 self.pll1.q_ck = Some(freq.into()); 110 self.pll1.q_ck = Some(freq.into());
111 self 111 self
112 } 112 }
113 113
114 pub fn pll1_r<T:Into<Hertz>>(mut self, freq: T) -> Self { 114 pub fn pll1_r<T: Into<Hertz>>(mut self, freq: T) -> Self {
115 self.pll1.r_ck = Some(freq.into()); 115 self.pll1.r_ck = Some(freq.into());
116 self 116 self
117 } 117 }
118 118
119 pub fn pll2_p<T:Into<Hertz>>(mut self, freq: T) -> Self { 119 pub fn pll2_p<T: Into<Hertz>>(mut self, freq: T) -> Self {
120 self.pll2.p_ck = Some(freq.into()); 120 self.pll2.p_ck = Some(freq.into());
121 self 121 self
122 } 122 }
123 123
124 pub fn pll2_q<T:Into<Hertz>>(mut self, freq: T) -> Self { 124 pub fn pll2_q<T: Into<Hertz>>(mut self, freq: T) -> Self {
125 self.pll2.q_ck = Some(freq.into()); 125 self.pll2.q_ck = Some(freq.into());
126 self 126 self
127 } 127 }
128 128
129 pub fn pll2_r<T:Into<Hertz>>(mut self, freq: T) -> Self { 129 pub fn pll2_r<T: Into<Hertz>>(mut self, freq: T) -> Self {
130 self.pll2.r_ck = Some(freq.into()); 130 self.pll2.r_ck = Some(freq.into());
131 self 131 self
132 } 132 }
133 133
134 pub fn pll3_p<T:Into<Hertz>>(mut self, freq: T) -> Self { 134 pub fn pll3_p<T: Into<Hertz>>(mut self, freq: T) -> Self {
135 self.pll3.p_ck = Some(freq.into()); 135 self.pll3.p_ck = Some(freq.into());
136 self 136 self
137 } 137 }
138 138
139 pub fn pll3_q<T:Into<Hertz>>(mut self, freq: T) -> Self { 139 pub fn pll3_q<T: Into<Hertz>>(mut self, freq: T) -> Self {
140 self.pll3.q_ck = Some(freq.into()); 140 self.pll3.q_ck = Some(freq.into());
141 self 141 self
142 } 142 }
143 143
144 pub fn pll3_r<T:Into<Hertz>>(mut self, freq: T) -> Self { 144 pub fn pll3_r<T: Into<Hertz>>(mut self, freq: T) -> Self {
145 self.pll3.r_ck = Some(freq.into()); 145 self.pll3.r_ck = Some(freq.into());
146 self 146 self
147 } 147 }
148
149} 148}
150 149
151pub struct Rcc<'d> { 150pub struct Rcc<'d> {
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index f313960f9..0868be75d 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -24,8 +24,6 @@ embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" }
24embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] } 24embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] }
25stm32-metapac = { path = "../../stm32-metapac", features = ["stm32h743zi"] } 25stm32-metapac = { path = "../../stm32-metapac", features = ["stm32h743zi"] }
26embassy-macros = { path = "../../embassy-macros" } 26embassy-macros = { path = "../../embassy-macros" }
27#stm32h7 = { version = "0.13", features = ["stm32h743"]}
28#stm32h7xx-hal = { version = "0.9.0", features = ["stm32h743"] }
29 27
30defmt = "0.2.0" 28defmt = "0.2.0"
31defmt-rtt = "0.2.0" 29defmt-rtt = "0.2.0"