Skip to content

Commit 397d4a0

Browse files
committed
Update docs
1 parent b30fe24 commit 397d4a0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Make `Clocks` `ppre1()` and `ppre2()` methods public, to get the current
1313
Prescaler value. ([#210])
14-
- Implement `into_xxx` methods for partially erased pins ([#189])
1514
- Enable better GPIO internal resistor configuration ([#189])
1615
- Support for GPIO output slew rate configuration ([#189])
1716
- Support for GPIO interrupts ([#189])
17+
- Implement `into_xxx` methods for erased pins ([#213])
1818

1919
### Changed
2020

@@ -59,6 +59,7 @@ let clocks = rcc
5959
in alternate function mode ([#189])
6060
- GPIO internal resistor configuration is no longer encoded into pin typestate
6161
in input mode ([#189])
62+
- GPIO configuration functions no longer require registers as arguments ([#213])
6263

6364
## [v0.6.1] - 2020-12-10
6465

@@ -313,6 +314,7 @@ let clocks = rcc
313314
[defmt]: https://github.com/knurling-rs/defmt
314315
[filter]: https://defmt.ferrous-systems.com/filtering.html
315316

317+
[#213]: https://github.com/stm32-rs/stm32f3xx-hal/pull/213
316318
[#211]: https://github.com/stm32-rs/stm32f3xx-hal/pull/211
317319
[#210]: https://github.com/stm32-rs/stm32f3xx-hal/pull/210
318320
[#208]: https://github.com/stm32-rs/stm32f3xx-hal/pull/208

src/pwm.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
4949
```
5050
let mut gpioa = dp.GPIOB.split(&mut rcc.ahb);
51-
let pa6 = gpioa.pa6.into_af2(&mut gpioa.moder, &mut gpioa.afrl);
51+
let pa6 = gpioa.pa6.into_af2_push_pull();
5252
5353
let mut gpiob = dp.GPIOB.split(&mut rcc.ahb);
54-
let pb1 = gpiob.pb1.into_af2(&mut gpiob.moder, &mut gpiob.afrl);
55-
let pb4 = gpiob.pb4.into_af2(&mut gpiob.moder, &mut gpiob.afrl);
54+
let pb1 = gpiob.pb1.into_af2_push_pull();
55+
let pb4 = gpiob.pb4.into_af2_open_drain();
5656
5757
let mut ch1 = ch1_no_pins
5858
.output_to_pa6(pa6)
@@ -122,7 +122,7 @@
122122
let mut (ch1_no_pins, _, _, _) = tim1(device.TIM3, 9000, 50.Hz(), clocks);
123123
124124
let mut gpioa = dp.GPIOB.split(&mut rcc.ahb);
125-
let pa7 = gpioa.pa7.into_af6(&mut gpioa.moder, &mut gpioa.afrl);
125+
let pa7 = gpioa.pa7.into_af6_push_pull();
126126
127127
let mut ch1 = ch1_no_pins.output_to(pa7);
128128
ch1.enable();
@@ -137,8 +137,8 @@
137137
...
138138
139139
let mut gpioa = dp.GPIOB.split(&mut rcc.ahb);
140-
let pa7 = gpioa.pa7.into_af6(&mut gpioa.moder, &mut gpioa.afrl);
141-
let pa8 = gpioa.pa8.into_af6(&mut gpioa.moder, &mut gpioa.afrl);
140+
let pa7 = gpioa.pa7.into_af6_push_pull();
141+
let pa8 = gpioa.pa8.into_af6_push_pull();
142142
143143
let mut ch1 = ch1_no_pins
144144
.output_to(pa7)

0 commit comments

Comments
 (0)