Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
avsaase committed Oct 28, 2024
1 parent da834eb commit 2d80c94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ license = "MIT OR Apache-2.0"
[dependencies]
cfg-if = "1.0.0"

embassy-time = { version = "0.1.5", git = "https://github.com/embassy-rs/embassy/", rev = "fe8c46bce329efe7921386dd46a493f607453bd8" }
embedded-hal-async = "1.0.0-rc.2"
embedded-hal = "1.0.0-rc.2"
embassy-time = { version = "0.3.2" }
embedded-hal-async = "1.0.0"
embedded-hal = "1.0.0"
defmt = { version = "0.3.5", optional = true }

tokio = { version = "1.34.0", default-features = false, optional = true }

[dev-dependencies]
embedded-hal-mock = { version = "0.10.0-rc.3", default-features = false, features = [
embedded-hal-mock = { version = "0.10.0", default-features = false, features = [
"eh1",
"embedded-time",
"embedded-hal-async",
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ where
}
}

fn is_pin_pressed(&self) -> bool {
fn is_pin_pressed(&mut self) -> bool {
self.pin.is_low().unwrap_or(self.config.mode.is_pulldown()) == self.config.mode.is_pullup()
}

fn is_pin_released(&self) -> bool {
fn is_pin_released(&mut self) -> bool {
!self.is_pin_pressed()
}

Expand Down
4 changes: 2 additions & 2 deletions tests/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ impl MockPin {
}

impl embedded_hal::digital::InputPin for MockPin {
fn is_high(&self) -> Result<bool, Self::Error> {
fn is_high(&mut self) -> Result<bool, Self::Error> {
match self.0.try_read() {
Ok(rw) => Ok(*rw),
Err(_) => Err(MockError),
}
}

fn is_low(&self) -> Result<bool, Self::Error> {
fn is_low(&mut self) -> Result<bool, Self::Error> {
match self.0.try_read() {
Ok(rw) => Ok(!*rw),
Err(_) => Err(MockError),
Expand Down

0 comments on commit 2d80c94

Please sign in to comment.