pub type R = crate::R<DCR3rs>;
pub type W = crate::W<DCR3rs>;
pub type MAXTRAN_R = crate::FieldReader;
pub type MAXTRAN_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type CSBOUND_R = crate::FieldReader;
pub type CSBOUND_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn maxtran(&self) -> MAXTRAN_R {
MAXTRAN_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn csbound(&self) -> CSBOUND_R {
CSBOUND_R::new(((self.bits >> 16) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DCR3")
.field("maxtran", &self.maxtran())
.field("csbound", &self.csbound())
.finish()
}
}
impl W {
#[inline(always)]
pub fn maxtran(&mut self) -> MAXTRAN_W<DCR3rs> {
MAXTRAN_W::new(self, 0)
}
#[inline(always)]
pub fn csbound(&mut self) -> CSBOUND_W<DCR3rs> {
CSBOUND_W::new(self, 16)
}
}
pub struct DCR3rs;
impl crate::RegisterSpec for DCR3rs {
type Ux = u32;
}
impl crate::Readable for DCR3rs {}
impl crate::Writable for DCR3rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DCR3rs {}