@@ -270,7 +270,7 @@ impl<REG: RegisterSpec, FI> PartialEq<FI> for R<REG>
270
270
where
271
271
REG :: Ux : PartialEq ,
272
272
FI : Copy ,
273
- REG :: Ux : From < FI >
273
+ REG :: Ux : From < FI > ,
274
274
{
275
275
#[ inline( always) ]
276
276
fn eq ( & self , other : & FI ) -> bool {
@@ -512,8 +512,8 @@ macro_rules! impl_bit_proxy {
512
512
/// Writes bit to the field
513
513
#[ inline( always) ]
514
514
pub fn bit( self , value: bool ) -> & ' a mut REG :: Writer {
515
- self . w. bits &= !( U :: one( ) << { OF } ) ;
516
- self . w. bits |= ( U :: from( value) & U :: one( ) ) << { OF } ;
515
+ self . w. bits &= !( U :: one( ) << OF ) ;
516
+ self . w. bits |= ( U :: from( value) & U :: one( ) ) << OF ;
517
517
self . w
518
518
}
519
519
/// Writes `variant` to the field
@@ -546,8 +546,8 @@ where
546
546
/// Passing incorrect value can cause undefined behaviour. See reference manual
547
547
#[ inline( always) ]
548
548
pub unsafe fn bits ( self , value : N ) -> & ' a mut REG :: Writer {
549
- self . w . bits &= !( U :: mask :: < WI > ( ) << { OF } ) ;
550
- self . w . bits |= ( U :: from ( value) & U :: mask :: < WI > ( ) ) << { OF } ;
549
+ self . w . bits &= !( U :: mask :: < WI > ( ) << OF ) ;
550
+ self . w . bits |= ( U :: from ( value) & U :: mask :: < WI > ( ) ) << OF ;
551
551
self . w
552
552
}
553
553
/// Writes `variant` to the field
@@ -565,8 +565,8 @@ where
565
565
/// Writes raw bits to the field
566
566
#[ inline( always) ]
567
567
pub fn bits ( self , value : N ) -> & ' a mut REG :: Writer {
568
- self . w . bits &= !( U :: mask :: < WI > ( ) << { OF } ) ;
569
- self . w . bits |= ( U :: from ( value) & U :: mask :: < WI > ( ) ) << { OF } ;
568
+ self . w . bits &= !( U :: mask :: < WI > ( ) << OF ) ;
569
+ self . w . bits |= ( U :: from ( value) & U :: mask :: < WI > ( ) ) << OF ;
570
570
self . w
571
571
}
572
572
/// Writes `variant` to the field
@@ -593,12 +593,14 @@ where
593
593
/// Sets the field bit
594
594
#[ inline( always) ]
595
595
pub fn set_bit ( self ) -> & ' a mut REG :: Writer {
596
- self . bit ( true )
596
+ self . w . bits |= U :: one ( ) << OF ;
597
+ self . w
597
598
}
598
599
/// Clears the field bit
599
600
#[ inline( always) ]
600
601
pub fn clear_bit ( self ) -> & ' a mut REG :: Writer {
601
- self . bit ( false )
602
+ self . w . bits &= !( U :: one ( ) << OF ) ;
603
+ self . w
602
604
}
603
605
}
604
606
@@ -611,7 +613,8 @@ where
611
613
/// Sets the field bit
612
614
#[ inline( always) ]
613
615
pub fn set_bit ( self ) -> & ' a mut REG :: Writer {
614
- self . bit ( true )
616
+ self . w . bits |= U :: one ( ) << OF ;
617
+ self . w
615
618
}
616
619
}
617
620
@@ -624,7 +627,8 @@ where
624
627
/// Clears the field bit
625
628
#[ inline( always) ]
626
629
pub fn clear_bit ( self ) -> & ' a mut REG :: Writer {
627
- self . bit ( false )
630
+ self . w . bits &= !( U :: one ( ) << OF ) ;
631
+ self . w
628
632
}
629
633
}
630
634
@@ -637,7 +641,8 @@ where
637
641
///Clears the field bit by passing one
638
642
#[ inline( always) ]
639
643
pub fn clear_bit_by_one ( self ) -> & ' a mut REG :: Writer {
640
- self . bit ( true )
644
+ self . w . bits |= U :: one ( ) << OF ;
645
+ self . w
641
646
}
642
647
}
643
648
@@ -650,7 +655,8 @@ where
650
655
///Sets the field bit by passing zero
651
656
#[ inline( always) ]
652
657
pub fn set_bit_by_zero ( self ) -> & ' a mut REG :: Writer {
653
- self . bit ( false )
658
+ self . w . bits &= !( U :: one ( ) << OF ) ;
659
+ self . w
654
660
}
655
661
}
656
662
@@ -663,7 +669,8 @@ where
663
669
///Toggle the field bit by passing one
664
670
#[ inline( always) ]
665
671
pub fn toggle_bit ( self ) -> & ' a mut REG :: Writer {
666
- self . bit ( true )
672
+ self . w . bits |= U :: one ( ) << OF ;
673
+ self . w
667
674
}
668
675
}
669
676
@@ -676,6 +683,7 @@ where
676
683
///Toggle the field bit by passing zero
677
684
#[ inline( always) ]
678
685
pub fn toggle_bit ( self ) -> & ' a mut REG :: Writer {
679
- self . bit ( false )
686
+ self . w . bits &= !( U :: one ( ) << OF ) ;
687
+ self . w
680
688
}
681
689
}
0 commit comments