@@ -270,7 +270,7 @@ impl<REG: RegisterSpec, FI> PartialEq<FI> for R<REG>
270270where
271271 REG :: Ux : PartialEq ,
272272 FI : Copy ,
273- REG :: Ux : From < FI >
273+ REG :: Ux : From < FI > ,
274274{
275275 #[ inline( always) ]
276276 fn eq ( & self , other : & FI ) -> bool {
@@ -512,8 +512,8 @@ macro_rules! impl_bit_proxy {
512512 /// Writes bit to the field
513513 #[ inline( always) ]
514514 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 ;
517517 self . w
518518 }
519519 /// Writes `variant` to the field
@@ -546,8 +546,8 @@ where
546546 /// Passing incorrect value can cause undefined behaviour. See reference manual
547547 #[ inline( always) ]
548548 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 ;
551551 self . w
552552 }
553553 /// Writes `variant` to the field
@@ -565,8 +565,8 @@ where
565565 /// Writes raw bits to the field
566566 #[ inline( always) ]
567567 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 ;
570570 self . w
571571 }
572572 /// Writes `variant` to the field
@@ -593,12 +593,14 @@ where
593593 /// Sets the field bit
594594 #[ inline( always) ]
595595 pub fn set_bit ( self ) -> & ' a mut REG :: Writer {
596- self . bit ( true )
596+ self . w . bits |= U :: one ( ) << OF ;
597+ self . w
597598 }
598599 /// Clears the field bit
599600 #[ inline( always) ]
600601 pub fn clear_bit ( self ) -> & ' a mut REG :: Writer {
601- self . bit ( false )
602+ self . w . bits &= !( U :: one ( ) << OF ) ;
603+ self . w
602604 }
603605}
604606
@@ -611,7 +613,8 @@ where
611613 /// Sets the field bit
612614 #[ inline( always) ]
613615 pub fn set_bit ( self ) -> & ' a mut REG :: Writer {
614- self . bit ( true )
616+ self . w . bits |= U :: one ( ) << OF ;
617+ self . w
615618 }
616619}
617620
@@ -624,7 +627,8 @@ where
624627 /// Clears the field bit
625628 #[ inline( always) ]
626629 pub fn clear_bit ( self ) -> & ' a mut REG :: Writer {
627- self . bit ( false )
630+ self . w . bits &= !( U :: one ( ) << OF ) ;
631+ self . w
628632 }
629633}
630634
@@ -637,7 +641,8 @@ where
637641 ///Clears the field bit by passing one
638642 #[ inline( always) ]
639643 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
641646 }
642647}
643648
@@ -650,7 +655,8 @@ where
650655 ///Sets the field bit by passing zero
651656 #[ inline( always) ]
652657 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
654660 }
655661}
656662
@@ -663,7 +669,8 @@ where
663669 ///Toggle the field bit by passing one
664670 #[ inline( always) ]
665671 pub fn toggle_bit ( self ) -> & ' a mut REG :: Writer {
666- self . bit ( true )
672+ self . w . bits |= U :: one ( ) << OF ;
673+ self . w
667674 }
668675}
669676
@@ -676,6 +683,7 @@ where
676683 ///Toggle the field bit by passing zero
677684 #[ inline( always) ]
678685 pub fn toggle_bit ( self ) -> & ' a mut REG :: Writer {
679- self . bit ( false )
686+ self . w . bits &= !( U :: one ( ) << OF ) ;
687+ self . w
680688 }
681689}
0 commit comments