@@ -4,6 +4,7 @@ use core::marker;
44pub trait RawReg :
55 Copy
66 + Default
7+ + From < bool >
78 + core:: ops:: BitOr < Output = Self >
89 + core:: ops:: BitAnd < Output = Self >
910 + core:: ops:: BitOrAssign
@@ -503,7 +504,6 @@ macro_rules! impl_bit_proxy {
503504 where
504505 REG : Writable + RegisterSpec <Ux = U >,
505506 U : RawReg ,
506- U : From <bool >,
507507 FI : Into <bool >,
508508 {
509509 /// Writes bit to the field
@@ -533,8 +533,7 @@ bit_proxy!(BitWriter0T, Bit0T);
533533impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriter < ' a , U , REG , N , FI , WI , OF >
534534where
535535 REG : Writable + RegisterSpec < Ux = U > ,
536- U : RawReg ,
537- N : Into < U > ,
536+ U : RawReg + From < N > ,
538537 FI : Into < N > ,
539538{
540539 /// Writes raw bits to the field
@@ -545,7 +544,7 @@ where
545544 #[ inline( always) ]
546545 pub unsafe fn bits ( self , value : N ) -> & ' a mut REG :: Writer {
547546 self . w . bits &= !( U :: mask :: < WI > ( ) << { OF } ) ;
548- self . w . bits |= ( value . into ( ) & U :: mask :: < WI > ( ) ) << { OF } ;
547+ self . w . bits |= ( U :: from ( value ) & U :: mask :: < WI > ( ) ) << { OF } ;
549548 self . w
550549 }
551550 /// Writes `variant` to the field
@@ -557,15 +556,14 @@ where
557556impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriterSafe < ' a , U , REG , N , FI , WI , OF >
558557where
559558 REG : Writable + RegisterSpec < Ux = U > ,
560- U : RawReg ,
561- N : Into < U > ,
559+ U : RawReg + From < N > ,
562560 FI : Into < N > ,
563561{
564562 /// Writes raw bits to the field
565563 #[ inline( always) ]
566564 pub fn bits ( self , value : N ) -> & ' a mut REG :: Writer {
567565 self . w . bits &= !( U :: mask :: < WI > ( ) << { OF } ) ;
568- self . w . bits |= ( value . into ( ) & U :: mask :: < WI > ( ) ) << { OF } ;
566+ self . w . bits |= ( U :: from ( value ) & U :: mask :: < WI > ( ) ) << { OF } ;
569567 self . w
570568 }
571569 /// Writes `variant` to the field
@@ -587,7 +585,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter<'a, U, REG, FI, OF>
587585where
588586 REG : Writable + RegisterSpec < Ux = U > ,
589587 U : RawReg ,
590- U : From < bool > ,
591588 FI : Into < bool > ,
592589{
593590 /// Sets the field bit
@@ -606,7 +603,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter1S<'a, U, REG, FI, OF>
606603where
607604 REG : Writable + RegisterSpec < Ux = U > ,
608605 U : RawReg ,
609- U : From < bool > ,
610606 FI : Into < bool > ,
611607{
612608 /// Sets the field bit
@@ -620,7 +616,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter0C<'a, U, REG, FI, OF>
620616where
621617 REG : Writable + RegisterSpec < Ux = U > ,
622618 U : RawReg ,
623- U : From < bool > ,
624619 FI : Into < bool > ,
625620{
626621 /// Clears the field bit
@@ -634,7 +629,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter1C<'a, U, REG, FI, OF>
634629where
635630 REG : Writable + RegisterSpec < Ux = U > ,
636631 U : RawReg ,
637- U : From < bool > ,
638632 FI : Into < bool > ,
639633{
640634 ///Clears the field bit by passing one
@@ -648,7 +642,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter0S<'a, U, REG, FI, OF>
648642where
649643 REG : Writable + RegisterSpec < Ux = U > ,
650644 U : RawReg ,
651- U : From < bool > ,
652645 FI : Into < bool > ,
653646{
654647 ///Sets the field bit by passing zero
@@ -662,7 +655,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter1T<'a, U, REG, FI, OF>
662655where
663656 REG : Writable + RegisterSpec < Ux = U > ,
664657 U : RawReg ,
665- U : From < bool > ,
666658 FI : Into < bool > ,
667659{
668660 ///Toggle the field bit by passing one
@@ -676,7 +668,6 @@ impl<'a, U, REG, FI, const OF: u8> BitWriter0T<'a, U, REG, FI, OF>
676668where
677669 REG : Writable + RegisterSpec < Ux = U > ,
678670 U : RawReg ,
679- U : From < bool > ,
680671 FI : Into < bool > ,
681672{
682673 ///Toggle the field bit by passing zero
0 commit comments