pub type R = crate::R<MMC_CONTROLrs>;
pub type W = crate::W<MMC_CONTROLrs>;
pub type CNTRST_R = crate::BitReader;
pub type CNTRST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CNTSTOPRO_R = crate::BitReader;
pub type CNTSTOPRO_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RSTONRD_R = crate::BitReader;
pub type RSTONRD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CNTFREEZ_R = crate::BitReader;
pub type CNTFREEZ_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CNTPRST_R = crate::BitReader;
pub type CNTPRST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CNTPRSTLVL_R = crate::BitReader;
pub type CNTPRSTLVL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type UCDBC_R = crate::BitReader;
pub type UCDBC_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn cntrst(&self) -> CNTRST_R {
CNTRST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn cntstopro(&self) -> CNTSTOPRO_R {
CNTSTOPRO_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn rstonrd(&self) -> RSTONRD_R {
RSTONRD_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cntfreez(&self) -> CNTFREEZ_R {
CNTFREEZ_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn cntprst(&self) -> CNTPRST_R {
CNTPRST_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn cntprstlvl(&self) -> CNTPRSTLVL_R {
CNTPRSTLVL_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn ucdbc(&self) -> UCDBC_R {
UCDBC_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MMC_CONTROL")
.field("cntrst", &self.cntrst())
.field("cntstopro", &self.cntstopro())
.field("rstonrd", &self.rstonrd())
.field("cntfreez", &self.cntfreez())
.field("cntprst", &self.cntprst())
.field("cntprstlvl", &self.cntprstlvl())
.field("ucdbc", &self.ucdbc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cntrst(&mut self) -> CNTRST_W<MMC_CONTROLrs> {
CNTRST_W::new(self, 0)
}
#[inline(always)]
pub fn cntstopro(&mut self) -> CNTSTOPRO_W<MMC_CONTROLrs> {
CNTSTOPRO_W::new(self, 1)
}
#[inline(always)]
pub fn rstonrd(&mut self) -> RSTONRD_W<MMC_CONTROLrs> {
RSTONRD_W::new(self, 2)
}
#[inline(always)]
pub fn cntfreez(&mut self) -> CNTFREEZ_W<MMC_CONTROLrs> {
CNTFREEZ_W::new(self, 3)
}
#[inline(always)]
pub fn cntprst(&mut self) -> CNTPRST_W<MMC_CONTROLrs> {
CNTPRST_W::new(self, 4)
}
#[inline(always)]
pub fn cntprstlvl(&mut self) -> CNTPRSTLVL_W<MMC_CONTROLrs> {
CNTPRSTLVL_W::new(self, 5)
}
#[inline(always)]
pub fn ucdbc(&mut self) -> UCDBC_W<MMC_CONTROLrs> {
UCDBC_W::new(self, 8)
}
}
pub struct MMC_CONTROLrs;
impl crate::RegisterSpec for MMC_CONTROLrs {
type Ux = u32;
}
impl crate::Readable for MMC_CONTROLrs {}
impl crate::Writable for MMC_CONTROLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MMC_CONTROLrs {}