File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -669,6 +669,10 @@ pub fn gen_register(r: &Register,
669
669
670
670
if access == Access :: ReadOnly || access == Access :: ReadWrite {
671
671
for field in fields {
672
+ if field. access == Some ( Access :: WriteOnly ) {
673
+ continue ;
674
+ }
675
+
672
676
let field_name = Ident :: new ( & * field. name
673
677
. to_sanitized_snake_case ( ) ) ;
674
678
let _field_name = Ident :: new ( & * format ! ( "_{}" ,
@@ -838,6 +842,10 @@ pub fn gen_register(r: &Register,
838
842
839
843
if access == Access :: WriteOnly || access == Access :: ReadWrite {
840
844
for field in fields {
845
+ if field. access == Some ( Access :: ReadOnly ) {
846
+ continue ;
847
+ }
848
+
841
849
let field_name_sc = Ident :: new ( & * field. name
842
850
. to_sanitized_snake_case ( ) ) ;
843
851
let width = field. bit_range . width ;
You can’t perform that action at this time.
0 commit comments