Skip to content

Commit

Permalink
Merge pull request #557 from Dirbaio/i2c-no-flush
Browse files Browse the repository at this point in the history
i2c: disallow returning before transfer is finished.
  • Loading branch information
eldruin authored Dec 27, 2023
2 parents 13e151c + c9b953a commit 5f5570d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions embedded-hal/src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
//! you've received from a HAL and "split" it into multiple shared ones, to instantiate
//! several drivers on the same bus.
//!
//! # Flushing
//!
//! Implementations must flush the transfer, ensuring the bus has returned to an idle state before returning.
//! No pipelining is allowed. Users must be able to shut down the I2C peripheral immediately after a transfer
//! returns, without any risk of e.g. cutting short a stop condition.
//!
//! (Implementations must wait until the last ACK bit to report it as an error anyway. Therefore pipelining would only
//! yield very small time savings, not worth the complexity)
//!
//! # For driver authors
//!
//! Drivers can select the adequate address length with `I2c<SevenBitAddress>` or `I2c<TenBitAddress>` depending
Expand Down

0 comments on commit 5f5570d

Please sign in to comment.