@@ -18,6 +18,8 @@ use crate::stm32::spi1;
18
18
) ) ]
19
19
use crate :: stm32:: SPI4 ;
20
20
21
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
22
+ use crate :: gpio:: gpioa:: { PA1 , PA10 , PA12 , PA13 , PA2 , PA3 , PA8 , PA9 } ;
21
23
#[ cfg( any(
22
24
feature = "stm32f302x6" ,
23
25
feature = "stm32f302x8" ,
@@ -39,16 +41,24 @@ use crate::gpio::gpioa::{PA5, PA6, PA7};
39
41
feature = "stm32f398"
40
42
) ) ]
41
43
use crate :: gpio:: gpiob:: PB13 ;
44
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
45
+ use crate :: gpio:: gpiob:: { PB0 , PB10 , PB8 } ;
42
46
use crate :: gpio:: gpiob:: { PB14 , PB15 , PB5 } ;
43
47
#[ cfg( any(
44
48
feature = "stm32f302" ,
45
49
feature = "stm32f303" ,
46
50
feature = "stm32f318" ,
47
51
feature = "stm32f328" ,
48
52
feature = "stm32f358" ,
53
+ feature = "stm32f373" ,
54
+ feature = "stm32f378" ,
49
55
) ) ]
50
56
use crate :: gpio:: gpiob:: { PB3 , PB4 } ;
51
57
use crate :: gpio:: gpioc:: { PC10 , PC11 , PC12 } ;
58
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
59
+ use crate :: gpio:: gpioc:: { PC2 , PC3 , PC7 , PC8 , PC9 } ;
60
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
61
+ use crate :: gpio:: gpiod:: { PD3 , PD4 , PD7 , PD8 } ;
52
62
#[ cfg( any(
53
63
feature = "stm32f302xd" ,
54
64
feature = "stm32f302xe" ,
@@ -66,6 +76,8 @@ use crate::gpio::gpioe::{PE12, PE13, PE14, PE2, PE5, PE6};
66
76
feature = "stm32f318" ,
67
77
) ) ]
68
78
use crate :: gpio:: gpiof:: PF1 ;
79
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
80
+ use crate :: gpio:: gpiof:: PF6 ;
69
81
#[ cfg( any(
70
82
feature = "stm32f302xb" ,
71
83
feature = "stm32f302xc" ,
@@ -134,6 +146,8 @@ pub unsafe trait MisoPin<SPI> {}
134
146
pub unsafe trait MosiPin < SPI > { }
135
147
136
148
unsafe impl SckPin < SPI1 > for PA5 < AF5 > { }
149
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
150
+ unsafe impl SckPin < SPI1 > for PA12 < AF6 > { }
137
151
#[ cfg( any(
138
152
feature = "stm32f302xb" ,
139
153
feature = "stm32f302xc" ,
@@ -142,9 +156,19 @@ unsafe impl SckPin<SPI1> for PA5<AF5> {}
142
156
feature = "stm32f303" ,
143
157
feature = "stm32f328" ,
144
158
feature = "stm32f358" ,
159
+ feature = "stm32f373" ,
160
+ feature = "stm32f378" ,
145
161
) ) ]
146
162
unsafe impl SckPin < SPI1 > for PB3 < AF5 > { }
147
-
163
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
164
+ unsafe impl SckPin < SPI1 > for PC7 < AF5 > { }
165
+
166
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
167
+ unsafe impl SckPin < SPI2 > for PA8 < AF5 > { }
168
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
169
+ unsafe impl SckPin < SPI2 > for PB8 < AF5 > { }
170
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
171
+ unsafe impl SckPin < SPI2 > for PB10 < AF5 > { }
148
172
#[ cfg( any(
149
173
feature = "stm32f301" ,
150
174
feature = "stm32f302" ,
@@ -155,6 +179,10 @@ unsafe impl SckPin<SPI1> for PB3<AF5> {}
155
179
feature = "stm32f398"
156
180
) ) ]
157
181
unsafe impl SckPin < SPI2 > for PB13 < AF5 > { }
182
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
183
+ unsafe impl SckPin < SPI2 > for PD7 < AF5 > { }
184
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
185
+ unsafe impl SckPin < SPI2 > for PD8 < AF5 > { }
158
186
#[ cfg( any(
159
187
feature = "stm32f302x6" ,
160
188
feature = "stm32f302x8" ,
@@ -190,11 +218,15 @@ unsafe impl SckPin<SPI2> for PF9<AF5> {}
190
218
) ) ]
191
219
unsafe impl SckPin < SPI2 > for PF10 < AF5 > { }
192
220
221
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
222
+ unsafe impl SckPin < SPI3 > for PA1 < AF6 > { }
193
223
#[ cfg( any(
194
224
feature = "stm32f302" ,
195
225
feature = "stm32f303xd" ,
196
226
feature = "stm32f303xe" ,
197
227
feature = "stm32f318" ,
228
+ feature = "stm32f373" ,
229
+ feature = "stm32f378" ,
198
230
) ) ]
199
231
unsafe impl SckPin < SPI3 > for PB3 < AF6 > { }
200
232
unsafe impl SckPin < SPI3 > for PC10 < AF6 > { }
@@ -215,6 +247,8 @@ unsafe impl SckPin<SPI4> for PE2<AF5> {}
215
247
unsafe impl SckPin < SPI4 > for PE12 < AF5 > { }
216
248
217
249
unsafe impl MisoPin < SPI1 > for PA6 < AF5 > { }
250
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
251
+ unsafe impl MisoPin < SPI1 > for PA13 < AF6 > { }
218
252
#[ cfg( any(
219
253
feature = "stm32f302xb" ,
220
254
feature = "stm32f302xc" ,
@@ -223,9 +257,15 @@ unsafe impl MisoPin<SPI1> for PA6<AF5> {}
223
257
feature = "stm32f303" ,
224
258
feature = "stm32f328" ,
225
259
feature = "stm32f358" ,
260
+ feature = "stm32f373" ,
261
+ feature = "stm32f378" ,
226
262
) ) ]
227
263
unsafe impl MisoPin < SPI1 > for PB4 < AF5 > { }
264
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
265
+ unsafe impl MisoPin < SPI1 > for PC8 < AF5 > { }
228
266
267
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
268
+ unsafe impl MisoPin < SPI2 > for PA9 < AF5 > { }
229
269
#[ cfg( any(
230
270
feature = "stm32f302x6" ,
231
271
feature = "stm32f302x8" ,
@@ -237,12 +277,20 @@ unsafe impl MisoPin<SPI1> for PB4<AF5> {}
237
277
) ) ]
238
278
unsafe impl MisoPin < SPI2 > for PA10 < AF5 > { }
239
279
unsafe impl MisoPin < SPI2 > for PB14 < AF5 > { }
280
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
281
+ unsafe impl MisoPin < SPI2 > for PC2 < AF5 > { }
282
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
283
+ unsafe impl MisoPin < SPI2 > for PD3 < AF5 > { }
240
284
285
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
286
+ unsafe impl MisoPin < SPI3 > for PA2 < AF6 > { }
241
287
#[ cfg( any(
242
288
feature = "stm32f302" ,
243
289
feature = "stm32f303xd" ,
244
290
feature = "stm32f303xe" ,
245
291
feature = "stm32f318" ,
292
+ feature = "stm32f373" ,
293
+ feature = "stm32f378" ,
246
294
) ) ]
247
295
unsafe impl MisoPin < SPI3 > for PB4 < AF6 > { }
248
296
unsafe impl MisoPin < SPI3 > for PC11 < AF6 > { }
@@ -263,8 +311,16 @@ unsafe impl MisoPin<SPI4> for PE5<AF5> {}
263
311
unsafe impl MisoPin < SPI4 > for PE13 < AF5 > { }
264
312
265
313
unsafe impl MosiPin < SPI1 > for PA7 < AF5 > { }
314
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
315
+ unsafe impl MosiPin < SPI1 > for PB0 < AF5 > { }
266
316
unsafe impl MosiPin < SPI1 > for PB5 < AF5 > { }
317
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
318
+ unsafe impl MosiPin < SPI1 > for PC9 < AF5 > { }
319
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
320
+ unsafe impl MosiPin < SPI1 > for PF6 < AF5 > { }
267
321
322
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
323
+ unsafe impl MosiPin < SPI2 > for PA10 < AF5 > { }
268
324
#[ cfg( any(
269
325
feature = "stm32f302x6" ,
270
326
feature = "stm32f302x8" ,
@@ -276,7 +332,13 @@ unsafe impl MosiPin<SPI1> for PB5<AF5> {}
276
332
) ) ]
277
333
unsafe impl MosiPin < SPI2 > for PA11 < AF5 > { }
278
334
unsafe impl MosiPin < SPI2 > for PB15 < AF5 > { }
335
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
336
+ unsafe impl MisoPin < SPI2 > for PC3 < AF5 > { }
337
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
338
+ unsafe impl MisoPin < SPI2 > for PD4 < AF5 > { }
279
339
340
+ #[ cfg( any( feature = "stm32f373" , feature = "stm32f378" ) ) ]
341
+ unsafe impl MisoPin < SPI3 > for PA3 < AF6 > { }
280
342
unsafe impl MosiPin < SPI3 > for PB5 < AF6 > { }
281
343
unsafe impl MosiPin < SPI3 > for PC12 < AF6 > { }
282
344
0 commit comments