From f5278f792a5bd4a070ca8fd911fb2f98bef1fccf Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov Date: Fri, 20 Dec 2024 13:10:39 +0100 Subject: [PATCH] rebase ... --- esp-hal/CHANGELOG.md | 1 - esp-hal/src/i2c/master/mod.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 51b0c899cd..be5c0d5048 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -86,7 +86,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `SpiBitOrder`, `SpiDataMode`, `SpiMode` were renamed to `BitOder`, `DataMode` and `Mode` (#2828) - `crate::Mode` was renamed to `crate::DriverMode` (#2828) - Renamed some I2C error variants (#2844) -- I2C: Prefer compile-time checks over runtime checks where possible, prefer a fallible API over panics. (#2831) - I2C: Replaced potential panics with errors. (#2831) ### Fixed diff --git a/esp-hal/src/i2c/master/mod.rs b/esp-hal/src/i2c/master/mod.rs index f044ac599a..b5de15d0cc 100644 --- a/esp-hal/src/i2c/master/mod.rs +++ b/esp-hal/src/i2c/master/mod.rs @@ -1335,7 +1335,7 @@ impl Driver<'_> { #[cfg(any(esp32, esp32s2))] async fn read_all_from_fifo(&self, buffer: &mut [u8]) -> Result<(), Error> { if buffer.len() > 32 { - return Err(Error::ExceedingFifo); + return Err(Error::FifoExceeded); } self.wait_for_completion(false).await?; @@ -1508,7 +1508,7 @@ impl Driver<'_> { // see https://github.com/espressif/arduino-esp32/blob/7e9afe8c5ed7b5bf29624a5cd6e07d431c027b97/cores/esp32/esp32-hal-i2c.c#L615 if buffer.len() > 32 { - return Err(Error::ExceedingFifo); + return Err(Error::FifoExceeded); } // wait for completion - then we can just read the data from FIFO @@ -1822,7 +1822,7 @@ impl Driver<'_> { // see https://github.com/espressif/arduino-esp32/blob/7e9afe8c5ed7b5bf29624a5cd6e07d431c027b97/cores/esp32/esp32-hal-i2c.c#L615 if bytes.len() > 31 { - return Err(Error::ExceedingFifo); + return Err(Error::FifoExceeded); } for b in bytes {