pub type R = crate::R<MACPMTCSRrs>;
pub type W = crate::W<MACPMTCSRrs>;
pub type PD_R = crate::BitReader;
pub type PD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MPE_R = crate::BitReader;
pub type MPE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WFE_R = crate::BitReader;
pub type WFE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MPR_R = crate::BitReader;
pub type MPR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WFR_R = crate::BitReader;
pub type WFR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GU_R = crate::BitReader;
pub type GU_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WFFRPR_R = crate::BitReader;
pub type WFFRPR_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pd(&self) -> PD_R {
PD_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn mpe(&self) -> MPE_R {
MPE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn wfe(&self) -> WFE_R {
WFE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn mpr(&self) -> MPR_R {
MPR_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn wfr(&self) -> WFR_R {
WFR_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn gu(&self) -> GU_R {
GU_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn wffrpr(&self) -> WFFRPR_R {
WFFRPR_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACPMTCSR")
.field("pd", &self.pd())
.field("mpe", &self.mpe())
.field("wfe", &self.wfe())
.field("mpr", &self.mpr())
.field("wfr", &self.wfr())
.field("gu", &self.gu())
.field("wffrpr", &self.wffrpr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pd(&mut self) -> PD_W<MACPMTCSRrs> {
PD_W::new(self, 0)
}
#[inline(always)]
pub fn mpe(&mut self) -> MPE_W<MACPMTCSRrs> {
MPE_W::new(self, 1)
}
#[inline(always)]
pub fn wfe(&mut self) -> WFE_W<MACPMTCSRrs> {
WFE_W::new(self, 2)
}
#[inline(always)]
pub fn mpr(&mut self) -> MPR_W<MACPMTCSRrs> {
MPR_W::new(self, 5)
}
#[inline(always)]
pub fn wfr(&mut self) -> WFR_W<MACPMTCSRrs> {
WFR_W::new(self, 6)
}
#[inline(always)]
pub fn gu(&mut self) -> GU_W<MACPMTCSRrs> {
GU_W::new(self, 9)
}
#[inline(always)]
pub fn wffrpr(&mut self) -> WFFRPR_W<MACPMTCSRrs> {
WFFRPR_W::new(self, 31)
}
}
pub struct MACPMTCSRrs;
impl crate::RegisterSpec for MACPMTCSRrs {
type Ux = u32;
}
impl crate::Readable for MACPMTCSRrs {}
impl crate::Writable for MACPMTCSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACPMTCSRrs {}