We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2344777 commit c8b96adCopy full SHA for c8b96ad
src/i2c.rs
@@ -202,10 +202,6 @@ macro_rules! i2c {
202
let timing_bits = config.timing_bits(rcc.clocks.apb_clk);
203
i2c.timingr.write(|w| unsafe { w.bits(timing_bits) });
204
205
- // Enable pins
206
- sda.setup();
207
- scl.setup();
208
-
209
// Enable the I2C processing
210
i2c.cr1.modify(|_, w| unsafe {
211
w.pe()
@@ -216,6 +212,10 @@ macro_rules! i2c {
216
212
.bit(!config.analog_filter)
217
213
});
218
214
215
+ // Enable pins
+ sda.setup();
+ scl.setup();
+
219
I2c { i2c, sda, scl }
220
}
221
0 commit comments