pub type R = crate::R<WPCR2rs>;
pub type W = crate::W<WPCR2rs>;
pub type TCLKPREP_R = crate::FieldReader;
pub type TCLKPREP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type TCLKZERO_R = crate::FieldReader;
pub type TCLKZERO_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type THSPREP_R = crate::FieldReader;
pub type THSPREP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type THSTRAIL_R = crate::FieldReader;
pub type THSTRAIL_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn tclkprep(&self) -> TCLKPREP_R {
TCLKPREP_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn tclkzero(&self) -> TCLKZERO_R {
TCLKZERO_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn thsprep(&self) -> THSPREP_R {
THSPREP_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn thstrail(&self) -> THSTRAIL_R {
THSTRAIL_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WPCR2")
.field("tclkprep", &self.tclkprep())
.field("tclkzero", &self.tclkzero())
.field("thsprep", &self.thsprep())
.field("thstrail", &self.thstrail())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tclkprep(&mut self) -> TCLKPREP_W<WPCR2rs> {
TCLKPREP_W::new(self, 0)
}
#[inline(always)]
pub fn tclkzero(&mut self) -> TCLKZERO_W<WPCR2rs> {
TCLKZERO_W::new(self, 8)
}
#[inline(always)]
pub fn thsprep(&mut self) -> THSPREP_W<WPCR2rs> {
THSPREP_W::new(self, 16)
}
#[inline(always)]
pub fn thstrail(&mut self) -> THSTRAIL_W<WPCR2rs> {
THSTRAIL_W::new(self, 24)
}
}
pub struct WPCR2rs;
impl crate::RegisterSpec for WPCR2rs {
type Ux = u32;
}
impl crate::Readable for WPCR2rs {}
impl crate::Writable for WPCR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for WPCR2rs {}