[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: programming I2C
On Thursday 17 July 2003 11:28, firstname.lastname@example.org wrote:
> this is my code:
> #include <linux/i2c.h>
> #include <linux/i2c-dev.h>
You can't use the 'standard' i2c driver, you have to use the etrax i2c driver.
Make sure you enable the etrax i2c driver in your kernelconfig, though you
probably have done so, since you could open /dev/i2c
> // setting the address
> if (ioctl(descriptor,I2C_SLAVE,direccion_adaptador) < 0)
> printf("Error al especificar direccion del dispositivo i2c\n");
The etrax i2c driver only provides readreg/writereg through ioctl. Ioctl
commands for the 'standard' i2c driver will indeed fail.