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

Standardize address wording #228

Merged
merged 1 commit into from
Jun 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/blocking/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub trait Write {
/// Error type
type Error;

/// Sends bytes to slave with address `addr`
/// Sends bytes to slave with address `address`
///
/// # I2C Events (contract)
///
Expand All @@ -52,20 +52,20 @@ pub trait Write {
/// - `SAK` = slave acknowledge
/// - `Bi` = ith byte of data
/// - `SP` = stop condition
fn try_write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>;
fn try_write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>;
}

/// Blocking write (iterator version)
pub trait WriteIter {
/// Error type
type Error;

/// Sends bytes to slave with address `addr`
/// Sends bytes to slave with address `address`
///
/// # I2C Events (contract)
///
/// Same as `Write`
fn try_write<B>(&mut self, addr: u8, bytes: B) -> Result<(), Self::Error>
fn try_write<B>(&mut self, address: u8, bytes: B) -> Result<(), Self::Error>
where
B: IntoIterator<Item = u8>;
}
Expand All @@ -75,7 +75,7 @@ pub trait WriteRead {
/// Error type
type Error;

/// Sends bytes to slave with address `addr` and then reads enough bytes to fill `buffer` *in a
/// Sends bytes to slave with address `address` and then reads enough bytes to fill `buffer` *in a
/// single transaction*
///
/// # I2C Events (contract)
Expand Down Expand Up @@ -110,7 +110,7 @@ pub trait WriteIterRead {
/// Error type
type Error;

/// Sends bytes to slave with address `addr` and then reads enough bytes to fill `buffer` *in a
/// Sends bytes to slave with address `address` and then reads enough bytes to fill `buffer` *in a
/// single transaction*
///
/// # I2C Events (contract)
Expand Down