pub type R = crate::R<GCRrs>;
pub type W = crate::W<GCRrs>;
pub type LTDCEN_R = crate::BitReader;
pub type LTDCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DBW_R = crate::FieldReader;
pub type DGW_R = crate::FieldReader;
pub type DRW_R = crate::FieldReader;
pub type DEN_R = crate::BitReader;
pub type DEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PCPOL_R = crate::BitReader;
pub type PCPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DEPOL_R = crate::BitReader;
pub type DEPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VSPOL_R = crate::BitReader;
pub type VSPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSPOL_R = crate::BitReader;
pub type HSPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ltdcen(&self) -> LTDCEN_R {
LTDCEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dbw(&self) -> DBW_R {
DBW_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn dgw(&self) -> DGW_R {
DGW_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn drw(&self) -> DRW_R {
DRW_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn den(&self) -> DEN_R {
DEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn pcpol(&self) -> PCPOL_R {
PCPOL_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn depol(&self) -> DEPOL_R {
DEPOL_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn vspol(&self) -> VSPOL_R {
VSPOL_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn hspol(&self) -> HSPOL_R {
HSPOL_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("GCR")
.field("ltdcen", &self.ltdcen())
.field("dbw", &self.dbw())
.field("dgw", &self.dgw())
.field("drw", &self.drw())
.field("den", &self.den())
.field("pcpol", &self.pcpol())
.field("depol", &self.depol())
.field("vspol", &self.vspol())
.field("hspol", &self.hspol())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ltdcen(&mut self) -> LTDCEN_W<GCRrs> {
LTDCEN_W::new(self, 0)
}
#[inline(always)]
pub fn den(&mut self) -> DEN_W<GCRrs> {
DEN_W::new(self, 16)
}
#[inline(always)]
pub fn pcpol(&mut self) -> PCPOL_W<GCRrs> {
PCPOL_W::new(self, 28)
}
#[inline(always)]
pub fn depol(&mut self) -> DEPOL_W<GCRrs> {
DEPOL_W::new(self, 29)
}
#[inline(always)]
pub fn vspol(&mut self) -> VSPOL_W<GCRrs> {
VSPOL_W::new(self, 30)
}
#[inline(always)]
pub fn hspol(&mut self) -> HSPOL_W<GCRrs> {
HSPOL_W::new(self, 31)
}
}
pub struct GCRrs;
impl crate::RegisterSpec for GCRrs {
type Ux = u32;
}
impl crate::Readable for GCRrs {}
impl crate::Writable for GCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GCRrs {
const RESET_VALUE: u32 = 0x2220;
}