Skip to content

Commit a28656a

Browse files
committed
formatting, changelog
1 parent 4b0d176 commit a28656a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12-
- PWM complementary output capability for TIM1
13-
- New example to demonstrate
12+
- PWM complementary output capability for TIM1 with new example to demonstrate
1413

1514
### Changed
1615

examples/pwm_complementary.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
use panic_halt as _;
77

88
use cortex_m_rt::entry;
9+
use cortex_m;
910

1011
use stm32f0xx_hal as hal;
1112

12-
use hal::{pac, prelude::*, pwm, delay::Delay};
13-
use cortex_m;
13+
use hal::{delay::Delay, pac, prelude::*, pwm};
14+
1415

1516
#[entry]
1617
fn main() -> ! {
@@ -22,7 +23,7 @@ fn main() -> ! {
2223
let channels = cortex_m::interrupt::free(move |cs| {
2324
(
2425
gpioa.pa8.into_alternate_af2(cs), // on TIM1_CH1
25-
gpioa.pa7.into_alternate_af2(cs) // on TIM1_CH1N
26+
gpioa.pa7.into_alternate_af2(cs), // on TIM1_CH1N
2627
)
2728
});
2829

@@ -57,4 +58,5 @@ fn main() -> ! {
5758
loop {
5859
cortex_m::asm::nop();
5960
}
61+
6062
}

src/pwm.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -874,13 +874,9 @@ macro_rules! pwm_1_channel_with_complementary_outputs {
874874

875875
use crate::pac::*;
876876

877-
pwm_4_channels!(
878-
TIM3: (tim3, tim3en, tim3rst, apb1enr, apb1rstr),
879-
);
877+
pwm_4_channels!(TIM3: (tim3, tim3en, tim3rst, apb1enr, apb1rstr),);
880878

881-
pwm_4_channels_with_3_complementary_outputs!(
882-
TIM1: (tim1, tim1en, tim1rst, apb2enr, apb2rstr),
883-
);
879+
pwm_4_channels_with_3_complementary_outputs!(TIM1: (tim1, tim1en, tim1rst, apb2enr, apb2rstr),);
884880
pwm_1_channel!(TIM14: (tim14, tim14en, tim14rst, apb1enr, apb1rstr),);
885881

886882
pwm_1_channel_with_complementary_outputs!(

0 commit comments

Comments
 (0)