File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -277,10 +277,6 @@ macro_rules! halUsart {
277277 } ) ;
278278 }
279279
280- fn peri_address( ) -> u32 {
281- unsafe { ( * ( <$USART>:: ptr( ) as * const Self :: RegisterBlock ) ) . peri_address( ) }
282- }
283-
284280 unsafe fn steal( ) -> Self {
285281 Self :: steal( )
286282 }
Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ pub trait Instance:
3737 #[ doc( hidden) ]
3838 fn set_stopbits ( & self , bits : config:: StopBits ) ;
3939 #[ doc( hidden) ]
40- fn peri_address ( ) -> u32 ;
40+ #[ inline( always) ]
41+ fn peri_address ( ) -> u32 {
42+ unsafe { & * Self :: ptr ( ) } . peri_address ( )
43+ }
4144 #[ doc( hidden) ]
4245 unsafe fn steal ( ) -> Self ;
4346}
Original file line number Diff line number Diff line change @@ -52,10 +52,6 @@ macro_rules! halUart {
5252 } ) ;
5353 }
5454
55- fn peri_address( ) -> u32 {
56- unsafe { ( * Self :: ptr( ) ) . peri_address( ) }
57- }
58-
5955 unsafe fn steal( ) -> Self {
6056 Self :: steal( )
6157 }
You can’t perform that action at this time.
0 commit comments