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

I2CMasterSlaveDriver: add write_read command. #681

Merged
merged 1 commit into from Nov 9, 2017

Conversation

Vagabond
Copy link
Contributor

@Vagabond Vagabond commented Nov 7, 2017

Pull Request Overview

This pull request adds a libtock wrapper for the i2c write_read trait because previously it was not possible to call it from userland.

Testing Strategy

I tested using a Salae and the NRF52:
write_read

This was a i2c write-read transaction against a i2c EEPROM peripheral.

TODO or Help Wanted

This pull request should be ready to merge. The only question is the buffer overwrite behaviour of write_read. It is not clear if the received bytes are written to the beginning of the buffer, or written after the bytes that were transmitted. Currently we assume the received bytes are written starting at index 0 of the buffer.

Documentation Updated

  • Kernel: The relevant files in /docs have been updated or no updates are required.
  • Userland: The application README has been added, updated, or no updates are required.

Formatting

  • make formatall has been run.

@JayKickliter also contributed to this.

@alevy
Copy link
Member

alevy commented Nov 9, 2017

Currently we assume the received bytes are written starting at index 0 of the buffer.

Reading the code for the SAM4L, this indeed appears to be the case. Sorry this isn't documented better 😞

@alevy
Copy link
Member

alevy commented Nov 9, 2017

LGTM!

@alevy alevy merged commit 63f06d3 into tock:master Nov 9, 2017
@lthiery lthiery deleted the i2cms/add-write-read branch September 28, 2018 16:24
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

Successfully merging this pull request may close these issues.

None yet

2 participants