fix panic handler
This commit is contained in:
parent
8ee0950005
commit
9b6ef68eac
@ -8,9 +8,8 @@
|
|||||||
#[panic_handler]
|
#[panic_handler]
|
||||||
#[cfg(not(feature = "semihosting"))]
|
#[cfg(not(feature = "semihosting"))]
|
||||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||||
let dp = unsafe { pac::Peripherals::steal() };
|
let gpiod = unsafe { &*pac::GPIOD::ptr() };
|
||||||
dp.GPIOD.odr.modify(|_, w| w.odr6().high()); // FP_LED_1
|
gpiod.odr.modify(|_, w| w.odr6().high().odr12().high()); // FP_LED_1, FP_LED_3
|
||||||
dp.GPIOG.odr.modify(|_, w| w.odr4().high()); // FP_LED_3
|
|
||||||
loop { core::sync::atomic::compiler_fence(core::sync::atomic::Ordering::SeqCst); }
|
loop { core::sync::atomic::compiler_fence(core::sync::atomic::Ordering::SeqCst); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user