use crate::hal::atmega4809;
use crate::mut_singleton;
pub struct Hardware {
pub cpu: &'static mut atmega4809::cpu::CpuImpl,
pub timerb0: &'static mut atmega4809::timer::tcb0::TimerImpl,
pub timerb1: &'static mut atmega4809::timer::tcb1::TimerImpl,
pub timerb2: &'static mut atmega4809::timer::tcb2::TimerImpl,
pub timerb3: &'static mut atmega4809::timer::tcb3::TimerImpl,
pub porta: &'static atmega4809::port::porta::PortImpl,
pub portb: &'static atmega4809::port::portb::PortImpl,
pub portc: &'static atmega4809::port::portc::PortImpl,
pub portd: &'static atmega4809::port::portd::PortImpl,
pub porte: &'static atmega4809::port::porte::PortImpl,
pub portf: &'static atmega4809::port::portf::PortImpl,
pub watchdog: &'static mut atmega4809::watchdog::WatchdogImpl,
pub usart0: &'static mut atmega4809::serial::usart0::SerialImpl,
pub usart1: &'static mut atmega4809::serial::usart1::SerialImpl,
pub usart2: &'static mut atmega4809::serial::usart2::SerialImpl,
pub usart3: &'static mut atmega4809::serial::usart3::SerialImpl,
}
mut_singleton!(Hardware, HARDWARE, instance,
Hardware {
cpu: atmega4809::cpu::instance(),
timerb0: atmega4809::timer::tcb0::instance(),
timerb1: atmega4809::timer::tcb1::instance(),
timerb2: atmega4809::timer::tcb2::instance(),
timerb3: atmega4809::timer::tcb3::instance(),
porta: atmega4809::port::porta::instance(),
portb: atmega4809::port::portb::instance(),
portc: atmega4809::port::portc::instance(),
portd: atmega4809::port::portd::instance(),
porte: atmega4809::port::porte::instance(),
portf: atmega4809::port::portf::instance(),
watchdog: atmega4809::watchdog::instance(),
usart0: atmega4809::serial::usart0::instance(),
usart1: atmega4809::serial::usart1::instance(),
usart2: atmega4809::serial::usart2::instance(),
usart3: atmega4809::serial::usart3::instance(),
}
);