pub type R = crate::R<CWSIZErs>;
pub type W = crate::W<CWSIZErs>;
pub type CAPCNT_R = crate::FieldReader<u16>;
pub type CAPCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16, crate::Safe>;
pub type VLINE_R = crate::FieldReader<u16>;
pub type VLINE_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16, crate::Safe>;
impl R {
#[inline(always)]
pub fn capcnt(&self) -> CAPCNT_R {
CAPCNT_R::new((self.bits & 0x3fff) as u16)
}
#[inline(always)]
pub fn vline(&self) -> VLINE_R {
VLINE_R::new(((self.bits >> 16) & 0x3fff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CWSIZE")
.field("vline", &self.vline())
.field("capcnt", &self.capcnt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn capcnt(&mut self) -> CAPCNT_W<CWSIZErs> {
CAPCNT_W::new(self, 0)
}
#[inline(always)]
pub fn vline(&mut self) -> VLINE_W<CWSIZErs> {
VLINE_W::new(self, 16)
}
}
pub struct CWSIZErs;
impl crate::RegisterSpec for CWSIZErs {
type Ux = u32;
}
impl crate::Readable for CWSIZErs {}
impl crate::Writable for CWSIZErs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CWSIZErs {}