pub type R = crate::R<FGCLUTrs>;
pub type W = crate::W<FGCLUTrs>;
pub type BLUE_R = crate::FieldReader;
pub type BLUE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type GREEN_R = crate::FieldReader;
pub type GREEN_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type RED_R = crate::FieldReader;
pub type RED_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type APLHA_R = crate::FieldReader;
pub type APLHA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn blue(&self) -> BLUE_R {
BLUE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn green(&self) -> GREEN_R {
GREEN_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn red(&self) -> RED_R {
RED_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn aplha(&self) -> APLHA_R {
APLHA_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("FGCLUT")
.field("aplha", &self.aplha())
.field("red", &self.red())
.field("green", &self.green())
.field("blue", &self.blue())
.finish()
}
}
impl W {
#[inline(always)]
pub fn blue(&mut self) -> BLUE_W<FGCLUTrs> {
BLUE_W::new(self, 0)
}
#[inline(always)]
pub fn green(&mut self) -> GREEN_W<FGCLUTrs> {
GREEN_W::new(self, 8)
}
#[inline(always)]
pub fn red(&mut self) -> RED_W<FGCLUTrs> {
RED_W::new(self, 16)
}
#[inline(always)]
pub fn aplha(&mut self) -> APLHA_W<FGCLUTrs> {
APLHA_W::new(self, 24)
}
}
pub struct FGCLUTrs;
impl crate::RegisterSpec for FGCLUTrs {
type Ux = u32;
}
impl crate::Readable for FGCLUTrs {}
impl crate::Writable for FGCLUTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for FGCLUTrs {}