Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C: move "Use 10-bit addressing" option to i2c_msg #2206

Open
nashif opened this issue Jul 10, 2017 · 0 comments
Open

I2C: move "Use 10-bit addressing" option to i2c_msg #2206

nashif opened this issue Jul 10, 2017 · 0 comments

Comments

@nashif
Copy link

nashif commented Jul 10, 2017

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant