File tree 1 file changed +10
-11
lines changed
1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -554,17 +554,16 @@ impl Slices {
554
554
self . _pwm
555
555
}
556
556
557
- // /// Enable multiple slices at the same time to make their counters sync up.
558
- // ///
559
- // /// You still need to call `slice` to get an actual slice
560
- // pub fn enable_simultaneous<S: SliceId>(&mut self, bits: u8) {
561
- // // Enable all slices at the same time
562
- // unsafe {
563
- // &(*pac::PWM::ptr())
564
- // .en
565
- // .modify(|r, w| w.bits(((r.bits() as u8) | bits) as u32));
566
- // }
567
- // }
557
+ /// Enable multiple slices at the same time to make their counters sync up.
558
+ ///
559
+ /// You still need to call `slice` to get an actual slice
560
+ pub fn enable_simultaneous ( & mut self , bits : u8 ) {
561
+ // Enable multiple slices at the same time
562
+ unsafe {
563
+ let reg = self . _pwm . en . as_ptr ( ) ;
564
+ write_bitmask_set ( reg, bits as u32 ) ;
565
+ }
566
+ }
568
567
569
568
// /// Get pwm slice based on gpio pin
570
569
// pub fn borrow_mut_from_pin<
You can’t perform that action at this time.
0 commit comments