pub type R = crate::R<CWSTRTrs>;
pub type W = crate::W<CWSTRTrs>;
pub type HOFFCNT_R = crate::FieldReader<u16>;
pub type HOFFCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16, crate::Safe>;
pub type VST_R = crate::FieldReader<u16>;
pub type VST_W<'a, REG> = crate::FieldWriter<'a, REG, 13, u16, crate::Safe>;
impl R {
#[inline(always)]
pub fn hoffcnt(&self) -> HOFFCNT_R {
HOFFCNT_R::new((self.bits & 0x3fff) as u16)
}
#[inline(always)]
pub fn vst(&self) -> VST_R {
VST_R::new(((self.bits >> 16) & 0x1fff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CWSTRT")
.field("vst", &self.vst())
.field("hoffcnt", &self.hoffcnt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn hoffcnt(&mut self) -> HOFFCNT_W<CWSTRTrs> {
HOFFCNT_W::new(self, 0)
}
#[inline(always)]
pub fn vst(&mut self) -> VST_W<CWSTRTrs> {
VST_W::new(self, 16)
}
}
pub struct CWSTRTrs;
impl crate::RegisterSpec for CWSTRTrs {
type Ux = u32;
}
impl crate::Readable for CWSTRTrs {}
impl crate::Writable for CWSTRTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CWSTRTrs {}