File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -172,24 +172,22 @@ pub fn read() -> Control {
172172pub unsafe fn write ( _control : Control ) {
173173 match ( ) {
174174 #[ cfg( cortex_m) ]
175- ( ) => {
176- let r = match ( ) {
177- #[ cfg( feature = "inline-asm" ) ]
178- ( ) => {
179- let control = _control. bits ( ) ;
180- unsafe { asm ! ( "msr CONTROL, $0" :: "r" ( control) : "memory" : "volatile" ) }
175+ ( ) => match ( ) {
176+ #[ cfg( feature = "inline-asm" ) ]
177+ ( ) => {
178+ let control = _control. bits ( ) ;
179+ unsafe { asm ! ( "msr CONTROL, $0" :: "r" ( control) : "memory" : "volatile" ) }
180+ }
181+
182+ #[ cfg( not( feature = "inline-asm" ) ) ]
183+ ( ) => {
184+ extern "C" {
185+ fn __control_w ( bits : u32 ) ;
181186 }
182187
183- #[ cfg( not( feature = "inline-asm" ) ) ]
184- ( ) => unsafe {
185- extern "C" {
186- fn __control_w ( ) -> u32 ;
187- }
188-
189- __control_w ( _control. bits ( ) )
190- } ,
191- } ;
192- }
188+ __control_w ( _control. bits ( ) ) ;
189+ }
190+ } ,
193191
194192 #[ cfg( not( cortex_m) ) ]
195193 ( ) => unimplemented ! ( ) ,
You can’t perform that action at this time.
0 commit comments