A RPi Pico powered Lightning Detector
1use core::{
2 panic::PanicInfo,
3 sync::atomic::{Ordering, compiler_fence},
4};
5
6#[cfg(not(feature = "defmt"))]
7#[inline(never)]
8#[panic_handler]
9fn panic_reset(_info: &PanicInfo) -> ! {
10 cortex_m::interrupt::disable();
11
12 // Halt execution and reset the chip.
13 compiler_fence(Ordering::SeqCst);
14 cortex_m::peripheral::SCB::sys_reset();
15}