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

Clarify I2C transaction contract for NACK behavior #622

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

nhpupu
Copy link
Contributor

@nhpupu nhpupu commented Aug 5, 2024

Update the I2C trait documentation in both embedded-hal and embedded-hal-async to clarify the NACK (No Acknowledge) behavior during read operations.

The previous wording suggested that a NACK was only sent for the last byte of the final read operation in a transaction. This has been corrected to specify that a NACK should be sent at the end of each read operation, whether it's followed by a stop condition or a repeated start condition.

This change ensures correct implementation of the I2C protocol across different scenarios and prevents potential communication errors.

Changes:

  • Updated comment in embedded-hal/src/i2c.rs
  • Updated comment in embedded-hal-async/src/i2c.rs

fix #621

Update the I2C trait documentation in both embedded-hal and
embedded-hal-async to clarify the NACK (No Acknowledge) behavior
during read operations.

The previous wording suggested that a NACK was only sent for the
last byte of the final read operation in a transaction. This has
been corrected to specify that a NACK should be sent at the end
of each read operation, whether it's followed by a stop condition
or a repeated start condition.

This change ensures correct implementation of the I2C protocol
across different scenarios and prevents potential communication
errors.

Changes:
- Updated comment in embedded-hal/src/i2c.rs
- Updated comment in embedded-hal-async/src/i2c.rs
@nhpupu nhpupu requested a review from a team as a code owner August 5, 2024 16:42
@Dirbaio Dirbaio enabled auto-merge August 5, 2024 16:45
@Dirbaio Dirbaio added this pull request to the merge queue Aug 5, 2024
Merged via the queue into rust-embedded:master with commit bbd5803 Aug 5, 2024
8 checks passed
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.

Clarification Needed for I2C Transaction Contract
2 participants