///Register `M5ICR` reader
pub type R = crate::R<M5ICRrs>;
///Register `M5ICR` writer
pub type W = crate::W<M5ICRrs>;
///Field `CSEDC` reader - Clear ECC single error detected and corrected
pub type CSEDC_R = crate::BitReader;
///Field `CSEDC` writer - Clear ECC single error detected and corrected
pub type CSEDC_W<'a, REG> = crate::BitWriter<'a, REG>;
///Field `CDED` reader - Clear ECC double error detected
pub type CDED_R = crate::BitReader;
///Field `CDED` writer - Clear ECC double error detected
pub type CDED_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    ///Bit 0 - Clear ECC single error detected and corrected
    #[inline(always)]
    pub fn csedc(&self) -> CSEDC_R {
        CSEDC_R::new((self.bits & 1) != 0)
    }
    ///Bit 1 - Clear ECC double error detected
    #[inline(always)]
    pub fn cded(&self) -> CDED_R {
        CDED_R::new(((self.bits >> 1) & 1) != 0)
    }
}
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("M5ICR")
            .field("csedc", &self.csedc())
            .field("cded", &self.cded())
            .finish()
    }
}
impl W {
    ///Bit 0 - Clear ECC single error detected and corrected
    #[inline(always)]
    pub fn csedc(&mut self) -> CSEDC_W<M5ICRrs> {
        CSEDC_W::new(self, 0)
    }
    ///Bit 1 - Clear ECC double error detected
    #[inline(always)]
    pub fn cded(&mut self) -> CDED_W<M5ICRrs> {
        CDED_W::new(self, 1)
    }
}
/**RAMCFG memory 5 interrupt clear register 5

You can [`read`](crate::Reg::read) this register and get [`m5icr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`m5icr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).*/
pub struct M5ICRrs;
impl crate::RegisterSpec for M5ICRrs {
    type Ux = u32;
}
///`read()` method returns [`m5icr::R`](R) reader structure
impl crate::Readable for M5ICRrs {}
///`write(|w| ..)` method takes [`m5icr::W`](W) writer structure
impl crate::Writable for M5ICRrs {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
///`reset()` method sets M5ICR to value 0
impl crate::Resettable for M5ICRrs {
    const RESET_VALUE: u32 = 0;
}
