So from my understanding from the zephyr documentation, if I want to use 7 bit I2C addressing, don't set I2C_ADDR_10_BITS. I am wondering how I can make sure this macro is not set. I am unsure where or where not to set it.
So from my understanding from the zephyr documentation, if I want to use 7 bit I2C addressing, don't set I2C_ADDR_10_BITS. I am wondering how I can make sure this macro is not set. I am unsure where or where not to set it.
Hi Regina,
If you want to use the 7 bit, then I don't think you need to explicitly do anything because this is the default.
You only need to set I2C_ADDR_10_BITS if you need 10 bits.
Also, I2C_ADDR_10_BITS seems to be deprecated and you need to use I2C_MSG_ADDR_10_BITS now: i2c addressing
Regards,
Priyanka
Hi Priyanka,
Where can I set I2C_MSG_ADDR_10_BITS? Do I set it in main or something along those lines?
Best,
Regina
You don't necessarily have to set it in the main function. You can set this flag for each of those individual I2C transactions which needs 10 bit addressing, so in the part of your code where you're setting up I2C communications.
-Priyanka
You don't necessarily have to set it in the main function. You can set this flag for each of those individual I2C transactions which needs 10 bit addressing, so in the part of your code where you're setting up I2C communications.
-Priyanka