Skip to content

Commit a68f992

Browse files
committed
Make SPI pin modes GPIO reset states.
1 parent d51e159 commit a68f992

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/spi.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::gpio::gpioa::*;
22
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
33
use crate::gpio::gpiob::*;
44

5-
use crate::gpio::{AltMode, Floating, Input};
5+
use crate::gpio::{AltMode, Analog};
66
use crate::hal;
77
use crate::pac::SPI1;
88
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
@@ -107,20 +107,20 @@ pins! {
107107
SPI1:
108108
SCK: [
109109
[NoSck, None],
110-
[PB3<Input<Floating>>, AltMode::AF0],
111-
[PA5<Input<Floating>>, AltMode::AF0]
110+
[PB3<Analog>, AltMode::AF0],
111+
[PA5<Analog>, AltMode::AF0]
112112
]
113113
MISO: [
114114
[NoMiso, None],
115-
[PA6<Input<Floating>>, AltMode::AF0],
116-
[PA11<Input<Floating>>, AltMode::AF0],
117-
[PB4<Input<Floating>>, AltMode::AF0]
115+
[PA6<Analog>, AltMode::AF0],
116+
[PA11<Analog>, AltMode::AF0],
117+
[PB4<Analog>, AltMode::AF0]
118118
]
119119
MOSI: [
120120
[NoMosi, None],
121-
[PA7<Input<Floating>>, AltMode::AF0],
122-
[PA12<Input<Floating>>, AltMode::AF0],
123-
[PB5<Input<Floating>>, AltMode::AF0]
121+
[PA7<Analog>, AltMode::AF0],
122+
[PA12<Analog>, AltMode::AF0],
123+
[PB5<Analog>, AltMode::AF0]
124124
]
125125
}
126126

@@ -129,15 +129,15 @@ pins! {
129129
SPI2:
130130
SCK: [
131131
[NoSck, None],
132-
[PB13<Input<Floating>>, AltMode::AF0]
132+
[PB13<Analog>, AltMode::AF0]
133133
]
134134
MISO: [
135135
[NoMiso, None],
136-
[PB14<Input<Floating>>, AltMode::AF0]
136+
[PB14<Analog>, AltMode::AF0]
137137
]
138138
MOSI: [
139139
[NoMosi, None],
140-
[PB15<Input<Floating>>, AltMode::AF0]
140+
[PB15<Analog>, AltMode::AF0]
141141
]
142142
}
143143

@@ -146,15 +146,15 @@ pins! {
146146
SPI1:
147147
SCK: [
148148
[NoSck, None],
149-
[PA5<Input<Floating>>, AltMode::AF0]
149+
[PA5<Analog>, AltMode::AF0]
150150
]
151151
MISO: [
152152
[NoMiso, None],
153-
[PA6<Input<Floating>>, AltMode::AF0]
153+
[PA6<Analog>, AltMode::AF0]
154154
]
155155
MOSI: [
156156
[NoMosi, None],
157-
[PA7<Input<Floating>>, AltMode::AF0]
157+
[PA7<Analog>, AltMode::AF0]
158158
]
159159
}
160160

@@ -316,4 +316,4 @@ spi! {
316316
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
317317
spi! {
318318
SPI2: (spi2, apb1enr, spi2en, apb1_clk),
319-
}
319+
}

0 commit comments

Comments
 (0)