diff options
| author | Elias Hanelt <[email protected]> | 2025-11-26 10:08:13 -0800 |
|---|---|---|
| committer | Elias Hanelt <[email protected]> | 2025-11-26 10:08:23 -0800 |
| commit | 88ce8314c5cd653ac245cc5dbf367f6814f24be9 (patch) | |
| tree | 112a2c185e3175b2d9907812fe77d3f1941ee68c | |
| parent | 2b219b7cb59ec3e4370edc88538ea3ea996f37b9 (diff) | |
fix i2c slave RX early termination handling
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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> { | |||
| 1600 | for byte in chunk { | 1600 | for byte in chunk { |
| 1601 | // Wait until we have received something | 1601 | // Wait until we have received something |
| 1602 | match self.wait_rxne(timeout) { | 1602 | match self.wait_rxne(timeout) { |
| 1603 | Ok(ReceiveResult::StopReceived) | Ok(ReceiveResult::NewStart) => { | 1603 | Ok(ReceiveResult::StopReceived) => {} |
| 1604 | Ok(ReceiveResult::NewStart) => { | ||
| 1604 | trace!("--- Slave RX transmission end (early)"); | 1605 | trace!("--- Slave RX transmission end (early)"); |
| 1605 | return Ok(total_len - remaining_len); // Return N bytes read | 1606 | return Ok(total_len - remaining_len); // Return N bytes read |
| 1606 | } | 1607 | } |
