-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
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)