pub type R = crate::R<MACPCSRrs>;
pub type W = crate::W<MACPCSRrs>;
pub type PWRDWN_R = crate::BitReader;
pub type PWRDWN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MGKPKTEN_R = crate::BitReader;
pub type MGKPKTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RWKPKTEN_R = crate::BitReader;
pub type RWKPKTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MGKPRCVD_R = crate::BitReader;
pub type RWKPRCVD_R = crate::BitReader;
pub type GLBLUCAST_R = crate::BitReader;
pub type GLBLUCAST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RWKPFE_R = crate::BitReader;
pub type RWKPFE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RWKPTR_R = crate::FieldReader;
pub type RWKFILTRST_R = crate::BitReader;
pub type RWKFILTRST_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pwrdwn(&self) -> PWRDWN_R {
PWRDWN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn mgkpkten(&self) -> MGKPKTEN_R {
MGKPKTEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rwkpkten(&self) -> RWKPKTEN_R {
RWKPKTEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn mgkprcvd(&self) -> MGKPRCVD_R {
MGKPRCVD_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn rwkprcvd(&self) -> RWKPRCVD_R {
RWKPRCVD_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn glblucast(&self) -> GLBLUCAST_R {
GLBLUCAST_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn rwkpfe(&self) -> RWKPFE_R {
RWKPFE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rwkptr(&self) -> RWKPTR_R {
RWKPTR_R::new(((self.bits >> 24) & 0x1f) as u8)
}
#[inline(always)]
pub fn rwkfiltrst(&self) -> RWKFILTRST_R {
RWKFILTRST_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("MACPCSR")
.field("pwrdwn", &self.pwrdwn())
.field("mgkpkten", &self.mgkpkten())
.field("rwkpkten", &self.rwkpkten())
.field("mgkprcvd", &self.mgkprcvd())
.field("rwkprcvd", &self.rwkprcvd())
.field("glblucast", &self.glblucast())
.field("rwkpfe", &self.rwkpfe())
.field("rwkptr", &self.rwkptr())
.field("rwkfiltrst", &self.rwkfiltrst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pwrdwn(&mut self) -> PWRDWN_W<MACPCSRrs> {
PWRDWN_W::new(self, 0)
}
#[inline(always)]
pub fn mgkpkten(&mut self) -> MGKPKTEN_W<MACPCSRrs> {
MGKPKTEN_W::new(self, 1)
}
#[inline(always)]
pub fn rwkpkten(&mut self) -> RWKPKTEN_W<MACPCSRrs> {
RWKPKTEN_W::new(self, 2)
}
#[inline(always)]
pub fn glblucast(&mut self) -> GLBLUCAST_W<MACPCSRrs> {
GLBLUCAST_W::new(self, 9)
}
#[inline(always)]
pub fn rwkpfe(&mut self) -> RWKPFE_W<MACPCSRrs> {
RWKPFE_W::new(self, 10)
}
#[inline(always)]
pub fn rwkfiltrst(&mut self) -> RWKFILTRST_W<MACPCSRrs> {
RWKFILTRST_W::new(self, 31)
}
}
pub struct MACPCSRrs;
impl crate::RegisterSpec for MACPCSRrs {
type Ux = u32;
}
impl crate::Readable for MACPCSRrs {}
impl crate::Writable for MACPCSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACPCSRrs {}