docs: add explanation for I2C transmist-receive operation

* Closes https://github.com/espressif/esp-idf/issues/13952
This commit is contained in:
Omar Chebib
2024-06-14 15:13:45 +08:00
parent 20c2b24c97
commit 6a542c1fa0
2 changed files with 3 additions and 3 deletions

View File

@@ -362,7 +362,7 @@ Some I2C device needs write configurations before reading data from it. Therefor
I2C master write to slave and read from slave I2C master write to slave and read from slave
Simple example for writing and reading from slave: Please note that no STOP condition bit is inserted between the write and read operations; therefore, this function is suited to read a register from an I2C device. A simple example for writing and reading from a slave device:
.. code:: c .. code:: c

View File

@@ -351,7 +351,7 @@ I2C 主机读取
i2c_master_receive(dev_handle, data_rd, DATA_LENGTH, -1); i2c_master_receive(dev_handle, data_rd, DATA_LENGTH, -1);
I2C 主机写入读取 I2C 主机写入读取
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
从一些 I2C 设备中读取数据之前需要进行写入配置,可通过 :cpp:func:`i2c_master_transmit_receive` 接口进行配置。下图解释了该函数的原理。 从一些 I2C 设备中读取数据之前需要进行写入配置,可通过 :cpp:func:`i2c_master_transmit_receive` 接口进行配置。下图解释了该函数的原理。
@@ -362,7 +362,7 @@ I2C 主机写入和读取
I2C 主机向从机设备写入并从从机设备读取数据 I2C 主机向从机设备写入并从从机设备读取数据
向从机设备写入并从从机设备读取数据的简单示例: 请注意,在写入操作和读取操作之间没有插入 STOP 条件位,因此该功能适用于从 I2C 设备读取寄存器。以下是向从机设备写入数据并从从机设备读取数据的简单示例:
.. code:: c .. code:: c