Merge branch 'docs/i2c_addr_description_v5.5' into 'release/v5.5'

docs(i2c): clarify 7-bit address usage (v5.5)

See merge request espressif/esp-idf!51091
This commit is contained in:
morris
2026-07-24 14:30:25 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ If the configurations in :cpp:type:`i2c_master_bus_config_t` is specified, then
I2C master device requires the configuration that specified by :cpp:type:`i2c_device_config_t`:
- :cpp:member:`i2c_device_config_t::dev_addr_length` configure the address bit length of the slave device. It can be chosen from enumerator :cpp:enumerator:`I2C_ADDR_BIT_LEN_7` or :cpp:enumerator:`I2C_ADDR_BIT_LEN_10` (if supported).
- :cpp:member:`i2c_device_config_t::device_address` sets the I2C device raw address. Please parse the device address to this member directly. For example, the device address is 0x28, then parse 0x28 to :cpp:member:`i2c_device_config_t::device_address`, don't carry a write or read bit.
- :cpp:member:`i2c_device_config_t::device_address` sets the raw I2C device address. Pass the device address directly to this member. For devices with a 7-bit address, use the **7-bit** address instead of an 8-bit address that includes the read/write bit.
- :cpp:member:`i2c_device_config_t::scl_speed_hz` sets the SCL line frequency of this device.
- :cpp:member:`i2c_device_config_t::scl_wait_us` sets the SCL await time (in μs). Usually this value should not be very small because slave stretch will happen in pretty long time (It's possible even stretch for 12 ms). Set ``0`` means use default register value.

View File

@@ -132,7 +132,7 @@ I2C 主机总线需要 :cpp:type:`i2c_master_bus_config_t` 指定的配置:
I2C 主机设备需要 :cpp:type:`i2c_device_config_t` 指定的配置:
- :cpp:member:`i2c_device_config_t::dev_addr_length` 配置从机设备的地址位长度,可从枚举 :cpp:enumerator:`I2C_ADDR_BIT_LEN_7`:cpp:enumerator:`I2C_ADDR_BIT_LEN_10` (如果支持)中进行选择。
- :cpp:member:`i2c_device_config_t::device_address` 设置 I2C 设备原始地址,请直接将设备地址解析到此成员。例如,若设备地址为 0x28则将 0x28 解析到 :cpp:member:`i2c_device_config_t::device_address`,不要带写入或读取位
- :cpp:member:`i2c_device_config_t::device_address` 设置 I2C 设备原始地址,请直接将设备地址解析到此成员。对于使用 7 位地址的设备,请使用 **7 位** 地址,不要使用带读/写位的 8 位地址
- :cpp:member:`i2c_device_config_t::scl_speed_hz` 设置此设备的 SCL 线频率。
- :cpp:member:`i2c_device_config_t::scl_wait_us` 设置 SCL 等待时间(以微秒为单位)。通常此值较大,因为从机延伸时间会很长(甚至可能延伸到 12 ms。设置为 ``0`` 表示使用默认的寄存器值。