I found I cannot access to I2C device through i2c interface.
Here below is my code: /* running in linux-2.4.19-rmk7 */
if (( fdI2C = open("/dev/i2c/0",O_RDWR)) < 0)
printf("Can't open /dev/i2c/0\n");
int i2c_addr = 0x50;
if (ioctl(fdI2C,I2C_SLAVE,i2c_addr) < 0)
printf("Can't set address\n");
buf = hi_addr;
buf = lo_addr;
buf = data2send;
if ((cnt = write (fdI2C, buf, 3)) < 0)
No any signal has been sent when i check the SDA and SCL lines from
Oscillscope. can anybody tell me what is the problem?? help????
This forum is for users of Microchip MPUs and who are interested in using Linux OS.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests