From 88ce8314c5cd653ac245cc5dbf367f6814f24be9 Mon Sep 17 00:00:00 2001 From: Elias Hanelt Date: Wed, 26 Nov 2025 10:08:13 -0800 Subject: fix i2c slave RX early termination handling --- embassy-stm32/src/i2c/v2.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index b2ba94e21..6b213484c 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs @@ -1600,7 +1600,8 @@ impl<'d, M: Mode> I2c<'d, M, MultiMaster> { for byte in chunk { // Wait until we have received something match self.wait_rxne(timeout) { - Ok(ReceiveResult::StopReceived) | Ok(ReceiveResult::NewStart) => { + Ok(ReceiveResult::StopReceived) => {} + Ok(ReceiveResult::NewStart) => { trace!("--- Slave RX transmission end (early)"); return Ok(total_len - remaining_len); // Return N bytes read } -- cgit