aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalte Brieske <[email protected]>2025-08-13 16:25:52 +0200
committerMalte Brieske <[email protected]>2025-08-13 16:25:52 +0200
commit55d9399ab85efc6250f60fd4440fc3cf97e506a5 (patch)
treeab59a299fdbe100cf948d41034f253b067137e03
parent1cf63731425684e76fac311e44ff3d46227e5ff8 (diff)
wait for STOP flag when writing too
-rw-r--r--embassy-stm32/src/i2c/v2.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs
index 7f73ff82b..aeb4c1c00 100644
--- a/embassy-stm32/src/i2c/v2.rs
+++ b/embassy-stm32/src/i2c/v2.rs
@@ -464,11 +464,13 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> {
464 } 464 }
465 } 465 }
466 // Wait until the write finishes 466 // Wait until the write finishes
467 let result = self.wait_tc(timeout); 467 self.wait_tc(timeout)?;
468 if send_stop { 468 if send_stop {
469 self.master_stop(); 469 self.master_stop();
470 self.wait_stop(timeout)?;
470 } 471 }
471 result 472
473 Ok(())
472 } 474 }
473 475
474 // ========================= 476 // =========================