daniel-thompson / i2c-star

A clone of the i2c-tiny-usb based upon STM32 and libopencm3
GNU General Public License v3.0
124 stars 31 forks source link

i2c-stm32f1-usb: add support for I2C_M_NOSTART #10

Closed M1cha closed 5 years ago

daniel-thompson commented 5 years ago

Looks like a great change.

How was it tested? I presume with the capabilities being advertized to the driver this works transparently with the current kernel driver?

M1cha commented 5 years ago

The i2c bus driver for i2c-star is very minimal and passes through all arguments.

Also it's actually up to the i2c device drivers to check for funcs and behave accordingly.

I've tested this with a userspace driver for mpu9250 which uses the i2c-dev ioctl api.

I've also verified that it behaves correctly using a logic analyzer.

I have to admit that I forgot to check if the funcs are actually being reported correctly because my driver currently doesn't do this. I'll do that later this day and update you with the results.

M1cha commented 5 years ago

It works perfectly :) I2C_FUNCS returns 0x8eff0011