pub type R = crate::R<M2CRrs>;
pub type W = crate::W<M2CRrs>;
pub type ECCSEIE_R = crate::BitReader;
pub type ECCSEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCDEIE_R = crate::BitReader;
pub type ECCDEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCDEBWIE_R = crate::BitReader;
pub type ECCDEBWIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCELEN_R = crate::BitReader;
pub type ECCELEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCSECEN_R = crate::BitReader;
pub type ECCSECEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCDECEN_R = crate::BitReader;
pub type ECCDECEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCDEBWCEN_R = crate::BitReader;
pub type ECCDEBWCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCTEA_R = crate::FieldReader;
pub type ECCTEA_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn eccseie(&self) -> ECCSEIE_R {
ECCSEIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eccdeie(&self) -> ECCDEIE_R {
ECCDEIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn eccdebwie(&self) -> ECCDEBWIE_R {
ECCDEBWIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn eccelen(&self) -> ECCELEN_R {
ECCELEN_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn eccsecen(&self) -> ECCSECEN_R {
ECCSECEN_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn eccdecen(&self) -> ECCDECEN_R {
ECCDECEN_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn eccdebwcen(&self) -> ECCDEBWCEN_R {
ECCDEBWCEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ecctea(&self) -> ECCTEA_R {
ECCTEA_R::new(((self.bits >> 16) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("M2CR")
.field("eccseie", &self.eccseie())
.field("eccdeie", &self.eccdeie())
.field("eccdebwie", &self.eccdebwie())
.field("eccelen", &self.eccelen())
.field("eccsecen", &self.eccsecen())
.field("eccdecen", &self.eccdecen())
.field("eccdebwcen", &self.eccdebwcen())
.field("ecctea", &self.ecctea())
.finish()
}
}
impl W {
#[inline(always)]
pub fn eccseie(&mut self) -> ECCSEIE_W<M2CRrs> {
ECCSEIE_W::new(self, 2)
}
#[inline(always)]
pub fn eccdeie(&mut self) -> ECCDEIE_W<M2CRrs> {
ECCDEIE_W::new(self, 3)
}
#[inline(always)]
pub fn eccdebwie(&mut self) -> ECCDEBWIE_W<M2CRrs> {
ECCDEBWIE_W::new(self, 4)
}
#[inline(always)]
pub fn eccelen(&mut self) -> ECCELEN_W<M2CRrs> {
ECCELEN_W::new(self, 5)
}
#[inline(always)]
pub fn eccsecen(&mut self) -> ECCSECEN_W<M2CRrs> {
ECCSECEN_W::new(self, 6)
}
#[inline(always)]
pub fn eccdecen(&mut self) -> ECCDECEN_W<M2CRrs> {
ECCDECEN_W::new(self, 7)
}
#[inline(always)]
pub fn eccdebwcen(&mut self) -> ECCDEBWCEN_W<M2CRrs> {
ECCDEBWCEN_W::new(self, 8)
}
#[inline(always)]
pub fn ecctea(&mut self) -> ECCTEA_W<M2CRrs> {
ECCTEA_W::new(self, 16)
}
}
pub struct M2CRrs;
impl crate::RegisterSpec for M2CRrs {
type Ux = u32;
}
impl crate::Readable for M2CRrs {}
impl crate::Writable for M2CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for M2CRrs {}