Skip to content

Commit fe86866

Browse files
committed
fix rebase 610
1 parent f1b44d6 commit fe86866

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/gpio/alt.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{Alternate, NoPin, OpenDrain, PinMode, PushPull};
1+
use super::{marker, Alternate, NoPin, OpenDrain, PinMode, PushPull};
22
use crate::gpio::{self, Edge, ExtiPin};
33
use crate::pac::EXTI;
44
use crate::syscfg::SysCfg;
@@ -129,11 +129,11 @@ macro_rules! pin {
129129

130130
$(
131131
$(#[$attr])*
132-
impl From<gpio::$PX> for $name
132+
impl<MODE> From<gpio::$PX<MODE>> for $name
133133
where
134-
Alternate<$A, $Otype>: PinMode,
134+
MODE: marker::NotAlt + PinMode
135135
{
136-
fn from(p: gpio::$PX) -> Self {
136+
fn from(p: gpio::$PX<MODE>) -> Self {
137137
Self::$PX(p.into_mode())
138138
}
139139
}
@@ -228,11 +228,12 @@ macro_rules! pin {
228228

229229
$(
230230
$(#[$attr])*
231-
impl<Otype> From<gpio::$PX> for $name<Otype>
231+
impl<MODE, Otype> From<gpio::$PX<MODE>> for $name<Otype>
232232
where
233+
MODE: marker::NotAlt + PinMode,
233234
Alternate<$A, Otype>: PinMode,
234235
{
235-
fn from(p: gpio::$PX) -> Self {
236+
fn from(p: gpio::$PX<MODE>) -> Self {
236237
Self::$PX(p.into_mode())
237238
}
238239
}

0 commit comments

Comments
 (0)