You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use i2c_rdwr(msg) method to implement a write only transaction, by passing just a msg argument create with the write method. Here I specify the i2c address, the command (reg address) and the data (flags).
I want to do something similar but just to read. I know when creating i2c_msg with read command I have to pass the i2c address and the length of the data to receive. How can I also specify the address of the register to read from? Is it by passing the flags argument too?
I'm trying to access the extended register map of a device (0xFEXX is the address of these registers). I was able to write to them, but I cannot read from them.
Many thanks in advance.
The text was updated successfully, but these errors were encountered:
diegohernando
changed the title
i2c_rdwr(msg) perfroming read only operation
i2c_rdwr(msg) performing read only operation
Jul 17, 2023
Hi there. I didn't understand the full context of what you intend to do... Was it to read from a specific offset you meant? If it's an 8 bit offset, there are functions available such as read_byte_data and its siblings.
Hi there,
I can use i2c_rdwr(msg) method to implement a write only transaction, by passing just a msg argument create with the write method. Here I specify the i2c address, the command (reg address) and the data (flags).
I want to do something similar but just to read. I know when creating i2c_msg with read command I have to pass the i2c address and the length of the data to receive. How can I also specify the address of the register to read from? Is it by passing the flags argument too?
I'm trying to access the extended register map of a device (0xFEXX is the address of these registers). I was able to write to them, but I cannot read from them.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: