File tree 3 files changed +4
-9
lines changed
3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -277,10 +277,6 @@ macro_rules! halUsart {
277
277
} ) ;
278
278
}
279
279
280
- fn peri_address( ) -> u32 {
281
- unsafe { ( * ( <$USART>:: ptr( ) as * const Self :: RegisterBlock ) ) . peri_address( ) }
282
- }
283
-
284
280
unsafe fn steal( ) -> Self {
285
281
Self :: steal( )
286
282
}
Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ pub trait Instance:
37
37
#[ doc( hidden) ]
38
38
fn set_stopbits ( & self , bits : config:: StopBits ) ;
39
39
#[ doc( hidden) ]
40
- fn peri_address ( ) -> u32 ;
40
+ #[ inline( always) ]
41
+ fn peri_address ( ) -> u32 {
42
+ unsafe { & * Self :: ptr ( ) } . peri_address ( )
43
+ }
41
44
#[ doc( hidden) ]
42
45
unsafe fn steal ( ) -> Self ;
43
46
}
Original file line number Diff line number Diff line change @@ -52,10 +52,6 @@ macro_rules! halUart {
52
52
} ) ;
53
53
}
54
54
55
- fn peri_address( ) -> u32 {
56
- unsafe { ( * Self :: ptr( ) ) . peri_address( ) }
57
- }
58
-
59
55
unsafe fn steal( ) -> Self {
60
56
Self :: steal( )
61
57
}
You can’t perform that action at this time.
0 commit comments