pub type R = crate::R<WCRrs>;
pub type W = crate::W<WCRrs>;
pub type COLM_R = crate::BitReader;
pub type COLM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SHTDN_R = crate::BitReader;
pub type SHTDN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LTDCEN_R = crate::BitReader;
pub type LTDCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DSIEN_R = crate::BitReader;
pub type DSIEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn colm(&self) -> COLM_R {
COLM_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn shtdn(&self) -> SHTDN_R {
SHTDN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ltdcen(&self) -> LTDCEN_R {
LTDCEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn dsien(&self) -> DSIEN_R {
DSIEN_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WCR")
.field("colm", &self.colm())
.field("shtdn", &self.shtdn())
.field("ltdcen", &self.ltdcen())
.field("dsien", &self.dsien())
.finish()
}
}
impl W {
#[inline(always)]
pub fn colm(&mut self) -> COLM_W<WCRrs> {
COLM_W::new(self, 0)
}
#[inline(always)]
pub fn shtdn(&mut self) -> SHTDN_W<WCRrs> {
SHTDN_W::new(self, 1)
}
#[inline(always)]
pub fn ltdcen(&mut self) -> LTDCEN_W<WCRrs> {
LTDCEN_W::new(self, 2)
}
#[inline(always)]
pub fn dsien(&mut self) -> DSIEN_W<WCRrs> {
DSIEN_W::new(self, 3)
}
}
pub struct WCRrs;
impl crate::RegisterSpec for WCRrs {
type Ux = u32;
}
impl crate::Readable for WCRrs {}
impl crate::Writable for WCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for WCRrs {}