You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the i2c driver has different ack flags when reading single bytes?
I have a device that treats the i2c as a serial device (a Pixy2 camera), and the code scans one byte at a time to find a header sync. With the i2c driver as is, i'm missing each other byte, this is, between two reads there's a byte lost. If I change the ack flag to I2C_MASTER_LAST_NACK also for the i2c_master_read_byte call, everything works. It also works if I use the i2c_master_read for reading single bytes also.
I suppose that change can break other devices, but I don't fully understand how i2c is supposed to work in this case.
The text was updated successfully, but these errors were encountered:
Is there a reason why this snippet
in the i2c driver has different ack flags when reading single bytes?
I have a device that treats the i2c as a serial device (a Pixy2 camera), and the code scans one byte at a time to find a header sync. With the i2c driver as is, i'm missing each other byte, this is, between two reads there's a byte lost. If I change the ack flag to
I2C_MASTER_LAST_NACK
also for the i2c_master_read_byte call, everything works. It also works if I use the i2c_master_read for reading single bytes also.I suppose that change can break other devices, but I don't fully understand how i2c is supposed to work in this case.
The text was updated successfully, but these errors were encountered: