-
Notifications
You must be signed in to change notification settings - Fork 14
update to use write_then_readinto for repeated start #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ok this can now be reviewed! |
buf[0] = address & 0xFF | ||
i2c.write(buf, end=1, stop=False) | ||
i2c.readinto(buf, end=count) | ||
i2c.write_then_readinto(bytes([address & 0xFF]), buf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out_end=1
should be specified, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont have to because i dont use 'buf' anymore, i just create and pass in a single-byte array. oddly when i used buf, it wasnt working. i just did this instead of in-depth investigation on why i couldnt use buf for both output and input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, i didn't read carefully enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np its confusing, ive mixed both because you write first, then read. anyways...yay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Updating https://github.com/adafruit/Adafruit_CircuitPython_Fingerp to 1.1.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_Fingerp#9 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_FXAS21002C to 1.2.0 from 1.1.0: > fix context typo > make sure they get a recent version of busdevice with i2c write-then-read support > fix wrong reference & pylint > use single call for i2c transactions, to support linux Updating https://github.com/adafruit/Adafruit_CircuitPython_FXOS8700 to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_FXOS8700#9 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.1.1 from 3.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_GPS#8 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_MMA8451 to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_MMA8451#3 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 2.2.5 from 2.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#21 from ladyada/master
tested on m4 &raspi
wait till busdevice version release 2.2.5 to check travis/pr