Hi there ,
I was trying to write an application to read and write data to i2c device .previously i had used #include <linux/i2c-dev-user.h> but since i2c-utils was removed from the root filesystem and toolchain for the wp76/77 i am supposed to use #include <linux/i2c-dev.h> but i am stuck with the API’s i am suppose to use as i have used
i2c_smbus_write_byte(i2cdev_fd, enableAllPorts) because of which i have the following errors
1st)
error: implicit declaration of function ‘i2c_smbus_read_byte_data’ [-Werror=implicit-function-declaration]
const int readResult = i2c_smbus_read_byte_data(i2cFd, reg);
error: implicit declaration of function ‘i2c_smbus_write_byte’ [-Werror=implicit-function-declaration]
LE_FATAL_IF(i2c_smbus_write_byte(i2cdev_fd, enableAllPorts) == -1, “failed to write i2c data”);
following are the API’s i have used
–> i2c_smbus_read_byte_data(i2cFd, reg);
–> i2c_smbus_write_byte_data(i2cFd, reg, data);
It would be great if somebody gives me pointers to overcome this issue .