fix panic handler
#[panic_handler]
#[cfg(not(feature = "semihosting"))]
fn panic(_info: &core::panic::PanicInfo) -> ! {
- let dp = unsafe { pac::Peripherals::steal() };
- dp.GPIOD.odr.modify(|_, w| w.odr6().high()); // FP_LED_1
- dp.GPIOG.odr.modify(|_, w| w.odr4().high()); // FP_LED_3
+ let gpiod = unsafe { &*pac::GPIOD::ptr() };
+ gpiod.odr.modify(|_, w| w.odr6().high().odr12().high()); // FP_LED_1, FP_LED_3
loop { core::sync::atomic::compiler_fence(core::sync::atomic::Ordering::SeqCst); }
}
