[i2c] i2c_smbus_write_block_data problem
Jürgen Ebert
juergen at headmax.de
Mon Aug 20 19:36:43 CEST 2007
Oh, thanks. That works. But why? The implementation of
i2c_smbus_write_i2c_block_data seems to be the same except for the
I2C_SMBUS_I2C_BLOCK_BROKEN flag. It does also prepend the data with the
length.
Jean Delvare schrieb:
> Hallo Jürgen,
>
> On Mon, 20 Aug 2007 19:06:51 +0200, Jürgen Ebert wrote:
>
>> I tried to control a stepper motor interface via i2c and while the
>> commands seemed to be transmitted correctly the data was not. I had a
>> look today at the implementation of i2c_smbus_write_block_data and I
>> noticed that the data was prepended with the length. I copied the
>> implementation and removed the prepending and now everything seems to
>> work fine.
>> Is my stepper motor interface just weird or is this a bug in
>> i2c_smbus_write_block_data?
>>
>
> Most probably neither. I'd guess that your motor is an I2C device and
> not an SMBus device, so it expects I2C block transactions, which do not
> include a length byte, rather than SMBus block transactions which do
> include the length byte. Look at i2c_smbus_write_i2c_block_data.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/i2c/attachments/20070820/2ce110a2/attachment.html
More information about the i2c
mailing list