panic: turn red leds on
This commit is contained in:
parent
a8e2d616bb
commit
8ee0950005
10
src/main.rs
10
src/main.rs
@ -4,8 +4,16 @@
|
|||||||
// Enable returning `!`
|
// Enable returning `!`
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
#[panic_handler]
|
||||||
#[cfg(not(feature = "semihosting"))]
|
#[cfg(not(feature = "semihosting"))]
|
||||||
extern crate panic_abort;
|
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
|
||||||
|
loop { core::sync::atomic::compiler_fence(core::sync::atomic::Ordering::SeqCst); }
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "semihosting")]
|
#[cfg(feature = "semihosting")]
|
||||||
extern crate panic_semihosting;
|
extern crate panic_semihosting;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user