Skip to content

Commit a51bb0e

Browse files
Add pins for SPI2
1 parent 78b252a commit a51bb0e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/spi.rs

+16
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ spi_pins! {
7676
mosi => [gpiob::PB15<Alternate<AF0>>],
7777
}
7878
}
79+
#[cfg(any(feature = "stm32f030x8", feature = "stm32f030xc"))]
80+
spi_pins! {
81+
SPI2 => {
82+
sck => [gpiob::PB13<Alternate<AF0>>],
83+
miso => [gpiob::PB14<Alternate<AF0>>],
84+
mosi => [gpiob::PB15<Alternate<AF0>>],
85+
}
86+
}
87+
#[cfg(feature = "stm32f030xc")]
88+
spi_pins! {
89+
SPI2 => {
90+
sck => [gpiob::PB10<Alternate<AF5>>],
91+
miso => [gpioc::PC2<Alternate<AF1>>],
92+
mosi => [gpioc::PC3<Alternate<AF1>>],
93+
}
94+
}
7995

8096
macro_rules! spi {
8197
($($SPI:ident: ($spi:ident, $spiXen:ident, $spiXrst:ident, $apbenr:ident, $apbrstr:ident),)+) => {

0 commit comments

Comments
 (0)