pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type EN_R = crate::BitReader;
pub type EN_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 DMAEN_R = crate::BitReader;
pub type DMAEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TCEN_R = crate::BitReader;
pub type TCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DMM_R = crate::BitReader;
pub type DMM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FTHRES_R = crate::FieldReader;
pub type FTHRES_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
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 FTIE_R = crate::BitReader;
pub type FTIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SMIE_R = crate::BitReader;
pub type SMIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TOIE_R = crate::BitReader;
pub type TOIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type APMS_R = crate::BitReader;
pub type APMS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PMM_R = crate::BitReader;
pub type PMM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CSSEL_R = crate::BitReader;
pub type CSSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FMODE_R = crate::FieldReader;
pub type FMODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type MSEL_R = crate::FieldReader;
pub type MSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn abort(&self) -> ABORT_R {
ABORT_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn dmaen(&self) -> DMAEN_R {
DMAEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn tcen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn dmm(&self) -> DMM_R {
DMM_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn fthres(&self) -> FTHRES_R {
FTHRES_R::new(((self.bits >> 8) & 0x3f) as u8)
}
#[inline(always)]
pub fn teie(&self) -> TEIE_R {
TEIE_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn ftie(&self) -> FTIE_R {
FTIE_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn smie(&self) -> SMIE_R {
SMIE_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn toie(&self) -> TOIE_R {
TOIE_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn apms(&self) -> APMS_R {
APMS_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn pmm(&self) -> PMM_R {
PMM_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn cssel(&self) -> CSSEL_R {
CSSEL_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn fmode(&self) -> FMODE_R {
FMODE_R::new(((self.bits >> 28) & 3) as u8)
}
#[inline(always)]
pub fn msel(&self) -> MSEL_R {
MSEL_R::new(((self.bits >> 30) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("en", &self.en())
.field("abort", &self.abort())
.field("dmaen", &self.dmaen())
.field("tcen", &self.tcen())
.field("dmm", &self.dmm())
.field("fthres", &self.fthres())
.field("teie", &self.teie())
.field("tcie", &self.tcie())
.field("ftie", &self.ftie())
.field("smie", &self.smie())
.field("toie", &self.toie())
.field("apms", &self.apms())
.field("pmm", &self.pmm())
.field("cssel", &self.cssel())
.field("fmode", &self.fmode())
.field("msel", &self.msel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EN_W<CRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn abort(&mut self) -> ABORT_W<CRrs> {
ABORT_W::new(self, 1)
}
#[inline(always)]
pub fn dmaen(&mut self) -> DMAEN_W<CRrs> {
DMAEN_W::new(self, 2)
}
#[inline(always)]
pub fn tcen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 3)
}
#[inline(always)]
pub fn dmm(&mut self) -> DMM_W<CRrs> {
DMM_W::new(self, 6)
}
#[inline(always)]
pub fn fthres(&mut self) -> FTHRES_W<CRrs> {
FTHRES_W::new(self, 8)
}
#[inline(always)]
pub fn teie(&mut self) -> TEIE_W<CRrs> {
TEIE_W::new(self, 16)
}
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W<CRrs> {
TCIE_W::new(self, 17)
}
#[inline(always)]
pub fn ftie(&mut self) -> FTIE_W<CRrs> {
FTIE_W::new(self, 18)
}
#[inline(always)]
pub fn smie(&mut self) -> SMIE_W<CRrs> {
SMIE_W::new(self, 19)
}
#[inline(always)]
pub fn toie(&mut self) -> TOIE_W<CRrs> {
TOIE_W::new(self, 20)
}
#[inline(always)]
pub fn apms(&mut self) -> APMS_W<CRrs> {
APMS_W::new(self, 22)
}
#[inline(always)]
pub fn pmm(&mut self) -> PMM_W<CRrs> {
PMM_W::new(self, 23)
}
#[inline(always)]
pub fn cssel(&mut self) -> CSSEL_W<CRrs> {
CSSEL_W::new(self, 24)
}
#[inline(always)]
pub fn fmode(&mut self) -> FMODE_W<CRrs> {
FMODE_W::new(self, 28)
}
#[inline(always)]
pub fn msel(&mut self) -> MSEL_W<CRrs> {
MSEL_W::new(self, 30)
}
}
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 {}