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
I'm using I2Cdev with an IC that has a slightly non-standard interface. When reading from the chip, it expects a request in the form: chip address, register address, then data. It doesn't perform a STOP on the bus before reading in the data.
I2Cdev does everything I need, but when reading words it ends the connection after setting the register address and then starts a new connection, sends the chip address again, and then gets data.
I'd like to adapt the library by adding an optional stop input to readWords() that would change lines 418 and 419 to:
Wire.endTransmission(stop);
if (!stop) Wire.beginTransmission(devAddr);
If you'd be ok with this, I can open up a PR for it.
This discussion was converted from issue #147 on September 23, 2021 15:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using I2Cdev with an IC that has a slightly non-standard interface. When reading from the chip, it expects a request in the form: chip address, register address, then data. It doesn't perform a STOP on the bus before reading in the data.
I2Cdev does everything I need, but when reading words it ends the connection after setting the register address and then starts a new connection, sends the chip address again, and then gets data.
I'd like to adapt the library by adding an optional
stop
input to readWords() that would change lines 418 and 419 to:If you'd be ok with this, I can open up a PR for it.
Beta Was this translation helpful? Give feedback.
All reactions