Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
...
  • Loading branch information
playfulFence committed Dec 20, 2024
1 parent 41c035e commit f5278f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions esp-hal/src/i2c/master/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f5278f7

Please sign in to comment.