@@ -45,7 +45,7 @@ pub fn render(
45
45
if access == Access :: ReadWrite || access == Access :: ReadWriteOnce {
46
46
reg_impl_items. push ( quote ! {
47
47
/// Modifies the contents of the register
48
- #[ inline]
48
+ #[ inline( always ) ]
49
49
pub fn modify<F >( & self , f: F )
50
50
where
51
51
for <' w> F : FnOnce ( & R , & ' w mut W ) -> & ' w mut W
@@ -59,7 +59,7 @@ pub fn render(
59
59
if can_read {
60
60
reg_impl_items. push ( quote ! {
61
61
/// Reads the contents of the register
62
- #[ inline]
62
+ #[ inline( always ) ]
63
63
pub fn read( & self ) -> R {
64
64
R { bits: self . register. get( ) }
65
65
}
@@ -74,7 +74,7 @@ pub fn render(
74
74
75
75
r_impl_items. push ( quote ! {
76
76
/// Value of the register as raw bits
77
- #[ inline]
77
+ #[ inline( always ) ]
78
78
pub fn bits( & self ) -> #rty {
79
79
self . bits
80
80
}
@@ -84,7 +84,7 @@ pub fn render(
84
84
if can_write {
85
85
reg_impl_items. push ( quote ! {
86
86
/// Writes to the register
87
- #[ inline]
87
+ #[ inline( always ) ]
88
88
pub fn write<F >( & self , f: F )
89
89
where
90
90
F : FnOnce ( & mut W ) -> & mut W
@@ -108,20 +108,20 @@ pub fn render(
108
108
109
109
reg_impl_items. push ( quote ! {
110
110
/// Reset value of the register
111
- #[ inline]
111
+ #[ inline( always ) ]
112
112
pub const fn reset_value( ) -> #rty {
113
113
#rv
114
114
}
115
115
/// Writes the reset value to the register
116
- #[ inline]
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
123
/// Writes raw bits to the register
124
- #[ inline]
124
+ #[ inline( always ) ]
125
125
pub #unsafety fn bits( & mut self , bits: #rty) -> & mut Self {
126
126
self . bits = bits;
127
127
self
@@ -368,7 +368,7 @@ pub fn fields(
368
368
let sc = & f. sc ;
369
369
r_impl_items. push ( quote ! {
370
370
#[ doc = #description]
371
- #[ inline]
371
+ #[ inline( always ) ]
372
372
pub fn #sc( & self ) -> #pc_r {
373
373
#pc_r:: _from( #value )
374
374
}
@@ -424,13 +424,13 @@ pub fn fields(
424
424
if f. width == 1 {
425
425
enum_items. push ( quote ! {
426
426
/// Returns `true` if the bit is clear (0)
427
- #[ inline]
427
+ #[ inline( always ) ]
428
428
pub fn bit_is_clear( & self ) -> bool {
429
429
!self . #bits( )
430
430
}
431
431
432
432
/// Returns `true` if the bit is set (1)
433
- #[ inline]
433
+ #[ inline( always ) ]
434
434
pub fn bit_is_set( & self ) -> bool {
435
435
self . #bits( )
436
436
}
@@ -439,7 +439,7 @@ pub fn fields(
439
439
440
440
enum_items. push ( quote ! {
441
441
/// Value of the field as raw bits
442
- #[ inline]
442
+ #[ inline( always ) ]
443
443
pub fn #bits( & self ) -> #fty {
444
444
match * self {
445
445
#( #arms) , *
@@ -472,7 +472,7 @@ pub fn fields(
472
472
enum_items. push ( quote ! {
473
473
#[ allow( missing_docs) ]
474
474
#[ doc( hidden) ]
475
- #[ inline]
475
+ #[ inline( always ) ]
476
476
pub fn _from( value: #fty) -> #pc_r {
477
477
match value {
478
478
#( #arms) , * ,
@@ -493,7 +493,7 @@ pub fn fields(
493
493
let doc = format ! ( "Checks if the value of the field is `{}`" , pc) ;
494
494
enum_items. push ( quote ! {
495
495
#[ doc = #doc]
496
- #[ inline]
496
+ #[ inline( always ) ]
497
497
pub fn #is_variant( & self ) -> bool {
498
498
* self == #pc_r:: #pc
499
499
}
@@ -512,7 +512,7 @@ pub fn fields(
512
512
let sc = & f. sc ;
513
513
r_impl_items. push ( quote ! {
514
514
#[ doc = #description]
515
- #[ inline]
515
+ #[ inline( always ) ]
516
516
pub fn #sc( & self ) -> #pc_r {
517
517
let bits = #value;
518
518
#pc_r { bits }
@@ -522,7 +522,7 @@ pub fn fields(
522
522
let mut pc_r_impl_items = vec ! [
523
523
quote! {
524
524
/// Value of the field as raw bits
525
- #[ inline]
525
+ #[ inline( always ) ]
526
526
pub fn #bits( & self ) -> #fty {
527
527
self . bits
528
528
}
@@ -532,13 +532,13 @@ pub fn fields(
532
532
if f. width == 1 {
533
533
pc_r_impl_items. push ( quote ! {
534
534
/// Returns `true` if the bit is clear (0)
535
- #[ inline]
535
+ #[ inline( always ) ]
536
536
pub fn bit_is_clear( & self ) -> bool {
537
537
!self . #bits( )
538
538
}
539
539
540
540
/// Returns `true` if the bit is set (1)
541
- #[ inline]
541
+ #[ inline( always ) ]
542
542
pub fn bit_is_set( & self ) -> bool {
543
543
self . #bits( )
544
544
}
@@ -693,7 +693,7 @@ pub fn fields(
693
693
impl #pc_w {
694
694
#[ allow( missing_docs) ]
695
695
#[ doc( hidden) ]
696
- #[ inline]
696
+ #[ inline( always ) ]
697
697
pub fn _bits( & self ) -> #fty {
698
698
match * self {
699
699
#( #arms) , *
@@ -705,7 +705,7 @@ pub fn fields(
705
705
706
706
proxy_items. push ( quote ! {
707
707
/// Writes `variant` to the field
708
- #[ inline]
708
+ #[ inline( always ) ]
709
709
pub fn variant( self , variant: #pc_w) -> & ' a mut W {
710
710
#unsafety {
711
711
self . #bits( variant. _bits( ) )
@@ -721,15 +721,15 @@ pub fn fields(
721
721
if let Some ( enum_) = base_pc_w. as_ref ( ) {
722
722
proxy_items. push ( quote ! {
723
723
#[ doc = #doc]
724
- #[ inline]
724
+ #[ inline( always ) ]
725
725
pub fn #sc( self ) -> & ' a mut W {
726
726
self . variant( #enum_:: #pc)
727
727
}
728
728
} ) ;
729
729
} else {
730
730
proxy_items. push ( quote ! {
731
731
#[ doc = #doc]
732
- #[ inline]
732
+ #[ inline( always ) ]
733
733
pub fn #sc( self ) -> & ' a mut W {
734
734
self . variant( #pc_w:: #pc)
735
735
}
@@ -754,7 +754,7 @@ pub fn fields(
754
754
755
755
proxy_items. push ( quote ! {
756
756
/// Writes raw bits to the field
757
- #[ inline]
757
+ #[ inline( always ) ]
758
758
pub #unsafety fn #bits( self , value: #fty) -> & ' a mut W {
759
759
self . w. bits &= !( #mask << #offset) ;
760
760
self . w. bits |= ( ( value as #rty) & #mask) << #offset;
@@ -778,7 +778,7 @@ pub fn fields(
778
778
let sc = & f. sc ;
779
779
w_impl_items. push ( quote ! {
780
780
#[ doc = #description]
781
- #[ inline]
781
+ #[ inline( always ) ]
782
782
pub fn #sc( & mut self ) -> #_pc_w {
783
783
#_pc_w { w: self }
784
784
}
0 commit comments