pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type START_R = crate::BitReader;
pub type START_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SUSP_R = crate::BitReader;
pub type SUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ABORT_R = crate::BitReader;
pub type ABORT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LOM_R = crate::BitReader;
pub type LOM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TEIE_R = crate::BitReader;
pub type TEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TCIE_R = crate::BitReader;
pub type TCIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TWIE_R = crate::BitReader;
pub type TWIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CAEIE_R = crate::BitReader;
pub type CAEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CTCIE_R = crate::BitReader;
pub type CTCIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CEIE_R = crate::BitReader;
pub type CEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MODE_R = crate::FieldReader;
pub type MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn start(&self) -> START_R {
START_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn susp(&self) -> SUSP_R {
SUSP_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn abort(&self) -> ABORT_R {
ABORT_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn lom(&self) -> LOM_R {
LOM_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn teie(&self) -> TEIE_R {
TEIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn twie(&self) -> TWIE_R {
TWIE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn caeie(&self) -> CAEIE_R {
CAEIE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn ctcie(&self) -> CTCIE_R {
CTCIE_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn ceie(&self) -> CEIE_R {
CEIE_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new(((self.bits >> 16) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("start", &self.start())
.field("susp", &self.susp())
.field("abort", &self.abort())
.field("lom", &self.lom())
.field("teie", &self.teie())
.field("tcie", &self.tcie())
.field("twie", &self.twie())
.field("caeie", &self.caeie())
.field("ctcie", &self.ctcie())
.field("ceie", &self.ceie())
.field("mode", &self.mode())
.finish()
}
}
impl W {
#[inline(always)]
pub fn start(&mut self) -> START_W<CRrs> {
START_W::new(self, 0)
}
#[inline(always)]
pub fn susp(&mut self) -> SUSP_W<CRrs> {
SUSP_W::new(self, 1)
}
#[inline(always)]
pub fn abort(&mut self) -> ABORT_W<CRrs> {
ABORT_W::new(self, 2)
}
#[inline(always)]
pub fn lom(&mut self) -> LOM_W<CRrs> {
LOM_W::new(self, 6)
}
#[inline(always)]
pub fn teie(&mut self) -> TEIE_W<CRrs> {
TEIE_W::new(self, 8)
}
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W<CRrs> {
TCIE_W::new(self, 9)
}
#[inline(always)]
pub fn twie(&mut self) -> TWIE_W<CRrs> {
TWIE_W::new(self, 10)
}
#[inline(always)]
pub fn caeie(&mut self) -> CAEIE_W<CRrs> {
CAEIE_W::new(self, 11)
}
#[inline(always)]
pub fn ctcie(&mut self) -> CTCIE_W<CRrs> {
CTCIE_W::new(self, 12)
}
#[inline(always)]
pub fn ceie(&mut self) -> CEIE_W<CRrs> {
CEIE_W::new(self, 13)
}
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<CRrs> {
MODE_W::new(self, 16)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}