@@ -301,9 +301,9 @@ impl<REG: RegisterSpec> W<REG> {
301301}
302302
303303#[ doc( hidden) ]
304- pub struct FieldReaderRaw < U , T > {
304+ pub struct FieldReaderRaw < U , FI > {
305305 pub ( crate ) bits : U ,
306- _reg : marker:: PhantomData < T > ,
306+ _reg : marker:: PhantomData < FI > ,
307307}
308308
309309impl < U , FI > FieldReaderRaw < U , FI >
@@ -322,9 +322,9 @@ where
322322}
323323
324324#[ doc( hidden) ]
325- pub struct BitReaderRaw < T > {
325+ pub struct BitReaderRaw < FI > {
326326 pub ( crate ) bits : bool ,
327- _reg : marker:: PhantomData < T > ,
327+ _reg : marker:: PhantomData < FI > ,
328328}
329329
330330impl < FI > BitReaderRaw < FI > {
@@ -342,10 +342,10 @@ impl<FI> BitReaderRaw<FI> {
342342/// Field reader.
343343///
344344/// Result of the `read` methods of fields.
345- pub type FieldReader < U , FI > = FieldReaderRaw < U , FI > ;
345+ pub type FieldReader < U = u8 , FI = u8 > = FieldReaderRaw < U , FI > ;
346346
347347/// Bit-wise field reader
348- pub type BitReader < FI > = BitReaderRaw < FI > ;
348+ pub type BitReader < FI = bool > = BitReaderRaw < FI > ;
349349
350350impl < U , FI > FieldReader < U , FI >
351351where
@@ -405,7 +405,7 @@ pub struct Safe;
405405pub struct Unsafe ;
406406
407407#[ doc( hidden) ]
408- pub struct FieldWriterRaw < ' a , U , REG , N , FI , Safety , const WI : u8 , const O : u8 >
408+ pub struct FieldWriterRaw < ' a , U , REG , const WI : u8 , const O : u8 , N , FI , Safety >
409409where
410410 REG : Writable + RegisterSpec < Ux = U > ,
411411 N : From < FI > ,
@@ -414,8 +414,8 @@ where
414414 _field : marker:: PhantomData < ( N , FI , Safety ) > ,
415415}
416416
417- impl < ' a , U , REG , N , FI , Safety , const WI : u8 , const O : u8 >
418- FieldWriterRaw < ' a , U , REG , N , FI , Safety , WI , O >
417+ impl < ' a , U , REG , const WI : u8 , const O : u8 , N , FI , Safety >
418+ FieldWriterRaw < ' a , U , REG , WI , O , N , FI , Safety >
419419where
420420 REG : Writable + RegisterSpec < Ux = U > ,
421421 N : From < FI > ,
@@ -432,7 +432,7 @@ where
432432}
433433
434434#[ doc( hidden) ]
435- pub struct BitWriterRaw < ' a , U , REG , FI , M , const O : u8 >
435+ pub struct BitWriterRaw < ' a , U , REG , const O : u8 , FI , M >
436436where
437437 REG : Writable + RegisterSpec < Ux = U > ,
438438 bool : From < FI > ,
@@ -441,7 +441,7 @@ where
441441 _field : marker:: PhantomData < ( FI , M ) > ,
442442}
443443
444- impl < ' a , U , REG , FI , M , const O : u8 > BitWriterRaw < ' a , U , REG , FI , M , O >
444+ impl < ' a , U , REG , const O : u8 , FI , M > BitWriterRaw < ' a , U , REG , O , FI , M >
445445where
446446 REG : Writable + RegisterSpec < Ux = U > ,
447447 bool : From < FI > ,
@@ -458,13 +458,13 @@ where
458458}
459459
460460/// Write field Proxy with unsafe `bits`
461- pub type FieldWriter < ' a , U , REG , N , FI , const WI : u8 , const O : u8 > =
462- FieldWriterRaw < ' a , U , REG , N , FI , Unsafe , WI , O > ;
461+ pub type FieldWriter < ' a , U , REG , const WI : u8 , const O : u8 , N = u8 , FI = u8 > =
462+ FieldWriterRaw < ' a , U , REG , WI , O , N , FI , Unsafe > ;
463463/// Write field Proxy with safe `bits`
464- pub type FieldWriterSafe < ' a , U , REG , N , FI , const WI : u8 , const O : u8 > =
465- FieldWriterRaw < ' a , U , REG , N , FI , Safe , WI , O > ;
464+ pub type FieldWriterSafe < ' a , U , REG , const WI : u8 , const O : u8 , N = u8 , FI = u8 > =
465+ FieldWriterRaw < ' a , U , REG , WI , O , N , FI , Safe > ;
466466
467- impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriter < ' a , U , REG , N , FI , WI , OF >
467+ impl < ' a , U , REG , const WI : u8 , const OF : u8 , N , FI > FieldWriter < ' a , U , REG , WI , OF , N , FI >
468468where
469469 REG : Writable + RegisterSpec < Ux = U > ,
470470 N : From < FI > ,
@@ -473,7 +473,7 @@ where
473473 pub const WIDTH : u8 = WI ;
474474}
475475
476- impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriterSafe < ' a , U , REG , N , FI , WI , OF >
476+ impl < ' a , U , REG , const WI : u8 , const OF : u8 , N , FI > FieldWriterSafe < ' a , U , REG , WI , OF , N , FI >
477477where
478478 REG : Writable + RegisterSpec < Ux = U > ,
479479 N : From < FI > ,
@@ -488,9 +488,9 @@ macro_rules! bit_proxy {
488488 pub struct $mwv;
489489
490490 /// Bit-wise write field proxy
491- pub type $writer<' a, U , REG , FI , const O : u8 > = BitWriterRaw <' a, U , REG , FI , $mwv, O >;
491+ pub type $writer<' a, U , REG , const O : u8 , FI = bool > = BitWriterRaw <' a, U , REG , O , FI , $mwv>;
492492
493- impl <' a, U , REG , FI , const OF : u8 > $writer<' a, U , REG , FI , OF >
493+ impl <' a, U , REG , const OF : u8 , FI > $writer<' a, U , REG , OF , FI >
494494 where
495495 REG : Writable + RegisterSpec <Ux = U >,
496496 bool : From <FI >,
@@ -503,7 +503,7 @@ macro_rules! bit_proxy {
503503
504504macro_rules! impl_bit_proxy {
505505 ( $writer: ident) => {
506- impl <' a, U , REG , FI , const OF : u8 > $writer<' a, U , REG , FI , OF >
506+ impl <' a, U , REG , const OF : u8 , FI > $writer<' a, U , REG , OF , FI >
507507 where
508508 REG : Writable + RegisterSpec <Ux = U >,
509509 U : RawReg ,
@@ -533,7 +533,7 @@ bit_proxy!(BitWriter0S, Bit0S);
533533bit_proxy ! ( BitWriter1T , Bit1T ) ;
534534bit_proxy ! ( BitWriter0T , Bit0T ) ;
535535
536- impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriter < ' a , U , REG , N , FI , WI , OF >
536+ impl < ' a , U , REG , const WI : u8 , const OF : u8 , N , FI > FieldWriter < ' a , U , REG , WI , OF , N , FI >
537537where
538538 REG : Writable + RegisterSpec < Ux = U > ,
539539 U : RawReg + From < N > ,
@@ -556,7 +556,7 @@ where
556556 unsafe { self . bits ( N :: from ( variant) ) }
557557 }
558558}
559- impl < ' a , U , REG , N , FI , const WI : u8 , const OF : u8 > FieldWriterSafe < ' a , U , REG , N , FI , WI , OF >
559+ impl < ' a , U , REG , const WI : u8 , const OF : u8 , N , FI > FieldWriterSafe < ' a , U , REG , WI , OF , N , FI >
560560where
561561 REG : Writable + RegisterSpec < Ux = U > ,
562562 U : RawReg + From < N > ,
@@ -584,7 +584,7 @@ impl_bit_proxy!(BitWriter0S);
584584impl_bit_proxy ! ( BitWriter1T ) ;
585585impl_bit_proxy ! ( BitWriter0T ) ;
586586
587- impl < ' a , U , REG , FI , const OF : u8 > BitWriter < ' a , U , REG , FI , OF >
587+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter < ' a , U , REG , OF , FI >
588588where
589589 REG : Writable + RegisterSpec < Ux = U > ,
590590 U : RawReg ,
@@ -604,7 +604,7 @@ where
604604 }
605605}
606606
607- impl < ' a , U , REG , FI , const OF : u8 > BitWriter1S < ' a , U , REG , FI , OF >
607+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter1S < ' a , U , REG , OF , FI >
608608where
609609 REG : Writable + RegisterSpec < Ux = U > ,
610610 U : RawReg ,
@@ -618,7 +618,7 @@ where
618618 }
619619}
620620
621- impl < ' a , U , REG , FI , const OF : u8 > BitWriter0C < ' a , U , REG , FI , OF >
621+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter0C < ' a , U , REG , OF , FI >
622622where
623623 REG : Writable + RegisterSpec < Ux = U > ,
624624 U : RawReg ,
@@ -632,7 +632,7 @@ where
632632 }
633633}
634634
635- impl < ' a , U , REG , FI , const OF : u8 > BitWriter1C < ' a , U , REG , FI , OF >
635+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter1C < ' a , U , REG , OF , FI >
636636where
637637 REG : Writable + RegisterSpec < Ux = U > ,
638638 U : RawReg ,
@@ -646,7 +646,7 @@ where
646646 }
647647}
648648
649- impl < ' a , U , REG , FI , const OF : u8 > BitWriter0S < ' a , U , REG , FI , OF >
649+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter0S < ' a , U , REG , OF , FI >
650650where
651651 REG : Writable + RegisterSpec < Ux = U > ,
652652 U : RawReg ,
@@ -660,7 +660,7 @@ where
660660 }
661661}
662662
663- impl < ' a , U , REG , FI , const OF : u8 > BitWriter1T < ' a , U , REG , FI , OF >
663+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter1T < ' a , U , REG , OF , FI >
664664where
665665 REG : Writable + RegisterSpec < Ux = U > ,
666666 U : RawReg ,
@@ -674,7 +674,7 @@ where
674674 }
675675}
676676
677- impl < ' a , U , REG , FI , const OF : u8 > BitWriter0T < ' a , U , REG , FI , OF >
677+ impl < ' a , U , REG , const OF : u8 , FI > BitWriter0T < ' a , U , REG , OF , FI >
678678where
679679 REG : Writable + RegisterSpec < Ux = U > ,
680680 U : RawReg ,
0 commit comments