Skip to content

Commit e0cbfe1

Browse files
authored
Merge pull request #34 from almusil/fix_default_pin_configuration
gpio: Fix default pin configuration
2 parents 0c3056c + ffae817 commit e0cbfe1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/gpio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::marker::PhantomData;
44
use crate::rcc::Rcc;
55

66
/// Default pin mode
7-
pub type DefaultMode = Input<Floating>;
7+
pub type DefaultMode = Analog;
88

99
/// Extension trait to split a GPIO peripheral in independent pins and registers
1010
pub trait GpioExt {
@@ -87,7 +87,7 @@ macro_rules! gpio {
8787
/// GPIO parts
8888
pub struct Parts {
8989
$(
90-
pub $pxi: $PXi<Input<Floating>>,
90+
pub $pxi: $PXi<DefaultMode>,
9191
)+
9292
}
9393

@@ -189,9 +189,9 @@ macro_rules! gpio {
189189
}
190190
}
191191

192-
impl Into<$PXi<Analog>> for $PXi<DefaultMode> {
193-
fn into(self) -> $PXi<Analog> {
194-
self.into_analog()
192+
impl Into<$PXi<Input<Floating>>> for $PXi<DefaultMode> {
193+
fn into(self) -> $PXi<Input<Floating>> {
194+
self.into_floating_input()
195195
}
196196
}
197197

0 commit comments

Comments
 (0)