Skip to content

Commit

Permalink
GPIO pin fn's take &mut for eh-1.0-rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
9names committed Dec 28, 2023
1 parent 9e69a5b commit 2d9498c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,11 @@ macro_rules! impl_glb {
}

impl<MODE> InputPin for $Pini<Input<MODE>> {
fn is_high(&self) -> Result<bool, Self::Error> {
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(self.is_high_inner())
}

fn is_low(&self) -> Result<bool, Self::Error> {
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(self.is_low_inner())
}
}
Expand Down Expand Up @@ -570,11 +570,11 @@ macro_rules! impl_glb {
}

impl<MODE> StatefulOutputPin for $Pini<Output<MODE>> {
fn is_set_high(&self) -> Result<bool, Self::Error> {
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
Ok(self.is_output_high_inner())
}

fn is_set_low(&self) -> Result<bool, Self::Error> {
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
Ok(self.is_output_low_inner())
}
}
Expand Down

0 comments on commit 2d9498c

Please sign in to comment.