#[repr(C)]
#[derive(Debug)]
pub struct RegisterBlock {
isr: ISR,
ifcr: IFCR,
ch: [CH; 7],
_reserved3: [u8; 0x14],
cselr: CSELR,
}
impl RegisterBlock {
#[inline(always)]
pub const fn isr(&self) -> &ISR {
&self.isr
}
#[inline(always)]
pub const fn ifcr(&self) -> &IFCR {
&self.ifcr
}
#[inline(always)]
pub const fn ch(&self, n: usize) -> &CH {
&self.ch[n]
}
#[inline(always)]
pub fn ch_iter(&self) -> impl Iterator<Item = &CH> {
self.ch.iter()
}
#[inline(always)]
pub const fn ch1(&self) -> &CH {
self.ch(0)
}
#[inline(always)]
pub const fn ch2(&self) -> &CH {
self.ch(1)
}
#[inline(always)]
pub const fn ch3(&self) -> &CH {
self.ch(2)
}
#[inline(always)]
pub const fn ch4(&self) -> &CH {
self.ch(3)
}
#[inline(always)]
pub const fn ch5(&self) -> &CH {
self.ch(4)
}
#[inline(always)]
pub const fn ch6(&self) -> &CH {
self.ch(5)
}
#[inline(always)]
pub const fn ch7(&self) -> &CH {
self.ch(6)
}
#[inline(always)]
pub const fn cselr(&self) -> &CSELR {
&self.cselr
}
}
pub type ISR = crate::Reg<isr::ISRrs>;
pub mod isr;
pub type IFCR = crate::Reg<ifcr::IFCRrs>;
pub mod ifcr;
pub use self::ch::CH;
pub mod ch;
pub type CSELR = crate::Reg<cselr::CSELRrs>;
pub mod cselr;