File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -560,25 +560,22 @@ pub mod config {
560
560
/// unsafe {
561
561
/// let tim = &(*TIM1::ptr());
562
562
///
563
- /// //This is pwm mode 1, the default mode is "frozen" which won't work
564
- /// let mode = 0b0110;
565
- ///
566
563
/// //Channel 1
567
564
/// //Disable the channel before configuring it
568
565
/// tim.ccer.modify(|_, w| w.cc1e().clear_bit());
569
566
///
570
- /// tim.ccmr1_output.modify(|_, w| w
567
+ /// tim.ccmr1_output() .modify(|_, w| w
571
568
/// //Preload enable for channel
572
569
/// .oc1pe().set_bit()
573
570
///
574
- /// //Set mode for channel
575
- /// .oc1m().bits(mode )
571
+ /// //Set mode for channel, the default mode is "frozen" which won't work
572
+ /// .oc1m().pwm_mode1( )
576
573
/// );
577
574
///
578
575
/// //Set the duty cycle, 0 won't work in pwm mode but might be ok in
579
576
/// //toggle mode or match mode
580
577
/// let max_duty = tim.arr.read().arr().bits() as u16;
581
- /// tim.ccr1.modify(|_, w| w.ccr1 ().bits(max_duty / 2));
578
+ /// tim.ccr1.modify(|_, w| w.ccr ().bits(max_duty / 2));
582
579
///
583
580
/// //Enable the channel
584
581
/// tim.ccer.modify(|_, w| w.cc1e().set_bit());
You can’t perform that action at this time.
0 commit comments