Merge branch 'bugfix/i2c_no_pull_up' into 'master'

fix(i2c_master): Fix issue that initialize esp32 fails and using i2c_master_probe issue IF NO PULL-UP ON PINS. And add nack check

Closes IDFGH-11838, IDFGH-13142, and IDFGH-13398

See merge request espressif/esp-idf!29667
This commit is contained in:
C.S.M
2024-03-19 12:25:34 +08:00
6 changed files with 203 additions and 15 deletions

View File

@@ -297,6 +297,10 @@ I2C Master Probe
I2C driver can use :cpp:func:`i2c_master_probe` to detect whether the specific device has been connected on I2C bus. If this function return ``ESP_OK``, that means the device has been detected.
.. important::
Pull-ups must be connected to the SCL and SDA pins when this function is called. If you get `ESP_ERR_TIMEOUT` while `xfer_timeout_ms` was parsed correctly, you should check the pull-up resistors. If you do not have proper resistors nearby, setting `flags.enable_internal_pullup` as true is also acceptable.
.. figure:: ../../../_static/diagrams/i2c/i2c_master_probe.png
:align: center
:alt: I2C master probe