Skip to content

Commit

Permalink
Explain change in MG
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 4, 2024
1 parent 9581054 commit 446eb46
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion esp-hal/MIGRATING-0.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,14 @@ the GPIO drivers (`Input`, `Output`, `OutputOpenDrain` and `Flex`) instead.
+)
+.with_sda(sda)
+.with_scl(scl);
```
```

### The calculation of I2C timeout has changed

Previously, I2C timeouts were counted in increments of I2C peripheral clock cycles. This meant that
the configure value meant different lengths of time depending on the device. With this update, the
I2C configuration now expects the timeout value in number of bus clock cycles, which is consistent
between devices.

ESP32 and ESP32-S2 use an exact number of clock cycles for its timeout. Other MCUs, however, use
the `2^timeout` value internally, and the HAL rounds up the timeout to the next appropriate value.

0 comments on commit 446eb46

Please sign in to comment.