Skip to content

Commit fcd5383

Browse files
authored
Merge pull request #4955 from beeelias/i2c-slave/fix-early-term
i2c slave fix (early termination)
2 parents 217b683 + dd0a3a1 commit fcd5383

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

embassy-stm32/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8585
- fix: build script ensures EXTI2_TSC is listed as the IRQ of EXTI2 even if the PAC doesn't
8686
- feat: stm32/lcd: added implementation
8787
- change: add error messages to can timing calculations ([#4961](https://github.com/embassy-rs/embassy/pull/4961))
88+
- fix: stm32/i2c v2: add stop flag on stop received
8889

8990
## 0.4.0 - 2025-08-26
9091

embassy-stm32/src/i2c/v2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,8 @@ impl<'d, M: Mode> I2c<'d, M, MultiMaster> {
16001600
for byte in chunk {
16011601
// Wait until we have received something
16021602
match self.wait_rxne(timeout) {
1603-
Ok(ReceiveResult::StopReceived) | Ok(ReceiveResult::NewStart) => {
1603+
Ok(ReceiveResult::StopReceived) => {}
1604+
Ok(ReceiveResult::NewStart) => {
16041605
trace!("--- Slave RX transmission end (early)");
16051606
return Ok(total_len - remaining_len); // Return N bytes read
16061607
}

0 commit comments

Comments
 (0)