//! Tests producing data to a task from an ISR with
//! `produce_with_overflow_allow_isr`.
#![no_main]
#![no_std]
#![feature(naked_functions)]
#![feature(asm_const)]
extern crate alloc;
use core::sync::atomic::{AtomicUsize, Ordering};
use hopter::{
config,
debug::semihosting::{self, dbg_println},
interrupt::declare::{handler, irq},
sync,
sync::{Consumer, Producer, SpinIrqSafe},
task,
task::main,
};
use stm32f4xx_hal::{
pac::{Interrupt, Peripherals, TIM2},
prelude::*,
timer::{CounterUs, Event},
};
irq!(Tim2Irq, Interrupt::TIM2);
static TIMER: SpinIrqSafe