From 1945581ce15a551de366162a9ecab8d696705905 Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Wed, 28 Feb 2024 11:35:46 +0100 Subject: [PATCH 1/2] Fix I2C read for ESP32-S2 --- esp-hal/src/i2c.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp-hal/src/i2c.rs b/esp-hal/src/i2c.rs index 6690c447630..22d512c2024 100644 --- a/esp-hal/src/i2c.rs +++ b/esp-hal/src/i2c.rs @@ -1566,7 +1566,7 @@ fn read_fifo(register_block: &RegisterBlock) -> u8 { } else { 0x6002701c }) as *mut u32; - unsafe { (fifo_ptr.read() & 0xff) as u8 } + unsafe { (fifo_ptr.read_volatile() & 0xff) as u8 } } #[cfg(esp32)] From 3651660fe3f7b6b4751980ef9a7fc079a9b02563 Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Wed, 28 Feb 2024 11:37:26 +0100 Subject: [PATCH 2/2] CHANGELOG.md entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55b896c45c0..c4c9dce58e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix I2C error handling (#1184) - Fix circular DMA (#1189) - Fix esp32c3 uart initialization (#1156) +- Fix ESP32-S2 I2C read (#1214) ### Changed