pub type R = crate::R<MACMIIARrs>;
pub type W = crate::W<MACMIIARrs>;
pub type MB_R = crate::BitReader;
pub type MB_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MW_R = crate::BitReader;
pub type MW_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CR_R = crate::FieldReader;
pub type CR_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type MR_R = crate::FieldReader;
pub type MR_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type PA_R = crate::FieldReader;
pub type PA_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn mb(&self) -> MB_R {
MB_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn mw(&self) -> MW_R {
MW_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn cr(&self) -> CR_R {
CR_R::new(((self.bits >> 2) & 7) as u8)
}
#[inline(always)]
pub fn mr(&self) -> MR_R {
MR_R::new(((self.bits >> 6) & 0x1f) as u8)
}
#[inline(always)]
pub fn pa(&self) -> PA_R {
PA_R::new(((self.bits >> 11) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACMIIAR")
.field("mb", &self.mb())
.field("mw", &self.mw())
.field("cr", &self.cr())
.field("mr", &self.mr())
.field("pa", &self.pa())
.finish()
}
}
impl W {
#[inline(always)]
pub fn mb(&mut self) -> MB_W<MACMIIARrs> {
MB_W::new(self, 0)
}
#[inline(always)]
pub fn mw(&mut self) -> MW_W<MACMIIARrs> {
MW_W::new(self, 1)
}
#[inline(always)]
pub fn cr(&mut self) -> CR_W<MACMIIARrs> {
CR_W::new(self, 2)
}
#[inline(always)]
pub fn mr(&mut self) -> MR_W<MACMIIARrs> {
MR_W::new(self, 6)
}
#[inline(always)]
pub fn pa(&mut self) -> PA_W<MACMIIARrs> {
PA_W::new(self, 11)
}
}
pub struct MACMIIARrs;
impl crate::RegisterSpec for MACMIIARrs {
type Ux = u32;
}
impl crate::Readable for MACMIIARrs {}
impl crate::Writable for MACMIIARrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACMIIARrs {}