Skip to content

How to address i2c slaves #46

@GoogleCodeExporter

Description

@GoogleCodeExporter
 It's not really a problem, but I'm rather perplexed as to how to talk to specific I2C slaves. I only saw the i2ceeprom example, which somehow doesn't seem like what I need.

 I basically have an I2C slave on address 0x48 (it's an A->D converter, but that doesn't really matter). Later on I'll also add another I2C slave on the same line, so I really need to specify the proper addresses to talk to them.

 So how could I do something like:

#define ADS1015_REG_POINTER_CONFIG      (0x01) 
#define ADS1015_REG_POINTER_CONVERT     (0x00)

 int Address=0x48;
 ioctl(i2cFile, I2C_SLAVE, Address);
 i2c_smbus_write_word_data(i2cFile,ADS1015_REG_POINTER_CONFIG,0x1122);
 i2c_smbus_read_word_data(i2cFile,ADS1015_REG_POINTER_CONVERT);

 with libmpsse?

Original issue reported on code.google.com by Rezodl...@gmail.com on 10 Mar 2014 at 8:51

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions