pub type R = crate::R<STATUSrs>;
pub type BusyR = crate::BitReader;
pub type LockedR = crate::BitReader;
pub type InvaddrR = crate::BitReader;
pub type WdatareadyR = crate::BitReader;
pub type WordtimeoutR = crate::BitReader;
pub type EraseabortedR = crate::BitReader;
pub type PcrunningR = crate::BitReader;
impl R {
#[inline(always)]
pub fn busy(&self) -> BusyR {
BusyR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn locked(&self) -> LockedR {
LockedR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn invaddr(&self) -> InvaddrR {
InvaddrR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn wdataready(&self) -> WdatareadyR {
WdatareadyR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn wordtimeout(&self) -> WordtimeoutR {
WordtimeoutR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn eraseaborted(&self) -> EraseabortedR {
EraseabortedR::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn pcrunning(&self) -> PcrunningR {
PcrunningR::new(((self.bits >> 6) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("STATUS")
.field("busy", &self.busy())
.field("locked", &self.locked())
.field("invaddr", &self.invaddr())
.field("wdataready", &self.wdataready())
.field("wordtimeout", &self.wordtimeout())
.field("eraseaborted", &self.eraseaborted())
.field("pcrunning", &self.pcrunning())
.finish()
}
}
pub struct STATUSrs;
impl crate::RegisterSpec for STATUSrs {
type Ux = u32;
}
impl crate::Readable for STATUSrs {}
impl crate::Resettable for STATUSrs {
const RESET_VALUE: u32 = 0x08;
}