}
}
+fn reset_requested() -> bool {
+ (gpio::get(gpio::GPIOA) & (1 << 12)) == 0
+}
+
#[inline(never)]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {
- if (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 {
+ if reset_requested() {
nvic::system_reset();
}
}
}
});
- if (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 {
+ if reset_requested() {
nvic::system_reset();
}
}