pub type R = crate::R<DENABLErs>;
pub type W = crate::W<DENABLErs>;
pub type DFTEN_R = crate::BitReader;
pub type DFTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DBGEN_R = crate::BitReader;
pub type DBGEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NIDEN_R = crate::BitReader;
pub type NIDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DEVICEEN_R = crate::BitReader;
pub type DEVICEEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HDPEN_R = crate::BitReader;
pub type HDPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPIDEN_R = crate::BitReader;
pub type SPIDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPNIDEN_R = crate::BitReader;
pub type SPNIDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CP15SDISABLE_R = crate::FieldReader;
pub type CP15SDISABLE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type CFGSDISABLE_R = crate::BitReader;
pub type CFGSDISABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DBGSWENABLE_R = crate::BitReader;
pub type DBGSWENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dften(&self) -> DFTEN_R {
DFTEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dbgen(&self) -> DBGEN_R {
DBGEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn niden(&self) -> NIDEN_R {
NIDEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn deviceen(&self) -> DEVICEEN_R {
DEVICEEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn hdpen(&self) -> HDPEN_R {
HDPEN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn spiden(&self) -> SPIDEN_R {
SPIDEN_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn spniden(&self) -> SPNIDEN_R {
SPNIDEN_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn cp15sdisable(&self) -> CP15SDISABLE_R {
CP15SDISABLE_R::new(((self.bits >> 7) & 3) as u8)
}
#[inline(always)]
pub fn cfgsdisable(&self) -> CFGSDISABLE_R {
CFGSDISABLE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn dbgswenable(&self) -> DBGSWENABLE_R {
DBGSWENABLE_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DENABLE")
.field("dften", &self.dften())
.field("dbgen", &self.dbgen())
.field("niden", &self.niden())
.field("deviceen", &self.deviceen())
.field("hdpen", &self.hdpen())
.field("spiden", &self.spiden())
.field("spniden", &self.spniden())
.field("cp15sdisable", &self.cp15sdisable())
.field("cfgsdisable", &self.cfgsdisable())
.field("dbgswenable", &self.dbgswenable())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dften(&mut self) -> DFTEN_W<DENABLErs> {
DFTEN_W::new(self, 0)
}
#[inline(always)]
pub fn dbgen(&mut self) -> DBGEN_W<DENABLErs> {
DBGEN_W::new(self, 1)
}
#[inline(always)]
pub fn niden(&mut self) -> NIDEN_W<DENABLErs> {
NIDEN_W::new(self, 2)
}
#[inline(always)]
pub fn deviceen(&mut self) -> DEVICEEN_W<DENABLErs> {
DEVICEEN_W::new(self, 3)
}
#[inline(always)]
pub fn hdpen(&mut self) -> HDPEN_W<DENABLErs> {
HDPEN_W::new(self, 4)
}
#[inline(always)]
pub fn spiden(&mut self) -> SPIDEN_W<DENABLErs> {
SPIDEN_W::new(self, 5)
}
#[inline(always)]
pub fn spniden(&mut self) -> SPNIDEN_W<DENABLErs> {
SPNIDEN_W::new(self, 6)
}
#[inline(always)]
pub fn cp15sdisable(&mut self) -> CP15SDISABLE_W<DENABLErs> {
CP15SDISABLE_W::new(self, 7)
}
#[inline(always)]
pub fn cfgsdisable(&mut self) -> CFGSDISABLE_W<DENABLErs> {
CFGSDISABLE_W::new(self, 9)
}
#[inline(always)]
pub fn dbgswenable(&mut self) -> DBGSWENABLE_W<DENABLErs> {
DBGSWENABLE_W::new(self, 10)
}
}
pub struct DENABLErs;
impl crate::RegisterSpec for DENABLErs {
type Ux = u32;
}
impl crate::Readable for DENABLErs {}
impl crate::Writable for DENABLErs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DENABLErs {}