I2C_SLAVE ioctl in i2c linux driver
Posted
by
zac
on Super User
See other posts from Super User
or by zac
Published on 2012-03-26T04:02:40Z
Indexed on
2012/03/26
5:33 UTC
Read the original article
Hit count: 590
linux
I am supposed to write a simple write and read program for i2c but the problem is that i dont have the device at hand presently to test it so i need my code to be perfect. I am confused about the function of the I2C_SLAVE ioctl.From what i read,this ioctl is used to set the slave address. But we pass the slave address again when performing read/write using ioctl I2C_RDWR via addr in the structure i2c_msg. So then,what is the function of I2C_SLAVE command?Do i need to call it every time i perform a read or write operation? Thank you in advance.
© Super User or respective owner