pub type R = crate::R<C18TCRrs>;
pub type W = crate::W<C18TCRrs>;
pub type SINC_R = crate::FieldReader;
pub type SINC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DINC_R = crate::FieldReader;
pub type DINC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type SSIZE_R = crate::FieldReader;
pub type SSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DSIZE_R = crate::FieldReader;
pub type DSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type SINCOS_R = crate::FieldReader;
pub type SINCOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DINCOS_R = crate::FieldReader;
pub type DINCOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type SBURST_R = crate::FieldReader;
pub type SBURST_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type DBURST_R = crate::FieldReader;
pub type DBURST_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type TLEN_R = crate::FieldReader;
pub type TLEN_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type PKE_R = crate::BitReader;
pub type PKE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PAM_R = crate::FieldReader;
pub type PAM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type TRGM_R = crate::FieldReader;
pub type TRGM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type SWRM_R = crate::BitReader;
pub type SWRM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BWM_R = crate::BitReader;
pub type BWM_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn sinc(&self) -> SINC_R {
SINC_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn dinc(&self) -> DINC_R {
DINC_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn ssize(&self) -> SSIZE_R {
SSIZE_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn dsize(&self) -> DSIZE_R {
DSIZE_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn sincos(&self) -> SINCOS_R {
SINCOS_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn dincos(&self) -> DINCOS_R {
DINCOS_R::new(((self.bits >> 10) & 3) as u8)
}
#[inline(always)]
pub fn sburst(&self) -> SBURST_R {
SBURST_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn dburst(&self) -> DBURST_R {
DBURST_R::new(((self.bits >> 15) & 7) as u8)
}
#[inline(always)]
pub fn tlen(&self) -> TLEN_R {
TLEN_R::new(((self.bits >> 18) & 0x7f) as u8)
}
#[inline(always)]
pub fn pke(&self) -> PKE_R {
PKE_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn pam(&self) -> PAM_R {
PAM_R::new(((self.bits >> 26) & 3) as u8)
}
#[inline(always)]
pub fn trgm(&self) -> TRGM_R {
TRGM_R::new(((self.bits >> 28) & 3) as u8)
}
#[inline(always)]
pub fn swrm(&self) -> SWRM_R {
SWRM_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn bwm(&self) -> BWM_R {
BWM_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("C18TCR")
.field("sinc", &self.sinc())
.field("dinc", &self.dinc())
.field("ssize", &self.ssize())
.field("dsize", &self.dsize())
.field("sincos", &self.sincos())
.field("dincos", &self.dincos())
.field("sburst", &self.sburst())
.field("dburst", &self.dburst())
.field("tlen", &self.tlen())
.field("pke", &self.pke())
.field("pam", &self.pam())
.field("trgm", &self.trgm())
.field("swrm", &self.swrm())
.field("bwm", &self.bwm())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sinc(&mut self) -> SINC_W<C18TCRrs> {
SINC_W::new(self, 0)
}
#[inline(always)]
pub fn dinc(&mut self) -> DINC_W<C18TCRrs> {
DINC_W::new(self, 2)
}
#[inline(always)]
pub fn ssize(&mut self) -> SSIZE_W<C18TCRrs> {
SSIZE_W::new(self, 4)
}
#[inline(always)]
pub fn dsize(&mut self) -> DSIZE_W<C18TCRrs> {
DSIZE_W::new(self, 6)
}
#[inline(always)]
pub fn sincos(&mut self) -> SINCOS_W<C18TCRrs> {
SINCOS_W::new(self, 8)
}
#[inline(always)]
pub fn dincos(&mut self) -> DINCOS_W<C18TCRrs> {
DINCOS_W::new(self, 10)
}
#[inline(always)]
pub fn sburst(&mut self) -> SBURST_W<C18TCRrs> {
SBURST_W::new(self, 12)
}
#[inline(always)]
pub fn dburst(&mut self) -> DBURST_W<C18TCRrs> {
DBURST_W::new(self, 15)
}
#[inline(always)]
pub fn tlen(&mut self) -> TLEN_W<C18TCRrs> {
TLEN_W::new(self, 18)
}
#[inline(always)]
pub fn pke(&mut self) -> PKE_W<C18TCRrs> {
PKE_W::new(self, 25)
}
#[inline(always)]
pub fn pam(&mut self) -> PAM_W<C18TCRrs> {
PAM_W::new(self, 26)
}
#[inline(always)]
pub fn trgm(&mut self) -> TRGM_W<C18TCRrs> {
TRGM_W::new(self, 28)
}
#[inline(always)]
pub fn swrm(&mut self) -> SWRM_W<C18TCRrs> {
SWRM_W::new(self, 30)
}
#[inline(always)]
pub fn bwm(&mut self) -> BWM_W<C18TCRrs> {
BWM_W::new(self, 31)
}
}
pub struct C18TCRrs;
impl crate::RegisterSpec for C18TCRrs {
type Ux = u32;
}
impl crate::Readable for C18TCRrs {}
impl crate::Writable for C18TCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for C18TCRrs {}