pub type R = crate::R<CCR5rs>;
pub type W = crate::W<CCR5rs>;
pub type CCR_R = crate::FieldReader<u16>;
pub type CCR_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
pub type GC5C1_R = crate::BitReader;
pub type GC5C1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GC5C2_R = crate::BitReader;
pub type GC5C2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GC5C3_R = crate::BitReader;
pub type GC5C3_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ccr(&self) -> CCR_R {
CCR_R::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn gc5c1(&self) -> GC5C1_R {
GC5C1_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn gc5c2(&self) -> GC5C2_R {
GC5C2_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn gc5c3(&self) -> GC5C3_R {
GC5C3_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("CCR5")
.field("ccr", &self.ccr())
.field("gc5c1", &self.gc5c1())
.field("gc5c2", &self.gc5c2())
.field("gc5c3", &self.gc5c3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ccr(&mut self) -> CCR_W<CCR5rs> {
CCR_W::new(self, 0)
}
#[inline(always)]
pub fn gc5c1(&mut self) -> GC5C1_W<CCR5rs> {
GC5C1_W::new(self, 29)
}
#[inline(always)]
pub fn gc5c2(&mut self) -> GC5C2_W<CCR5rs> {
GC5C2_W::new(self, 30)
}
#[inline(always)]
pub fn gc5c3(&mut self) -> GC5C3_W<CCR5rs> {
GC5C3_W::new(self, 31)
}
}
pub struct CCR5rs;
impl crate::RegisterSpec for CCR5rs {
type Ux = u32;
}
impl crate::Readable for CCR5rs {}
impl crate::Writable for CCR5rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCR5rs {}