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
embedded-hal-async
An asynchronous Hardware Abstraction Layer (HAL) for embedded systems.
This crate contains asynchronous versions of the embedded-hal traits and shares its scope and design goals.
This project is developed and maintained by the HAL team.
Serial/UART traits
There is no serial traits in embedded-hal-async. Instead, use embedded-io-async.
A serial port is essentially a byte-oriented stream, and that's what embedded-io-async models. Sharing the traits
with all byte streams has some advantages. For example, it allows generic code providing a command-line interface
or a console to operate either on hardware serial ports or on virtual ones like Telnet or USB CDC-ACM.
Optional Cargo features
defmt-03: Derivedefmt::Formatfromdefmt0.3 for enums and structs.
Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.75 and up. It might compile with older versions but that may change in any new patch release.
See here for details on how the MSRV may be upgraded.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.