Skip to content

Commit

Permalink
🐛 use same error for all e-hal 0.2 trait impls (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vollbrecht authored Jun 7, 2023
1 parent 8c3f90d commit ec7dafa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,14 +1223,14 @@ impl<'d, T: Pin, MODE> embedded_hal_0_2::digital::v2::OutputPin for PinDriver<'d
where
MODE: OutputMode,
{
type Error = GpioError;
type Error = EspError;

fn set_high(&mut self) -> Result<(), Self::Error> {
self.set_level(Level::High).map_err(to_gpio_err)
self.set_level(Level::High)
}

fn set_low(&mut self) -> Result<(), Self::Error> {
self.set_level(Level::Low).map_err(to_gpio_err)
self.set_level(Level::Low)
}
}

Expand Down

0 comments on commit ec7dafa

Please sign in to comment.