I2C: move "Use 10-bit addressing" option to i2c_msg #3806
Labels
area: API
Changes to public APIs
area: I2C
Enhancement
Changes/Updates/Additions to existing features
priority: medium
Medium impact/importance bug
Reported by Piotr Mienkowski:
The current support for 10-bit addressing in i2c.h file is incorrect: the "Use 10-bit addressing" configuration option defined as I2C_ADDR_10_BITS belongs to dev_config structure and is a parameter of i2c_configure() function. We treat it the same as speed, master/slave mode. i.e. it is a property which applies to all transactions performed on the bus. However, the I2C specification states: "Devices with 7-bit and 10-bit addresses can be connected to the same I2C-bus, and both 7-bit and 10-bit addressing can be used in all bus speed modes."
As such I2C_ADDR_10_BITS should be a property of i2c_msg.flags. In that case every message sent on the I2C bus can have independently set addressing mode.
(Imported from Jira ZEP-2373)
The text was updated successfully, but these errors were encountered: