cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jrceokura
Adventurer
Adventurer
1,585 Views
Registered: ‎07-17-2018

How should I use a i2c device it has 16bit data address?

Jump to solution
Hi All!
 

I use i2c devices on i2c controller e0004000 .
One of i2c devices has 16bit data address(not slave address).

I use i2c-tools, e.g. i2cget and i2cset. But i2c-tools can't deals 16bit data address. It only deals 8bit data address.

What should I do to use this i2c devices?

I examined source code of i2c-tools and related.

And I understood that low layer source codes(i2c-dev.c,i2c-core-smbus.c) also deals data address 8bit.

Thank you!

0 Kudos
1 Solution

Accepted Solutions
1,571 Views
Registered: ‎04-20-2017

If i2c tools do not support your hardware you could do it with a small userspace Programm using I2cdev kernel interface

https://www.kernel.org/doc/Documentation/i2c/dev-interface

With that you can do 7 and 10bit chip addresses, and the actual data like rigester adress you can build as sequence. 

With the addional flags/ioctl you can adjust the behaviour to match the pattern your target expects

(for example no repeated start condition etc...) 

 

View solution in original post

1 Reply
1,572 Views
Registered: ‎04-20-2017

If i2c tools do not support your hardware you could do it with a small userspace Programm using I2cdev kernel interface

https://www.kernel.org/doc/Documentation/i2c/dev-interface

With that you can do 7 and 10bit chip addresses, and the actual data like rigester adress you can build as sequence. 

With the addional flags/ioctl you can adjust the behaviour to match the pattern your target expects

(for example no repeated start condition etc...) 

 

View solution in original post