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 88c5843 commit 571c3a3Copy full SHA for 571c3a3
src/i2c.rs
@@ -264,6 +264,8 @@ impl<I2C: Instance> I2c<I2C> {
264
// to start a new transaction.
265
while self.i2c.cr1().read().stop().bit_is_set() {}
266
267
+ // Clear all pending error bits
268
+ self.i2c.sr1().write(|w| unsafe { w.bits(0) });
269
// Send a START condition
270
self.i2c.cr1().modify(|_, w| w.start().set_bit());
271
@@ -325,6 +327,8 @@ impl<I2C: Instance> I2c<I2C> {
325
327
326
328
329
330
331
332
// Send a START condition and set ACK bit
333
self.i2c
334
.cr1()
0 commit comments