pub type R = crate::R<BCCRrs>;
pub type W = crate::W<BCCRrs>;
pub type BCBLUE_R = crate::FieldReader;
pub type BCBLUE_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type BCGREEN_R = crate::FieldReader;
pub type BCGREEN_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type BCRED_R = crate::FieldReader;
pub type BCRED_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn bcblue(&self) -> BCBLUE_R {
BCBLUE_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn bcgreen(&self) -> BCGREEN_R {
BCGREEN_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn bcred(&self) -> BCRED_R {
BCRED_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BCCR")
.field("bcblue", &self.bcblue())
.field("bcgreen", &self.bcgreen())
.field("bcred", &self.bcred())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bcblue(&mut self) -> BCBLUE_W<BCCRrs> {
BCBLUE_W::new(self, 0)
}
#[inline(always)]
pub fn bcgreen(&mut self) -> BCGREEN_W<BCCRrs> {
BCGREEN_W::new(self, 8)
}
#[inline(always)]
pub fn bcred(&mut self) -> BCRED_W<BCCRrs> {
BCRED_W::new(self, 16)
}
}
pub struct BCCRrs;
impl crate::RegisterSpec for BCCRrs {
type Ux = u32;
}
impl crate::Readable for BCCRrs {}
impl crate::Writable for BCCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for BCCRrs {}