pub type R = crate::R<STATUSrs>;
pub type AnybusyR = crate::BitReader;
pub type AnyreqR = crate::BitReader;
pub type ChgrantR = crate::FieldReader;
pub type CherrorR = crate::FieldReader;
pub type FifolevelR = crate::FieldReader;
pub type ChnumR = crate::FieldReader;
impl R {
#[inline(always)]
pub fn anybusy(&self) -> AnybusyR {
AnybusyR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn anyreq(&self) -> AnyreqR {
AnyreqR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn chgrant(&self) -> ChgrantR {
ChgrantR::new(((self.bits >> 3) & 7) as u8)
}
#[inline(always)]
pub fn cherror(&self) -> CherrorR {
CherrorR::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn fifolevel(&self) -> FifolevelR {
FifolevelR::new(((self.bits >> 16) & 0x1f) as u8)
}
#[inline(always)]
pub fn chnum(&self) -> ChnumR {
ChnumR::new(((self.bits >> 24) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("STATUS")
.field("anybusy", &self.anybusy())
.field("anyreq", &self.anyreq())
.field("chgrant", &self.chgrant())
.field("cherror", &self.cherror())
.field("fifolevel", &self.fifolevel())
.field("chnum", &self.chnum())
.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 = 0x0810_0000;
}