Skip to content

Commit cf8440c

Browse files
Gekkiotherealprof
authored andcommitted
Set mode correctly on C2 of 2-channel PWM
1 parent 16c5fac commit cf8440c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pwm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ macro_rules! pwm_2_channels {
321321
tim.ccmr1_output().modify(|_, w| w.oc1pe().set_bit().oc1m().bits(6));
322322
}
323323
if PINS::C2 {
324-
tim.ccmr1_output().modify(|_, w| w.oc2pe().set_bit().oc1m().bits(6));
324+
tim.ccmr1_output().modify(|_, w| w.oc2pe().set_bit().oc2m().bits(6));
325325
}
326326

327327
// If pclk is prescaled from hclk, the frequency fed into the timers is doubled

0 commit comments

Comments
 (0)