File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,11 @@ pub fn render(
59
59
. ok_or_else ( || format ! ( "Register {} has no reset value" , register. name) ) ?;
60
60
61
61
let desc = format ! ( "Writer for register {}" , register. name) ;
62
+ let doc = format ! ( "Register {} `reset()`'s with value {}" , register. name, & rv) ;
62
63
mod_items. push ( quote ! {
63
64
#[ doc = #desc]
64
65
pub type W = crate :: W <#rty, super :: #name_pc>;
66
+ #[ doc = #doc]
65
67
impl crate :: ResetValue <#rty> for super :: #name_pc {
66
68
#[ inline( always) ]
67
69
fn reset_value( ) -> #rty { #rv }
@@ -130,22 +132,33 @@ pub fn render(
130
132
}
131
133
132
134
let mut out = vec ! [ ] ;
135
+ let doc = if name_sc != "cfg" {
136
+ format ! ( "For information about avaliable fields see [{0}]({0}) module" , & name_sc)
137
+ } else {
138
+ "" . to_string ( )
139
+ } ;
133
140
out. push ( quote ! {
134
141
#[ doc = #description]
142
+ ///
143
+ #[ doc = #doc]
135
144
pub type #name_pc = crate :: Reg <#rty, #_name_pc>;
136
145
137
146
#[ allow( missing_docs) ]
138
147
#[ doc( hidden) ]
139
148
pub struct #_name_pc;
140
149
} ) ;
141
150
151
+ let doc = format ! ( "`read()` method returns [{0}::R]({0}::R) reader structure" , & name_sc) ;
142
152
if can_read {
143
153
out. push ( quote ! {
154
+ #[ doc = #doc]
144
155
impl crate :: Readable for #name_pc { }
145
156
} ) ;
146
157
}
158
+ let doc = format ! ( "`write(|w| ..)` method takes [{0}::W]({0}::W) writer structure" , & name_sc) ;
147
159
if can_write {
148
160
out. push ( quote ! {
161
+ #[ doc = #doc]
149
162
impl crate :: Writable for #name_pc { }
150
163
} ) ;
151
164
}
You can’t perform that action at this time.
0 commit comments