pub type R = crate::R<RSTCAUSErs>;
pub type PorstR = crate::BitReader;
pub type AvddbodR = crate::BitReader;
pub type DvddbodR = crate::BitReader;
pub type DecbodR = crate::BitReader;
pub type ExtrstR = crate::BitReader;
pub type LockuprstR = crate::BitReader;
pub type SysreqrstR = crate::BitReader;
pub type WdogrstR = crate::BitReader;
pub type Em4rstR = crate::BitReader;
impl R {
#[inline(always)]
pub fn porst(&self) -> PorstR {
PorstR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn avddbod(&self) -> AvddbodR {
AvddbodR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn dvddbod(&self) -> DvddbodR {
DvddbodR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn decbod(&self) -> DecbodR {
DecbodR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn extrst(&self) -> ExtrstR {
ExtrstR::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn lockuprst(&self) -> LockuprstR {
LockuprstR::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn sysreqrst(&self) -> SysreqrstR {
SysreqrstR::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn wdogrst(&self) -> WdogrstR {
WdogrstR::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn em4rst(&self) -> Em4rstR {
Em4rstR::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RSTCAUSE")
.field("porst", &self.porst())
.field("avddbod", &self.avddbod())
.field("dvddbod", &self.dvddbod())
.field("decbod", &self.decbod())
.field("extrst", &self.extrst())
.field("lockuprst", &self.lockuprst())
.field("sysreqrst", &self.sysreqrst())
.field("wdogrst", &self.wdogrst())
.field("em4rst", &self.em4rst())
.finish()
}
}
pub struct RSTCAUSErs;
impl crate::RegisterSpec for RSTCAUSErs {
type Ux = u32;
}
impl crate::Readable for RSTCAUSErs {}
impl crate::Resettable for RSTCAUSErs {}