Skip to content
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

i2c_read() should use 'a' command for reads > 64 bytes #34

Open
jamesbowman opened this issue Jan 23, 2020 · 0 comments
Open

i2c_read() should use 'a' command for reads > 64 bytes #34

jamesbowman opened this issue Jan 23, 2020 · 0 comments

Comments

@jamesbowman
Copy link
Owner

uint8_t cmd[1] = {(uint8_t)(0x80 + len - 1)};

This code is does not work for reads of > 64 bytes, because the read command NAKs the final byte.

Instead, it should use the 'a' command (read with ACK) to read the prefix, before a final read-with-NAK for the last 1-64 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant