@@ -31,41 +31,21 @@ fn main() -> ! {
31
31
let clocks = rcc. cfgr . sysclk ( 16 . MHz ( ) ) . freeze ( & mut flash. acr ) ;
32
32
33
33
// Prep the pins we need in their correct alternate function
34
- let mut gpioa = dp. GPIOA . split ( & mut rcc. ahb ) ;
35
- let pa4 = gpioa
36
- . pa4
37
- . into_af2_push_pull ( & mut gpioa. moder , & mut gpioa. otyper , & mut gpioa. afrl ) ;
38
- let pa6 = gpioa
39
- . pa6
40
- . into_af2_push_pull ( & mut gpioa. moder , & mut gpioa. otyper , & mut gpioa. afrl ) ;
41
- let pa7 = gpioa
42
- . pa7
43
- . into_af2_push_pull ( & mut gpioa. moder , & mut gpioa. otyper , & mut gpioa. afrl ) ;
44
-
45
- let mut gpiob = dp. GPIOB . split ( & mut rcc. ahb ) ;
46
- let pb0 = gpiob
47
- . pb0
48
- . into_af2_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrl ) ;
49
- let pb1 = gpiob
50
- . pb1
51
- . into_af2_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrl ) ;
52
- let pb4 = gpiob
53
- . pb4
54
- . into_af2_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrl ) ;
55
- let pb5 = gpiob
56
- . pb5
57
- . into_af2_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrl ) ;
58
- let pb8 = gpiob
59
- . pb8
60
- . into_af1_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrh ) ;
61
- let pb10 = gpiob
62
- . pb10
63
- . into_af1_push_pull ( & mut gpiob. moder , & mut gpiob. otyper , & mut gpiob. afrh ) ;
64
-
65
- let mut gpioc = dp. GPIOC . split ( & mut rcc. ahb ) ;
66
- let pc10 = gpioc
67
- . pc10
68
- . into_af4_push_pull ( & mut gpioc. moder , & mut gpioc. otyper , & mut gpioc. afrh ) ;
34
+ let gpioa = dp. GPIOA . split ( & mut rcc. ahb ) ;
35
+ let pa4 = gpioa. pa4 . into_af2_push_pull ( ) ;
36
+ let pa6 = gpioa. pa6 . into_af2_push_pull ( ) ;
37
+ let pa7 = gpioa. pa7 . into_af2_push_pull ( ) ;
38
+
39
+ let gpiob = dp. GPIOB . split ( & mut rcc. ahb ) ;
40
+ let pb0 = gpiob. pb0 . into_af2_push_pull ( ) ;
41
+ let pb1 = gpiob. pb1 . into_af2_push_pull ( ) ;
42
+ let pb4 = gpiob. pb4 . into_af2_push_pull ( ) ;
43
+ let pb5 = gpiob. pb5 . into_af2_push_pull ( ) ;
44
+ let pb8 = gpiob. pb8 . into_af1_push_pull ( ) ;
45
+ let pb10 = gpiob. pb10 . into_af1_push_pull ( ) ;
46
+
47
+ let gpioc = dp. GPIOC . split ( & mut rcc. ahb ) ;
48
+ let pc10 = gpioc. pc10 . into_af4_push_pull ( ) ;
69
49
70
50
// TIM3
71
51
//
@@ -114,7 +94,7 @@ fn main() -> ! {
114
94
// from the channel.
115
95
//
116
96
// DOES NOT COMPILE
117
- // pb0.into_af15(&mut gpiob.moder, &mut gpiob.afrl );
97
+ // pb0.into_af15();
118
98
119
99
// TIM2
120
100
//
@@ -167,7 +147,7 @@ fn main() -> ! {
167
147
// use).
168
148
//
169
149
// DOES NOT COMPILE
170
- // tim8_ch1.output_to_pc6(gpioc.pc6.into_af4(&mut gpioc.moder, &mut gpioc.afrl ));
150
+ // tim8_ch1.output_to_pc6(gpioc.pc6.into_af4());
171
151
172
152
loop {
173
153
asm:: wfi ( ) ;
0 commit comments