pub type R = crate::R<CFGR2rs>;
pub type W = crate::W<CFGR2rs>;
pub type DTRBS_R = crate::FieldReader;
pub type DTRBS_W<'a, REG> = crate::FieldWriter<'a, REG, 5, u8, crate::Safe>;
pub type OFFSET_R = crate::FieldReader<u32>;
pub type OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32, crate::Safe>;
impl R {
#[inline(always)]
pub fn dtrbs(&self) -> DTRBS_R {
DTRBS_R::new(((self.bits >> 3) & 0x1f) as u8)
}
#[inline(always)]
pub fn offset(&self) -> OFFSET_R {
OFFSET_R::new((self.bits >> 8) & 0x00ff_ffff)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CFGR2")
.field("offset", &self.offset())
.field("dtrbs", &self.dtrbs())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dtrbs(&mut self) -> DTRBS_W<CFGR2rs> {
DTRBS_W::new(self, 3)
}
#[inline(always)]
pub fn offset(&mut self) -> OFFSET_W<CFGR2rs> {
OFFSET_W::new(self, 8)
}
}
pub struct CFGR2rs;
impl crate::RegisterSpec for CFGR2rs {
type Ux = u32;
}
impl crate::Readable for CFGR2rs {}
impl crate::Writable for CFGR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CFGR2rs {}