Skip to content

Commit b0b696c

Browse files
committed
Reword section about timer remaping
1 parent f3f82b3 commit b0b696c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pwm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
gpioa.pa3.into_alternate_push_pull(&mut gpioa.crl),
2222
);
2323
24-
// Set up the timer as a PWM output. Since there are multiple remap
25-
// options for tim2 that use the same pins, you need to specify
26-
// the remap generic parameter.
24+
// Set up the timer as a PWM output. If selected pins may correspond to different remap options,
25+
// then you must specify the remap generic parameter. Otherwise, if there is no such ambiguity,
26+
// the remap generic parameter can be omitted without complains from the compiler.
2727
let (c1, c2, c3, c4) = Timer::tim2(p.TIM2, &clocks, &mut rcc.apb1)
2828
.pwm::<Tim2NoRemap, _, _, _>(pins, &mut afio.mapr, 1.khz())
2929
.3;

0 commit comments

Comments
 (0)