i2c_master and I2C legacy
Posted: Fri Jan 03, 2025 11:05 am
Hi all,
I can“t find anything else about this, so I am not sure if it has already been talked about.
I can't use the i2c_master library to write and read from specific registers from slave devices, there is no field to write the register address on the i2c_master's API's. On the other hand, I2C legacy has a way to write to specific register by simply including the register address inside the handle created using i2c_cmd_link_create(), but from the documentation it is said that the legacy driver is deprecated and will be removed in the future, so it's not a good option for me.
My question is, is there a way to use the i2c_master library's API to write to specific register on a slave device, or do i need to stick to the legacy driver and just import it in my projects on newer versions of the IDE from old versions of the IDE?
Thanks in advance
Michael
I can“t find anything else about this, so I am not sure if it has already been talked about.
I can't use the i2c_master library to write and read from specific registers from slave devices, there is no field to write the register address on the i2c_master's API's. On the other hand, I2C legacy has a way to write to specific register by simply including the register address inside the handle created using i2c_cmd_link_create(), but from the documentation it is said that the legacy driver is deprecated and will be removed in the future, so it's not a good option for me.
My question is, is there a way to use the i2c_master library's API to write to specific register on a slave device, or do i need to stick to the legacy driver and just import it in my projects on newer versions of the IDE from old versions of the IDE?
Thanks in advance
Michael