#![cfg_attr(test, allow(unused_imports))]
#![cfg_attr(not(test), no_std)]
#![cfg_attr(not(test), no_main)]
#![feature(half_open_range_patterns)]
#![feature(exclusive_range_pattern)]
#![allow(dead_code)]
// custom panic handler
#[cfg(not(test))]
use core::panic::PanicInfo;
use core::{cell::RefCell, ops::DerefMut};
use cortex_m::{interrupt::free, interrupt::Mutex, peripheral::NVIC};
use cortex_m_rt::entry;
use stm32l4xx_hal::{delay::Delay, device::{I2C1, TIM2, TIM7}, gpio::{
Alternate, Edge, Floating, Input, OpenDrain, Output, PullUp, PushPull, AF4, PA3, PB5, PC15,
}, gpio::{State, PA10, PA9}, i2c::I2c, interrupt, pac, prelude::*, rcc, stm32::Interrupt, timer::{Timer, Event},
};
mod ds3231;
mod nixie;
mod pca9685;
mod tusb322;
use nixie::*;
// Local peripheral mappings
type RtcInt = PB5>;
type FaultInt = PA3>;
type FaultLed = PC15