Skip to content

Commit 2520dd4

Browse files
committed
Remove IoPin again, as it was removed from embedded-hal
1 parent 4ca24cf commit 2520dd4

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

nrf-hal-common/src/gpio.rs

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ use crate::pac::P1;
8585
#[cfg(feature = "5340-net")]
8686
use crate::pac::P1_NS as P1;
8787

88-
use crate::hal::digital::v2::{InputPin, IoPin, OutputPin, PinState, StatefulOutputPin};
88+
use crate::hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin};
8989
use void::Void;
9090

9191
impl<MODE> Pin<MODE> {
@@ -360,19 +360,6 @@ impl InputPin for Pin<Output<OpenDrainIO>> {
360360
}
361361
}
362362

363-
impl IoPin<Self, Self> for Pin<Output<OpenDrainIO>> {
364-
type Error = Void;
365-
366-
fn into_input_pin(self) -> Result<Self, Self::Error> {
367-
Ok(self)
368-
}
369-
370-
fn into_output_pin(mut self, state: PinState) -> Result<Self, Self::Error> {
371-
self.set_state(state)?;
372-
Ok(self)
373-
}
374-
}
375-
376363
impl<MODE> OutputPin for Pin<Output<MODE>> {
377364
type Error = Void;
378365

@@ -474,7 +461,7 @@ macro_rules! gpio {
474461
$PX
475462
};
476463

477-
use crate::hal::digital::v2::{InputPin, IoPin, OutputPin, PinState, StatefulOutputPin};
464+
use crate::hal::digital::v2::{OutputPin, StatefulOutputPin, InputPin};
478465
use void::Void;
479466

480467

@@ -699,19 +686,6 @@ macro_rules! gpio {
699686
}
700687
}
701688

702-
impl IoPin<Self, Self> for $PXi<Output<OpenDrainIO>> {
703-
type Error = Void;
704-
705-
fn into_input_pin(self) -> Result<Self, Self::Error> {
706-
Ok(self)
707-
}
708-
709-
fn into_output_pin(mut self, state: PinState) -> Result<Self, Self::Error> {
710-
self.set_state(state)?;
711-
Ok(self)
712-
}
713-
}
714-
715689
impl<MODE> From<$PXi<MODE>> for Pin<MODE> {
716690
fn from(value: $PXi<MODE>) -> Self {
717691
value.degrade()

0 commit comments

Comments
 (0)