@@ -365,11 +365,11 @@ macro_rules! hal {
365365 }
366366 #[ inline( always) ]
367367 fn start_one_pulse( & mut self ) {
368- self . cr1. write ( | w| unsafe { w. bits( 1 << 3 ) } . cen( ) . set_bit( ) ) ;
368+ self . cr1. modify ( |_ , w| unsafe { w. bits( 1 << 3 ) } . cen( ) . set_bit( ) ) ;
369369 }
370370 #[ inline( always) ]
371371 fn start_no_update( & mut self ) {
372- self . cr1. write ( | w| w. cen( ) . set_bit( ) . udis( ) . set_bit( ) ) ;
372+ self . cr1. modify ( |_ , w| w. cen( ) . set_bit( ) . udis( ) . set_bit( ) ) ;
373373 }
374374 #[ inline( always) ]
375375 fn cr1_reset( & mut self ) {
@@ -445,7 +445,7 @@ macro_rules! with_pwm {
445445
446446 #[ inline( always) ]
447447 fn start_pwm( & mut self ) {
448- self . cr1. write ( | w| w. cen( ) . set_bit( ) ) ;
448+ self . cr1. modify ( |_ , w| w. cen( ) . set_bit( ) ) ;
449449 }
450450
451451 #[ inline( always) ]
@@ -495,7 +495,7 @@ macro_rules! with_pwm {
495495
496496 #[ inline( always) ]
497497 fn start_pwm( & mut self ) {
498- self . cr1. write ( | w| w. cen( ) . set_bit( ) ) ;
498+ self . cr1. modify ( |_ , w| w. cen( ) . set_bit( ) ) ;
499499 }
500500
501501 #[ inline( always) ]
@@ -553,7 +553,7 @@ macro_rules! with_pwm {
553553 #[ inline( always) ]
554554 fn start_pwm( & mut self ) {
555555 $( let $aoe = self . bdtr. modify( |_, w| w. aoe( ) . set_bit( ) ) ; ) ?
556- self . cr1. write ( | w| w. cen( ) . set_bit( ) ) ;
556+ self . cr1. modify ( |_ , w| w. cen( ) . set_bit( ) ) ;
557557 }
558558
559559 #[ inline( always) ]
0 commit comments