QUERY · ISSUE
Update api of esp32 i2c and other drivers.
enhancementport-esp32
Description
Update api of esp32 i2c and other drivers.Because it will be removed in idf 6, it will not be compiled.
Code Size
None
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree
CANDIDATE · PULL REQUEST
esp32/machine_i2c: Update to use new ESP-IDF driver API.
port-esp32
This is a rebase & resubmit of #17971 by @Vincent1-python, which I accidentally closed by pushing the wrong commits during a rebase. :facepalm:
Summary
Replace the legacy ESP-IDF I²C driver (driver/i2c.h) with the new driver/i2c_master.h API for all ESP32-series SoCs.
This change:
Removes dependency on the deprecated peripheral driver that is no longer present in ESP-IDF ≥ 6.0.
Keeps the existing machine.I2C API unchanged, so user scripts do not require modification.
Testing
- @Vincent1-python has tested this on ESP32P4 (see #17951 where this change was originally submitted).
- @robert-hh tested the PR on ESP32-Generic, ESP32S2, ESP32S3, ESP32C2, ESP32C3, ESP32C6 and a BME280 I2C target device.. :tada: