pub type R = crate::R<DCFGrs>;
pub type W = crate::W<DCFGrs>;
pub type DSPD_R = crate::FieldReader;
pub type DSPD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type NZLSOHSK_R = crate::BitReader;
pub type NZLSOHSK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DAD_R = crate::FieldReader;
pub type DAD_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type PFIVL_R = crate::FieldReader;
pub type PFIVL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn dspd(&self) -> DSPD_R {
DSPD_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn nzlsohsk(&self) -> NZLSOHSK_R {
NZLSOHSK_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn dad(&self) -> DAD_R {
DAD_R::new(((self.bits >> 4) & 0x7f) as u8)
}
#[inline(always)]
pub fn pfivl(&self) -> PFIVL_R {
PFIVL_R::new(((self.bits >> 11) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DCFG")
.field("dspd", &self.dspd())
.field("nzlsohsk", &self.nzlsohsk())
.field("dad", &self.dad())
.field("pfivl", &self.pfivl())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dspd(&mut self) -> DSPD_W<DCFGrs> {
DSPD_W::new(self, 0)
}
#[inline(always)]
pub fn nzlsohsk(&mut self) -> NZLSOHSK_W<DCFGrs> {
NZLSOHSK_W::new(self, 2)
}
#[inline(always)]
pub fn dad(&mut self) -> DAD_W<DCFGrs> {
DAD_W::new(self, 4)
}
#[inline(always)]
pub fn pfivl(&mut self) -> PFIVL_W<DCFGrs> {
PFIVL_W::new(self, 11)
}
}
pub struct DCFGrs;
impl crate::RegisterSpec for DCFGrs {
type Ux = u32;
}
impl crate::Readable for DCFGrs {}
impl crate::Writable for DCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DCFGrs {
const RESET_VALUE: u32 = 0x0220_0000;
}