Skip to content

Commit

Permalink
Migrate to embedded-hal 1.0.0-alpha.9
Browse files Browse the repository at this point in the history
  • Loading branch information
taks authored and Rahix committed Nov 22, 2022
1 parent b78409b commit c09023d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -24,7 +24,7 @@ xtensa-lx = { version = "0.6.0", optional = true }
spin = { version = "0.9.2", optional = true }
atomic-polyfill = { version = "0.1.6", optional = true }

embedded-hal-alpha = { package = "embedded-hal", version = "=1.0.0-alpha.8", optional = true }
embedded-hal-alpha = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true }

[dev-dependencies]
embedded-hal-mock = "0.8"
Expand Down
8 changes: 4 additions & 4 deletions src/proxies.rs
Expand Up @@ -75,9 +75,9 @@ where
}

#[cfg(feature = "eh-alpha")]
impl<'a, M: crate::BusMutex> i2c_alpha::blocking::I2c for I2cProxy<'a, M>
impl<'a, M: crate::BusMutex> i2c_alpha::I2c for I2cProxy<'a, M>
where
M::Bus: i2c_alpha::blocking::I2c,
M::Bus: i2c_alpha::I2c,
{
fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
self.mutex.lock(|bus| bus.read(address, buffer))
Expand Down Expand Up @@ -120,14 +120,14 @@ where
fn transaction<'b>(
&mut self,
address: u8,
operations: &mut [i2c_alpha::blocking::Operation<'b>],
operations: &mut [i2c_alpha::Operation<'b>],
) -> Result<(), Self::Error> {
self.mutex.lock(|bus| bus.transaction(address, operations))
}

fn transaction_iter<'b, O>(&mut self, address: u8, operations: O) -> Result<(), Self::Error>
where
O: IntoIterator<Item = i2c_alpha::blocking::Operation<'b>>,
O: IntoIterator<Item = i2c_alpha::Operation<'b>>,
{
self.mutex
.lock(|bus| bus.transaction_iter(address, operations))
Expand Down

0 comments on commit c09023d

Please sign in to comment.