File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
28
28
29
29
### Changed
30
30
31
+ - use ` u8 ` for field array offset
32
+
31
33
- [ breaking-change] remove ` Variant<U, ENUM_A> ` , use ` Option<ENUM_A> ` instead
32
34
33
35
- split out register size type (` RawType ` ) from ` ResetValue ` trait
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ pub fn fields(
379
379
r_impl_items. extend ( quote ! {
380
380
#[ doc = #doc]
381
381
#inline
382
- pub unsafe fn #name_sc( & self , n: usize ) -> #name_pc_r {
382
+ pub unsafe fn #name_sc( & self , n: u8 ) -> #name_pc_r {
383
383
#name_pc_r:: new ( #value )
384
384
}
385
385
} ) ;
@@ -675,7 +675,7 @@ pub fn fields(
675
675
util:: replace_suffix( & f. name, suffixes_str) ,
676
676
description
677
677
) ;
678
- offset_entry = quote ! { offset: usize , } ;
678
+ offset_entry = quote ! { offset: u8 , } ;
679
679
} else {
680
680
doc = format ! ( "Field `{}` writer - {}" , f. name, description) ;
681
681
offset_entry = quote ! { } ;
@@ -699,7 +699,7 @@ pub fn fields(
699
699
w_impl_items. extend ( quote ! {
700
700
#[ doc = #doc]
701
701
#inline
702
- pub unsafe fn #name_sc( & mut self , n: usize ) -> #name_pc_w {
702
+ pub unsafe fn #name_sc( & mut self , n: u8 ) -> #name_pc_w {
703
703
#name_pc_w { w: self , offset: #offset_calc }
704
704
}
705
705
} ) ;
You can’t perform that action at this time.
0 commit comments