pub type R = crate::R<GHCRrs>;
pub type W = crate::W<GHCRrs>;
pub type DT_R = crate::FieldReader;
pub type DT_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type VCID_R = crate::FieldReader;
pub type VCID_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type WCLSB_R = crate::FieldReader;
pub type WCLSB_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type WCMSB_R = crate::FieldReader;
pub type WCMSB_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn dt(&self) -> DT_R {
DT_R::new((self.bits & 0x3f) as u8)
}
#[inline(always)]
pub fn vcid(&self) -> VCID_R {
VCID_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn wclsb(&self) -> WCLSB_R {
WCLSB_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn wcmsb(&self) -> WCMSB_R {
WCMSB_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("GHCR")
.field("dt", &self.dt())
.field("vcid", &self.vcid())
.field("wclsb", &self.wclsb())
.field("wcmsb", &self.wcmsb())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dt(&mut self) -> DT_W<GHCRrs> {
DT_W::new(self, 0)
}
#[inline(always)]
pub fn vcid(&mut self) -> VCID_W<GHCRrs> {
VCID_W::new(self, 6)
}
#[inline(always)]
pub fn wclsb(&mut self) -> WCLSB_W<GHCRrs> {
WCLSB_W::new(self, 8)
}
#[inline(always)]
pub fn wcmsb(&mut self) -> WCMSB_W<GHCRrs> {
WCMSB_W::new(self, 16)
}
}
pub struct GHCRrs;
impl crate::RegisterSpec for GHCRrs {
type Ux = u32;
}
impl crate::Readable for GHCRrs {}
impl crate::Writable for GHCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GHCRrs {}