Skip to content

Commit 5ef7017

Browse files
committed
update example and changelog
1 parent e065dc9 commit 5ef7017

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
9-
109
### Changed
11-
1210
- Updated the `cast` dependency from 0.2 to 0.3
11+
- Fixed typo in setup of complementary channels
1312

1413
### Added
1514

1615
- Provide getters to serial status flags idle/txe/rxne/tc.
1716
- Provide ability to reset timer UIF interrupt flag
1817
- PWM complementary output capability for TIM1 with new example to demonstrate
18+
- Very simple dead time control of complementary PWM channels
1919

2020
### Fixed
2121

2222
- Wrong mode when using PWM channel 2 of a two-channel timer
2323
- `adc_values` example conversion error
24+
- Fixed typo in setup of complementary channels
2425

2526
## [v0.18.0] - 2021-11-14
2627

examples/pwm_complementary.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ use cortex_m_rt::entry;
1010

1111
use stm32f0xx_hal as hal;
1212

13-
use hal::{delay::Delay, pac, prelude::*, pwm};
13+
use hal::{
14+
delay::Delay,
15+
pac,
16+
prelude::*,
17+
pwm::{self, DTInterval::*, *},
18+
};
1419

1520
#[entry]
1621
fn main() -> ! {
@@ -31,6 +36,8 @@ fn main() -> ! {
3136
let max_duty = ch1.get_max_duty();
3237
ch1.set_duty(max_duty / 2);
3338
ch1.enable();
39+
40+
ch1n.set_dead_time(DT_2);
3441
ch1n.enable();
3542

3643
// simple duty sweep

0 commit comments

Comments
 (0)