@@ -50,44 +50,53 @@ pub trait MosiPin<SPI>: crate::private::Sealed {}
50
50
impl SckPin < SPI1 > for gpio:: PA5 < AF5 < PushPull > > { }
51
51
impl MisoPin < SPI1 > for gpio:: PA6 < AF5 < PushPull > > { }
52
52
impl MosiPin < SPI1 > for gpio:: PA7 < AF5 < PushPull > > { }
53
- impl MosiPin < SPI1 > for gpio:: PB5 < AF5 < PushPull > > { }
54
53
54
+ #[ cfg( not( feature = "gpio-f373" ) ) ]
55
+ impl SckPin < SPI2 > for gpio:: PB13 < AF5 < PushPull > > { }
56
+ #[ cfg( feature = "gpio-f373" ) ]
57
+ impl SckPin < SPI2 > for gpio:: PB10 < AF5 < PushPull > > { }
55
58
impl MisoPin < SPI2 > for gpio:: PB14 < AF5 < PushPull > > { }
56
59
impl MosiPin < SPI2 > for gpio:: PB15 < AF5 < PushPull > > { }
57
60
58
61
impl MosiPin < SPI3 > for gpio:: PB5 < AF6 < PushPull > > { }
62
+
59
63
impl SckPin < SPI3 > for gpio:: PC10 < AF6 < PushPull > > { }
60
64
impl MisoPin < SPI3 > for gpio:: PC11 < AF6 < PushPull > > { }
61
65
impl MosiPin < SPI3 > for gpio:: PC12 < AF6 < PushPull > > { }
62
66
63
67
cfg_if:: cfg_if! {
64
68
if #[ cfg( feature = "gpio-f373" ) ] {
69
+ impl SckPin <SPI2 > for gpio:: PB8 <AF5 <PushPull >> { }
70
+ impl SckPin <SPI2 > for gpio:: PD7 <AF5 <PushPull >> { }
71
+ impl SckPin <SPI2 > for gpio:: PD8 <AF5 <PushPull >> { }
72
+
65
73
impl SckPin <SPI1 > for gpio:: PA12 <AF6 <PushPull >> { }
66
- impl SckPin <SPI1 > for gpio:: PC7 <AF5 <PushPull >> { }
67
74
impl MisoPin <SPI1 > for gpio:: PA13 <AF6 <PushPull >> { }
68
- impl MisoPin < SPI1 > for gpio :: PC8 < AF5 < PushPull >> { }
75
+
69
76
impl MosiPin <SPI1 > for gpio:: PB0 <AF5 <PushPull >> { }
70
- impl MosiPin <SPI1 > for gpio:: PC9 <AF5 <PushPull >> { }
71
77
impl MosiPin <SPI1 > for gpio:: PF6 <AF5 <PushPull >> { }
72
78
79
+ impl SckPin <SPI1 > for gpio:: PC7 <AF5 <PushPull >> { }
80
+ impl MisoPin <SPI1 > for gpio:: PC8 <AF5 <PushPull >> { }
81
+ impl MosiPin <SPI1 > for gpio:: PC9 <AF5 <PushPull >> { }
82
+
83
+
73
84
impl SckPin <SPI2 > for gpio:: PA8 <AF5 <PushPull >> { }
74
- impl SckPin <SPI2 > for gpio:: PB8 <AF5 <PushPull >> { }
75
- impl SckPin <SPI2 > for gpio:: PB10 <AF5 <PushPull >> { }
76
- impl SckPin <SPI2 > for gpio:: PD7 <AF5 <PushPull >> { }
77
- impl SckPin <SPI2 > for gpio:: PD8 <AF5 <PushPull >> { }
78
85
impl MisoPin <SPI2 > for gpio:: PA9 <AF5 <PushPull >> { }
79
- impl MisoPin <SPI2 > for gpio:: PC2 <AF5 <PushPull >> { }
80
- impl MisoPin <SPI2 > for gpio:: PD3 <AF5 <PushPull >> { }
81
86
impl MosiPin <SPI2 > for gpio:: PA10 <AF5 <PushPull >> { }
87
+
88
+ impl MisoPin <SPI2 > for gpio:: PC2 <AF5 <PushPull >> { }
82
89
impl MisoPin <SPI2 > for gpio:: PC3 <AF5 <PushPull >> { }
90
+
91
+ impl MisoPin <SPI2 > for gpio:: PD3 <AF5 <PushPull >> { }
83
92
impl MisoPin <SPI2 > for gpio:: PD4 <AF5 <PushPull >> { }
84
93
85
94
impl SckPin <SPI3 > for gpio:: PA1 <AF6 <PushPull >> { }
86
95
impl MisoPin <SPI3 > for gpio:: PA2 <AF6 <PushPull >> { }
87
96
impl MisoPin <SPI3 > for gpio:: PA3 <AF6 <PushPull >> { }
97
+
98
+ impl SckPin <SPI3 > for gpio:: PB3 <AF6 <PushPull >> { }
88
99
impl MisoPin <SPI3 > for gpio:: PB4 <AF6 <PushPull >> { }
89
- } else {
90
- impl SckPin <SPI2 > for gpio:: PB13 <AF5 <PushPull >> { }
91
100
}
92
101
}
93
102
@@ -101,10 +110,11 @@ cfg_if::cfg_if! {
101
110
cfg_if:: cfg_if! {
102
111
if #[ cfg( feature = "gpio-f303e" ) ] {
103
112
impl SckPin <SPI4 > for gpio:: PE2 <AF5 <PushPull >> { }
104
- impl SckPin <SPI4 > for gpio:: PE12 <AF5 <PushPull >> { }
105
113
impl MisoPin <SPI4 > for gpio:: PE5 <AF5 <PushPull >> { }
106
- impl MisoPin <SPI4 > for gpio:: PE13 <AF5 <PushPull >> { }
107
114
impl MosiPin <SPI4 > for gpio:: PE6 <AF5 <PushPull >> { }
115
+
116
+ impl SckPin <SPI4 > for gpio:: PE12 <AF5 <PushPull >> { }
117
+ impl MisoPin <SPI4 > for gpio:: PE13 <AF5 <PushPull >> { }
108
118
impl MosiPin <SPI4 > for gpio:: PE14 <AF5 <PushPull >> { }
109
119
}
110
120
}
@@ -127,18 +137,15 @@ cfg_if::cfg_if! {
127
137
}
128
138
}
129
139
130
- #[ cfg( all(
131
- not( feature = "stm32f301" ) ,
132
- not( feature = "gpio-f333" ) ,
133
- not( feature = "gpio-f303" ) ,
134
- ) ) ]
135
- impl SckPin < SPI3 > for gpio:: PB3 < AF6 < PushPull > > { }
136
-
137
- #[ cfg( all(
138
- not( feature = "stm32f301" ) ,
139
- any( feature = "gpio-f302" , feature = "gpio-f303e" ) ,
140
- ) ) ]
141
- impl MisoPin < SPI3 > for gpio:: PB4 < AF6 < PushPull > > { }
140
+ cfg_if:: cfg_if! {
141
+ if #[ cfg( all(
142
+ not( feature = "stm32f301" ) ,
143
+ any( feature = "gpio-f302" , feature = "gpio-f303e" ) ,
144
+ ) ) ] {
145
+ impl SckPin <SPI3 > for gpio:: PB3 <AF6 <PushPull >> { }
146
+ impl MisoPin <SPI3 > for gpio:: PB4 <AF6 <PushPull >> { }
147
+ }
148
+ }
142
149
143
150
/// Configuration trait for the Word Size
144
151
/// used by the SPI peripheral
@@ -434,7 +441,6 @@ mod interrupts {
434
441
}
435
442
}
436
443
437
-
438
444
cfg_if:: cfg_if! {
439
445
if #[ cfg( any( feature = "gpio-f303e" , feature = "svd-f302" ) ) ] {
440
446
// XXX This is a hack.
0 commit comments