pub type R = crate::R<L1DCCRrs>;
pub type W = crate::W<L1DCCRrs>;
pub type DCBLUE_R = crate::FieldReader;
pub type DCBLUE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DCGREEN_R = crate::FieldReader;
pub type DCGREEN_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DCRED_R = crate::FieldReader;
pub type DCRED_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type DCALPHA_R = crate::FieldReader;
pub type DCALPHA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn dcblue(&self) -> DCBLUE_R {
DCBLUE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn dcgreen(&self) -> DCGREEN_R {
DCGREEN_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn dcred(&self) -> DCRED_R {
DCRED_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn dcalpha(&self) -> DCALPHA_R {
DCALPHA_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("L1DCCR")
.field("dcblue", &self.dcblue())
.field("dcgreen", &self.dcgreen())
.field("dcred", &self.dcred())
.field("dcalpha", &self.dcalpha())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dcblue(&mut self) -> DCBLUE_W<L1DCCRrs> {
DCBLUE_W::new(self, 0)
}
#[inline(always)]
pub fn dcgreen(&mut self) -> DCGREEN_W<L1DCCRrs> {
DCGREEN_W::new(self, 8)
}
#[inline(always)]
pub fn dcred(&mut self) -> DCRED_W<L1DCCRrs> {
DCRED_W::new(self, 16)
}
#[inline(always)]
pub fn dcalpha(&mut self) -> DCALPHA_W<L1DCCRrs> {
DCALPHA_W::new(self, 24)
}
}
pub struct L1DCCRrs;
impl crate::RegisterSpec for L1DCCRrs {
type Ux = u32;
}
impl crate::Readable for L1DCCRrs {}
impl crate::Writable for L1DCCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for L1DCCRrs {}