Update api of esp32 i2c and other drivers.
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
esp32: Update machine_i2c.c.
<!-- 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.