mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'docs/explain_i2c_transmit_receive' into 'master'
docs: add explanation for I2C transmist-receive operation Closes IDFGH-13002 See merge request espressif/esp-idf!31509
This commit is contained in:
commit
6b10f1e952
@ -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
|
||||
|
||||
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
|
||||
|
||||
|
@ -351,7 +351,7 @@ I2C 主机读取
|
||||
|
||||
i2c_master_receive(dev_handle, data_rd, DATA_LENGTH, -1);
|
||||
|
||||
I2C 主机写入和读取
|
||||
I2C 主机写入后读取
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
从一些 I2C 设备中读取数据之前需要进行写入配置,可通过 :cpp:func:`i2c_master_transmit_receive` 接口进行配置。下图解释了该函数的原理。
|
||||
@ -362,7 +362,7 @@ I2C 主机写入和读取
|
||||
|
||||
I2C 主机向从机设备写入并从从机设备读取数据
|
||||
|
||||
向从机设备写入并从从机设备读取数据的简单示例:
|
||||
请注意,在写入操作和读取操作之间没有插入 STOP 条件位,因此该功能适用于从 I2C 设备读取寄存器。以下是向从机设备写入数据并从从机设备读取数据的简单示例:
|
||||
|
||||
.. code:: c
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user