pub type R = crate::R<ECCRrs>;
pub type W = crate::W<ECCRrs>;
pub type ADDR_ECC_R = crate::FieldReader<u32>;
pub type BK_ECC_R = crate::BitReader;
pub type SYSF_ECC_R = crate::BitReader;
pub type ECCIE_R = crate::BitReader;
pub type ECCIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCC_R = crate::BitReader;
pub type ECCC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ECCD_R = crate::BitReader;
pub type ECCD_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn addr_ecc(&self) -> ADDR_ECC_R {
ADDR_ECC_R::new(self.bits & 0x0007_ffff)
}
#[inline(always)]
pub fn bk_ecc(&self) -> BK_ECC_R {
BK_ECC_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn sysf_ecc(&self) -> SYSF_ECC_R {
SYSF_ECC_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn eccie(&self) -> ECCIE_R {
ECCIE_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn eccc(&self) -> ECCC_R {
ECCC_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn eccd(&self) -> ECCD_R {
ECCD_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("ECCR")
.field("addr_ecc", &self.addr_ecc())
.field("bk_ecc", &self.bk_ecc())
.field("sysf_ecc", &self.sysf_ecc())
.field("eccie", &self.eccie())
.field("eccc", &self.eccc())
.field("eccd", &self.eccd())
.finish()
}
}
impl W {
#[inline(always)]
pub fn eccie(&mut self) -> ECCIE_W<ECCRrs> {
ECCIE_W::new(self, 24)
}
#[inline(always)]
pub fn eccc(&mut self) -> ECCC_W<ECCRrs> {
ECCC_W::new(self, 30)
}
#[inline(always)]
pub fn eccd(&mut self) -> ECCD_W<ECCRrs> {
ECCD_W::new(self, 31)
}
}
pub struct ECCRrs;
impl crate::RegisterSpec for ECCRrs {
type Ux = u32;
}
impl crate::Readable for ECCRrs {}
impl crate::Writable for ECCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ECCRrs {}