From: Andrei R. <po...@gm...> - 2007-03-04 05:51:00
|
Dave, isn't each i2c-io ioctl has slave address as a parameter ? Why I2cSetSlaveAddress needed at all ? -Andrei. On 3/3/07, Dave Hylands <dhy...@gm...> wrote: > HI Arnar, > > > If Dave sees this, I wanted to create a python binding for the > > i2c-io-api.h functions - has that been done before? > > I started with "I2C_IO_GetInfo" but I just got this: > > ERROR: I2cTransfer: ioctl failed: Bad file descriptor (9) > > ERROR: I2cReadBlock failed > > Did you do the open (of /dev/i2c-0) and call I2cSetSlaveAddress? You > need to pass the file descriptor returned from open into > I2cSetSlaveAddress. After calling SetSlaveAddress, then you can call > I2C_IO_GetInfo. > > -- > Dave Hylands > Vancouver, BC, Canada > http://www.DaveHylands.com/ |