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 {
560560/// unsafe {
561561/// let tim = &(*TIM1::ptr());
562562///
563- /// //This is pwm mode 1, the default mode is "frozen" which won't work
564- /// let mode = 0b0110;
565- ///
566563/// //Channel 1
567564/// //Disable the channel before configuring it
568565/// tim.ccer.modify(|_, w| w.cc1e().clear_bit());
569566///
570- /// tim.ccmr1_output.modify(|_, w| w
567+ /// tim.ccmr1_output() .modify(|_, w| w
571568/// //Preload enable for channel
572569/// .oc1pe().set_bit()
573570///
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( )
576573/// );
577574///
578575/// //Set the duty cycle, 0 won't work in pwm mode but might be ok in
579576/// //toggle mode or match mode
580577/// 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));
582579///
583580/// //Enable the channel
584581/// tim.ccer.modify(|_, w| w.cc1e().set_bit());
You can’t perform that action at this time.
0 commit comments