File tree Expand file tree Collapse file tree 4 files changed +723
-841
lines changed Expand file tree Collapse file tree 4 files changed +723
-841
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ fn main() -> ! {
70
70
info ! ( "" ) ;
71
71
72
72
// Initialise the SPI peripheral.
73
- let spi: spi:: Spi < _ , _ , u8 > = dp . SPI2 . spi (
73
+ let spi = dp . SPI2 . spi :: < _ , u8 > (
74
74
( sck, miso, mosi) ,
75
75
spi:: MODE_0 ,
76
76
1 . MHz ( ) ,
Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ fn main() -> ! {
44
44
// GPIOA in the RCC register.
45
45
let gpioa = dp. GPIOA . split ( ccdr. peripheral . GPIOA ) ;
46
46
47
- let sck = gpioa. pa5 . into_alternate :: < 5 > ( ) ;
48
- let miso = gpioa. pa6 . into_alternate ( ) ;
49
- let mosi = gpioa. pa7 . into_alternate ( ) ;
47
+ let sck = gpioa. pa5 ;
48
+ let miso = gpioa. pa6 ;
49
+ let mosi = gpioa. pa7 ;
50
50
// Because we want to use the hardware chip select, we need to provide that too
51
- let hcs = gpioa. pa4 . into_alternate ( ) ;
51
+ let hcs = gpioa. pa4 ;
52
52
53
53
info ! ( "" ) ;
54
54
info ! ( "stm32h7xx-hal example - SPI" ) ;
Original file line number Diff line number Diff line change @@ -2435,8 +2435,8 @@ pub mod spi1 {
2435
2435
PD7 <5 >,
2436
2436
] ,
2437
2437
<Nss > for [
2438
- PA15 <5 >,
2439
2438
PA4 <5 >,
2439
+ PA15 <5 >,
2440
2440
PG10 <5 >,
2441
2441
] ,
2442
2442
}
@@ -2446,8 +2446,8 @@ pub mod spi2 {
2446
2446
use super :: * ;
2447
2447
pin ! {
2448
2448
<Sck > for no: NoPin , [
2449
- PA12 <5 >,
2450
2449
PA9 <5 >,
2450
+ PA12 <5 >,
2451
2451
PB10 <5 >,
2452
2452
PB13 <5 >,
2453
2453
PD3 <5 >,
@@ -2458,7 +2458,7 @@ pub mod spi2 {
2458
2458
<Miso > for no: NoPin , [
2459
2459
PB14 <5 >,
2460
2460
2461
- #[ cfg( any( feature = "gpio-h747" , feature = "gpio-h7a2" ) ) ]
2461
+ // #[cfg(any(feature = "gpio-h747", feature = "gpio-h7a2"))] TODO: check
2462
2462
PC2 <5 >,
2463
2463
#[ cfg( any( feature = "gpio-h747" , feature = "gpio-h7a2" ) ) ]
2464
2464
PI2 <5 >,
@@ -2467,15 +2467,15 @@ pub mod spi2 {
2467
2467
PB15 <5 >,
2468
2468
PC1 <5 >,
2469
2469
2470
- #[ cfg( any( feature = "gpio-h747" , feature = "gpio-h7a2" ) ) ]
2470
+ // #[cfg(any(feature = "gpio-h747", feature = "gpio-h7a2"))] TODO: check
2471
2471
PC3 <5 >,
2472
2472
#[ cfg( any( feature = "gpio-h747" , feature = "gpio-h7a2" ) ) ]
2473
2473
PI3 <5 >,
2474
2474
] ,
2475
2475
<Nss > for [
2476
2476
PA11 <5 >,
2477
- PB12 <5 >,
2478
2477
PB4 <7 >,
2478
+ PB12 <5 >,
2479
2479
PB9 <5 >,
2480
2480
2481
2481
#[ cfg( any( feature = "gpio-h747" , feature = "gpio-h7a2" ) ) ]
You can’t perform that action at this time.
0 commit comments