File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
8
8
## [ Unreleased]
9
9
10
10
- Improve SPI::new* docs [ #587 ]
11
+ - Add advanced timer dead time insertion example [ #585 ]
11
12
12
13
## [ v0.15.0] - 2023-03-13
13
14
Original file line number Diff line number Diff line change @@ -25,21 +25,19 @@ fn main() -> ! {
25
25
let mut pwm = dp. TIM1 . pwm_hz ( channels, 20 . kHz ( ) , & clocks) ;
26
26
27
27
let max_duty: u16 = pwm. get_max_duty ( ) ;
28
-
28
+
29
29
pwm. set_polarity ( Channel :: C1 , Polarity :: ActiveHigh ) ;
30
30
pwm. set_complementary_polarity ( Channel :: C1 , Polarity :: ActiveHigh ) ;
31
31
32
32
pwm. set_duty ( Channel :: C1 , max_duty / 2 ) ;
33
-
34
- pwm. set_dead_time ( 200 ) ;
35
-
33
+
34
+ pwm. set_dead_time ( 200 ) ;
35
+
36
36
pwm. enable ( Channel :: C1 ) ;
37
37
pwm. enable_complementary ( Channel :: C1 ) ;
38
+ }
38
39
39
- }
40
-
41
40
loop {
42
41
cortex_m:: asm:: nop ( ) ;
43
42
}
44
43
}
45
-
You can’t perform that action at this time.
0 commit comments