Skip to content

Commit b040f1d

Browse files
committed
gpioe: AF1 enablement
+ This commit reenables AF1 for pin 13, 14, 15 on GPIOE which is necessary for SPI communication.
1 parent 8eda864 commit b040f1d

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

src/spi.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,21 @@ spi_pins! {
136136
mosi => [gpiob::PB15<Alternate<AF0>>],
137137
}
138138
}
139-
// TODO: The ST SVD files are missing the entire PE enable register.
140-
// So those pins do not exist in the register definitions.
141-
// Re-enable as soon as this gets fixed.
142-
// #[cfg(any(
143-
// feature = "stm32f071",
144-
// feature = "stm32f072",
145-
// feature = "stm32f078",
146-
// feature = "stm32f091",
147-
// feature = "stm32f098",
148-
// ))]
149-
// spi_pins! {
150-
// SPI1 => {
151-
// sck => [gpioe::PE13<Alternate<AF1>>],
152-
// miso => [gpioe::PE14<Alternate<AF1>>],
153-
// mosi => [gpioe::PE15<Alternate<AF1>>],
154-
// }
155-
// }
139+
140+
#[cfg(any(
141+
feature = "stm32f071",
142+
feature = "stm32f072",
143+
feature = "stm32f078",
144+
feature = "stm32f091",
145+
feature = "stm32f098",
146+
))]
147+
spi_pins! {
148+
SPI1 => {
149+
sck => [gpioe::PE13<Alternate<AF1>>],
150+
miso => [gpioe::PE14<Alternate<AF1>>],
151+
mosi => [gpioe::PE15<Alternate<AF1>>],
152+
}
153+
}
156154

157155
#[cfg(any(
158156
feature = "stm32f030x8",

0 commit comments

Comments
 (0)