pub type R = crate::R<MACPHYCSRrs>;
pub type W = crate::W<MACPHYCSRrs>;
pub type TC_R = crate::BitReader;
pub type TC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LUD_R = crate::BitReader;
pub type LUD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LNKMOD_R = crate::BitReader;
pub type LNKSPEED_R = crate::FieldReader;
pub type LNKSTS_R = crate::BitReader;
pub type JABTO_R = crate::BitReader;
pub type FALSCARDET_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn tc(&self) -> TC_R {
TC_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lud(&self) -> LUD_R {
LUD_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn lnkmod(&self) -> LNKMOD_R {
LNKMOD_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn lnkspeed(&self) -> LNKSPEED_R {
LNKSPEED_R::new(((self.bits >> 17) & 3) as u8)
}
#[inline(always)]
pub fn lnksts(&self) -> LNKSTS_R {
LNKSTS_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn jabto(&self) -> JABTO_R {
JABTO_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn falscardet(&self) -> FALSCARDET_R {
FALSCARDET_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACPHYCSR")
.field("tc", &self.tc())
.field("lud", &self.lud())
.field("lnkmod", &self.lnkmod())
.field("lnkspeed", &self.lnkspeed())
.field("lnksts", &self.lnksts())
.field("jabto", &self.jabto())
.field("falscardet", &self.falscardet())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tc(&mut self) -> TC_W<MACPHYCSRrs> {
TC_W::new(self, 0)
}
#[inline(always)]
pub fn lud(&mut self) -> LUD_W<MACPHYCSRrs> {
LUD_W::new(self, 1)
}
}
pub struct MACPHYCSRrs;
impl crate::RegisterSpec for MACPHYCSRrs {
type Ux = u32;
}
impl crate::Readable for MACPHYCSRrs {}
impl crate::Writable for MACPHYCSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACPHYCSRrs {}