@@ -44,7 +44,7 @@ pub fn render(
44
44
45
45
if access == Access :: ReadWrite || access == Access :: ReadWriteOnce {
46
46
reg_impl_items. push ( quote ! {
47
- /// Modifies the contents of the register
47
+ ///Modifies the contents of the register
48
48
#[ inline( always) ]
49
49
pub fn modify<F >( & self , f: F )
50
50
where
@@ -58,22 +58,22 @@ pub fn render(
58
58
59
59
if can_read {
60
60
reg_impl_items. push ( quote ! {
61
- /// Reads the contents of the register
61
+ ///Reads the contents of the register
62
62
#[ inline( always) ]
63
63
pub fn read( & self ) -> R {
64
64
R { bits: self . register. get( ) }
65
65
}
66
66
} ) ;
67
67
68
68
mod_items. push ( quote ! {
69
- /// Value read from the register
69
+ ///Value read from the register
70
70
pub struct R {
71
71
bits: #rty,
72
72
}
73
73
} ) ;
74
74
75
75
r_impl_items. push ( quote ! {
76
- /// Value of the register as raw bits
76
+ ///Value of the register as raw bits
77
77
#[ inline( always) ]
78
78
pub fn bits( & self ) -> #rty {
79
79
self . bits
@@ -83,7 +83,7 @@ pub fn render(
83
83
84
84
if can_write {
85
85
reg_impl_items. push ( quote ! {
86
- /// Writes to the register
86
+ ///Writes to the register
87
87
#[ inline( always) ]
88
88
pub fn write<F >( & self , f: F )
89
89
where
@@ -94,7 +94,7 @@ pub fn render(
94
94
} ) ;
95
95
96
96
mod_items. push ( quote ! {
97
- /// Value to write to the register
97
+ ///Value to write to the register
98
98
pub struct W {
99
99
bits: #rty,
100
100
}
@@ -107,20 +107,20 @@ pub fn render(
107
107
. ok_or_else ( || format ! ( "Register {} has no reset value" , register. name) ) ?;
108
108
109
109
reg_impl_items. push ( quote ! {
110
- /// Reset value of the register
110
+ ///Reset value of the register
111
111
#[ inline( always) ]
112
112
pub const fn reset_value( ) -> #rty {
113
113
#rv
114
114
}
115
- /// Writes the reset value to the register
115
+ ///Writes the reset value to the register
116
116
#[ inline( always) ]
117
117
pub fn reset( & self ) {
118
118
self . register. set( Self :: reset_value( ) )
119
119
}
120
120
} ) ;
121
121
122
122
w_impl_items. push ( quote ! {
123
- /// Writes raw bits to the register
123
+ ///Writes raw bits to the register
124
124
#[ inline( always) ]
125
125
pub #unsafety fn bits( & mut self , bits: #rty) -> & mut Self {
126
126
self . bits = bits;
@@ -390,7 +390,7 @@ pub fn fields(
390
390
. collect :: < Vec < _ > > ( ) ;
391
391
if has_reserved_variant {
392
392
vars. push ( quote ! {
393
- /// Reserved
393
+ ///Reserved
394
394
_Reserved( #fty)
395
395
} ) ;
396
396
}
@@ -423,13 +423,13 @@ pub fn fields(
423
423
424
424
if f. width == 1 {
425
425
enum_items. push ( quote ! {
426
- /// Returns `true` if the bit is clear (0)
426
+ ///Returns `true` if the bit is clear (0)
427
427
#[ inline( always) ]
428
428
pub fn bit_is_clear( & self ) -> bool {
429
429
!self . #bits( )
430
430
}
431
431
432
- /// Returns `true` if the bit is set (1)
432
+ ///Returns `true` if the bit is set (1)
433
433
#[ inline( always) ]
434
434
pub fn bit_is_set( & self ) -> bool {
435
435
self . #bits( )
@@ -438,7 +438,7 @@ pub fn fields(
438
438
}
439
439
440
440
enum_items. push ( quote ! {
441
- /// Value of the field as raw bits
441
+ ///Value of the field as raw bits
442
442
#[ inline( always) ]
443
443
pub fn #bits( & self ) -> #fty {
444
444
match * self {
@@ -521,7 +521,7 @@ pub fn fields(
521
521
522
522
let mut pc_r_impl_items = vec ! [
523
523
quote! {
524
- /// Value of the field as raw bits
524
+ ///Value of the field as raw bits
525
525
#[ inline( always) ]
526
526
pub fn #bits( & self ) -> #fty {
527
527
self . bits
@@ -531,13 +531,13 @@ pub fn fields(
531
531
532
532
if f. width == 1 {
533
533
pc_r_impl_items. push ( quote ! {
534
- /// Returns `true` if the bit is clear (0)
534
+ ///Returns `true` if the bit is clear (0)
535
535
#[ inline( always) ]
536
536
pub fn bit_is_clear( & self ) -> bool {
537
537
!self . #bits( )
538
538
}
539
539
540
- /// Returns `true` if the bit is set (1)
540
+ ///Returns `true` if the bit is set (1)
541
541
#[ inline( always) ]
542
542
pub fn bit_is_set( & self ) -> bool {
543
543
self . #bits( )
@@ -546,7 +546,7 @@ pub fn fields(
546
546
}
547
547
548
548
mod_items. push ( quote ! {
549
- /// Value of the field
549
+ ///Value of the field
550
550
pub struct #pc_r {
551
551
bits: #fty,
552
552
}
@@ -704,7 +704,7 @@ pub fn fields(
704
704
}
705
705
706
706
proxy_items. push ( quote ! {
707
- /// Writes `variant` to the field
707
+ ///Writes `variant` to the field
708
708
#[ inline( always) ]
709
709
pub fn variant( self , variant: #pc_w) -> & ' a mut W {
710
710
#unsafety {
@@ -740,20 +740,20 @@ pub fn fields(
740
740
741
741
if width == 1 {
742
742
proxy_items. push ( quote ! {
743
- /// Sets the field bit
743
+ ///Sets the field bit
744
744
pub #unsafety fn set_bit( self ) -> & ' a mut W {
745
745
self . bit( true )
746
746
}
747
747
748
- /// Clears the field bit
748
+ ///Clears the field bit
749
749
pub #unsafety fn clear_bit( self ) -> & ' a mut W {
750
750
self . bit( false )
751
751
}
752
752
} ) ;
753
753
}
754
754
755
755
proxy_items. push ( quote ! {
756
- /// Writes raw bits to the field
756
+ ///Writes raw bits to the field
757
757
#[ inline( always) ]
758
758
pub #unsafety fn #bits( self , value: #fty) -> & ' a mut W {
759
759
self . w. bits &= !( #mask << #offset) ;
@@ -764,7 +764,7 @@ pub fn fields(
764
764
765
765
let _pc_w = & f. _pc_w ;
766
766
mod_items. push ( quote ! {
767
- /// Proxy
767
+ ///Proxy
768
768
pub struct #_pc_w<' a> {
769
769
w: & ' a mut W ,
770
770
}
0 commit comments