On 09/04/19 11:42, Thomas Huth wrote:
>> -static void tmp105_set16(I2CAdapter *i2c, uint8_t addr, uint8_t reg,
>> -                         uint16_t value)
>> -{
>> -    uint8_t cmd[3];
>> -    uint8_t resp[2];
>> -
>> -    cmd[0] = reg;
>> -    cmd[1] = value >> 8;
>> -    cmd[2] = value & 255;
>> -    i2c_send(i2c, addr, cmd, 3);
>> -    i2c_recv(i2c, addr, resp, 2);
>> -    g_assert_cmphex(resp[0], ==, cmd[1]);
>> -    g_assert_cmphex(resp[1], ==, cmd[2]);
>> -}
> ... but the old set8/16 functions also used i2c_recv() and
> g_assert_cmphex() ... shouldn't this be added to the new functions, too?

That is dependent on the actual device you are working with.  I probably
should add some code to the tmp105 test that tests this behavior too.

Paolo

Reply via email to