← index #17696PR #17971
Likely Duplicate · high · value 5.164
QUERY · ISSUE

Update api of esp32 i2c and other drivers.

openby Vincent1-pythonopened 2025-07-17updated 2025-07-31
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: Update machine_i2c.c.

closedby Vincent1-pythonopened 2025-08-22updated 2025-09-05
port-esp32

<!-- Thanks for submitting a Pull Request! We appreciate you spending the
time to improve MicroPython. Please provide enough information so that
others can review your Pull Request.

 Before submitting, please read:
 https://github.com/micropython/micropython/blob/master/CODEOFCONDUCT.md
 https://github.com/micropython/micropython/wiki/ContributorGuidelines

 Please check any CI failures that appear after your Pull Request is opened.

-->

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

At present, it runs normally on ESP32P4, and others need help to test.

Trade-offs and Alternatives

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied