//! Tests that panics can be caught in an interrupt handler.
#![no_main]
#![no_std]
#![feature(naked_functions)]
#![feature(asm_const)]
extern crate alloc;
use core::sync::atomic::{AtomicUsize, Ordering};
use hopter::{
debug::semihosting::{self, dbg_println},
interrupt::declare::{handler, irq},
sync::{self, CondVar, Consumer, Mailbox, Mutex, Semaphore, SpinIrqSafe},
task::main,
time,
};
use stm32f4xx_hal::{
pac::{Interrupt, Peripherals, TIM2},
prelude::*,
timer::{CounterUs, Event},
};
irq!(Tim2Irq, Interrupt::TIM2);
static TIMER: SpinIrqSafe