Seeed Grove ++  v0.0.1-2386
Linux C++ Library For Seeed Grove Devices
sg_i2c-dev.h File Reference
#include <sys/ioctl.h>
#include <linux/i2c.h>
Include dependency graph for sg_i2c-dev.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  i2c_smbus_ioctl_data
 

Macros

#define I2C_SMBUS   0x0720 /* SMBus-level access */
 
#define I2C_SLAVE   0x0703 /* Change slave address */
 

Macro Definition Documentation

◆ I2C_SLAVE

#define I2C_SLAVE   0x0703 /* Change slave address */

◆ I2C_SMBUS

#define I2C_SMBUS   0x0720 /* SMBus-level access */
Todo:

If cross-compiling for ARM on older versions of Ubuntu, note the following files are not the same:

  • /usr/include/linux/i2c-dev.h
  • /usr/arm-linux-gnueabi/include/linux/i2c-dev.h

To get around this issue, I've copied a few of the necessary i2c_smbus_* functions from the newer file in /usr/include/linux/i2c-dev.h.