aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 // =========================