pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type TSCE_R = crate::BitReader;
pub type TSCE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type START_R = crate::BitReader;
pub type START_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type AM_R = crate::BitReader;
pub type AM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SYNCPOL_R = crate::BitReader;
pub type SYNCPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type IODEF_R = crate::BitReader;
pub type IODEF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MCV_R = crate::FieldReader;
pub type MCV_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type PGPSC_R = crate::FieldReader;
pub type PGPSC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type SSPSC_R = crate::BitReader;
pub type SSPSC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SSE_R = crate::BitReader;
pub type SSE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SSD_R = crate::FieldReader;
pub type SSD_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type CTPL_R = crate::FieldReader;
pub type CTPL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type CTPH_R = crate::FieldReader;
pub type CTPH_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn tsce(&self) -> TSCE_R {
TSCE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn start(&self) -> START_R {
START_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn am(&self) -> AM_R {
AM_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn syncpol(&self) -> SYNCPOL_R {
SYNCPOL_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn iodef(&self) -> IODEF_R {
IODEF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn mcv(&self) -> MCV_R {
MCV_R::new(((self.bits >> 5) & 7) as u8)
}
#[inline(always)]
pub fn pgpsc(&self) -> PGPSC_R {
PGPSC_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn sspsc(&self) -> SSPSC_R {
SSPSC_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn sse(&self) -> SSE_R {
SSE_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn ssd(&self) -> SSD_R {
SSD_R::new(((self.bits >> 17) & 0x7f) as u8)
}
#[inline(always)]
pub fn ctpl(&self) -> CTPL_R {
CTPL_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[inline(always)]
pub fn ctph(&self) -> CTPH_R {
CTPH_R::new(((self.bits >> 28) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("ctph", &self.ctph())
.field("ctpl", &self.ctpl())
.field("ssd", &self.ssd())
.field("sse", &self.sse())
.field("sspsc", &self.sspsc())
.field("pgpsc", &self.pgpsc())
.field("mcv", &self.mcv())
.field("iodef", &self.iodef())
.field("syncpol", &self.syncpol())
.field("am", &self.am())
.field("start", &self.start())
.field("tsce", &self.tsce())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tsce(&mut self) -> TSCE_W<CRrs> {
TSCE_W::new(self, 0)
}
#[inline(always)]
pub fn start(&mut self) -> START_W<CRrs> {
START_W::new(self, 1)
}
#[inline(always)]
pub fn am(&mut self) -> AM_W<CRrs> {
AM_W::new(self, 2)
}
#[inline(always)]
pub fn syncpol(&mut self) -> SYNCPOL_W<CRrs> {
SYNCPOL_W::new(self, 3)
}
#[inline(always)]
pub fn iodef(&mut self) -> IODEF_W<CRrs> {
IODEF_W::new(self, 4)
}
#[inline(always)]
pub fn mcv(&mut self) -> MCV_W<CRrs> {
MCV_W::new(self, 5)
}
#[inline(always)]
pub fn pgpsc(&mut self) -> PGPSC_W<CRrs> {
PGPSC_W::new(self, 12)
}
#[inline(always)]
pub fn sspsc(&mut self) -> SSPSC_W<CRrs> {
SSPSC_W::new(self, 15)
}
#[inline(always)]
pub fn sse(&mut self) -> SSE_W<CRrs> {
SSE_W::new(self, 16)
}
#[inline(always)]
pub fn ssd(&mut self) -> SSD_W<CRrs> {
SSD_W::new(self, 17)
}
#[inline(always)]
pub fn ctpl(&mut self) -> CTPL_W<CRrs> {
CTPL_W::new(self, 24)
}
#[inline(always)]
pub fn ctph(&mut self) -> CTPH_W<CRrs> {
CTPH_W::new(self, 28)
}
}
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;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
impl crate::Resettable for CRrs {
const RESET_VALUE: u32 = 0;
}