diff options
| author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2024-09-15 22:12:17 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-07 13:22:10 +1100 |
| commit | aad6ee3d8c676c58c9dc390aa410bd8259268f44 (patch) | |
| tree | c3b7f07b7ca069302b6d61511533a45ddb4280b2 /tools/metrics.py | |
| parent | 4963ae72bf7a30aa7d0268383c49ce2ae68f3157 (diff) | |
esp32/machine_i2c: Use IDF function for calculating main timeout.
The esp32 I2C driver sets a global timeout during init. The functionality
for this is currently only correct for original esp32 and esp32-s2, newer
parts have a slightly different argument which is log-base-2 of the
timeout.
Note that `i2c_set_timeout()` is a thin layer around `i2c_ll_set_tout()`
with the latter writing directly to the hardware register. So the timeout
argument passed to `i2c_set_timeout()` needs to be in units calculated by
`i2c_ll_calculate_timeout_us_to_reg_val()`.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Diffstat (limited to 'tools/metrics.py')
0 files changed, 0 insertions, 0 deletions
