pub type R = crate::R<MACECRrs>;
pub type W = crate::W<MACECRrs>;
pub type GPSL_R = crate::FieldReader<u16>;
pub type GPSL_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16>;
pub type DCRCC_R = crate::BitReader;
pub type DCRCC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPEN_R = crate::BitReader;
pub type SPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type USP_R = crate::BitReader;
pub type USP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EIPGEN_R = crate::BitReader;
pub type EIPGEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EIPG_R = crate::FieldReader;
pub type EIPG_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
impl R {
#[inline(always)]
pub fn gpsl(&self) -> GPSL_R {
GPSL_R::new((self.bits & 0x3fff) as u16)
}
#[inline(always)]
pub fn dcrcc(&self) -> DCRCC_R {
DCRCC_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn spen(&self) -> SPEN_R {
SPEN_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn usp(&self) -> USP_R {
USP_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn eipgen(&self) -> EIPGEN_R {
EIPGEN_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn eipg(&self) -> EIPG_R {
EIPG_R::new(((self.bits >> 25) & 0x1f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACECR")
.field("gpsl", &self.gpsl())
.field("dcrcc", &self.dcrcc())
.field("spen", &self.spen())
.field("usp", &self.usp())
.field("eipgen", &self.eipgen())
.field("eipg", &self.eipg())
.finish()
}
}
impl W {
#[inline(always)]
pub fn gpsl(&mut self) -> GPSL_W<MACECRrs> {
GPSL_W::new(self, 0)
}
#[inline(always)]
pub fn dcrcc(&mut self) -> DCRCC_W<MACECRrs> {
DCRCC_W::new(self, 16)
}
#[inline(always)]
pub fn spen(&mut self) -> SPEN_W<MACECRrs> {
SPEN_W::new(self, 17)
}
#[inline(always)]
pub fn usp(&mut self) -> USP_W<MACECRrs> {
USP_W::new(self, 18)
}
#[inline(always)]
pub fn eipgen(&mut self) -> EIPGEN_W<MACECRrs> {
EIPGEN_W::new(self, 24)
}
#[inline(always)]
pub fn eipg(&mut self) -> EIPG_W<MACECRrs> {
EIPG_W::new(self, 25)
}
}
pub struct MACECRrs;
impl crate::RegisterSpec for MACECRrs {
type Ux = u32;
}
impl crate::Readable for MACECRrs {}
impl crate::Writable for MACECRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACECRrs {}