pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type SPDIFRXEN_R = crate::FieldReader;
pub type SPDIFRXEN_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type RXDMAEN_R = crate::BitReader;
pub type RXDMAEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RXSTEO_R = crate::BitReader;
pub type RXSTEO_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DRFMT_R = crate::FieldReader;
pub type DRFMT_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PMSK_R = crate::BitReader;
pub type PMSK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VMSK_R = crate::BitReader;
pub type VMSK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CUMSK_R = crate::BitReader;
pub type CUMSK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PTMSK_R = crate::BitReader;
pub type PTMSK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CBDMAEN_R = crate::BitReader;
pub type CBDMAEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CHSEL_R = crate::BitReader;
pub type CHSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NBTR_R = crate::FieldReader;
pub type NBTR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type WFA_R = crate::BitReader;
pub type WFA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type INSEL_R = crate::FieldReader;
pub type INSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type CKSEN_R = crate::BitReader;
pub type CKSEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CKSBKPEN_R = crate::BitReader;
pub type CKSBKPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn spdifrxen(&self) -> SPDIFRXEN_R {
SPDIFRXEN_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn rxdmaen(&self) -> RXDMAEN_R {
RXDMAEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn rxsteo(&self) -> RXSTEO_R {
RXSTEO_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn drfmt(&self) -> DRFMT_R {
DRFMT_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn pmsk(&self) -> PMSK_R {
PMSK_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn vmsk(&self) -> VMSK_R {
VMSK_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn cumsk(&self) -> CUMSK_R {
CUMSK_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ptmsk(&self) -> PTMSK_R {
PTMSK_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn cbdmaen(&self) -> CBDMAEN_R {
CBDMAEN_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn chsel(&self) -> CHSEL_R {
CHSEL_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn nbtr(&self) -> NBTR_R {
NBTR_R::new(((self.bits >> 12) & 3) as u8)
}
#[inline(always)]
pub fn wfa(&self) -> WFA_R {
WFA_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn insel(&self) -> INSEL_R {
INSEL_R::new(((self.bits >> 16) & 7) as u8)
}
#[inline(always)]
pub fn cksen(&self) -> CKSEN_R {
CKSEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn cksbkpen(&self) -> CKSBKPEN_R {
CKSBKPEN_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("spdifrxen", &self.spdifrxen())
.field("rxdmaen", &self.rxdmaen())
.field("rxsteo", &self.rxsteo())
.field("drfmt", &self.drfmt())
.field("pmsk", &self.pmsk())
.field("vmsk", &self.vmsk())
.field("cumsk", &self.cumsk())
.field("ptmsk", &self.ptmsk())
.field("cbdmaen", &self.cbdmaen())
.field("chsel", &self.chsel())
.field("nbtr", &self.nbtr())
.field("wfa", &self.wfa())
.field("insel", &self.insel())
.field("cksen", &self.cksen())
.field("cksbkpen", &self.cksbkpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn spdifrxen(&mut self) -> SPDIFRXEN_W<CRrs> {
SPDIFRXEN_W::new(self, 0)
}
#[inline(always)]
pub fn rxdmaen(&mut self) -> RXDMAEN_W<CRrs> {
RXDMAEN_W::new(self, 2)
}
#[inline(always)]
pub fn rxsteo(&mut self) -> RXSTEO_W<CRrs> {
RXSTEO_W::new(self, 3)
}
#[inline(always)]
pub fn drfmt(&mut self) -> DRFMT_W<CRrs> {
DRFMT_W::new(self, 4)
}
#[inline(always)]
pub fn pmsk(&mut self) -> PMSK_W<CRrs> {
PMSK_W::new(self, 6)
}
#[inline(always)]
pub fn vmsk(&mut self) -> VMSK_W<CRrs> {
VMSK_W::new(self, 7)
}
#[inline(always)]
pub fn cumsk(&mut self) -> CUMSK_W<CRrs> {
CUMSK_W::new(self, 8)
}
#[inline(always)]
pub fn ptmsk(&mut self) -> PTMSK_W<CRrs> {
PTMSK_W::new(self, 9)
}
#[inline(always)]
pub fn cbdmaen(&mut self) -> CBDMAEN_W<CRrs> {
CBDMAEN_W::new(self, 10)
}
#[inline(always)]
pub fn chsel(&mut self) -> CHSEL_W<CRrs> {
CHSEL_W::new(self, 11)
}
#[inline(always)]
pub fn nbtr(&mut self) -> NBTR_W<CRrs> {
NBTR_W::new(self, 12)
}
#[inline(always)]
pub fn wfa(&mut self) -> WFA_W<CRrs> {
WFA_W::new(self, 14)
}
#[inline(always)]
pub fn insel(&mut self) -> INSEL_W<CRrs> {
INSEL_W::new(self, 16)
}
#[inline(always)]
pub fn cksen(&mut self) -> CKSEN_W<CRrs> {
CKSEN_W::new(self, 20)
}
#[inline(always)]
pub fn cksbkpen(&mut self) -> CKSBKPEN_W<CRrs> {
CKSBKPEN_W::new(self, 21)
}
}
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 {}