pub type R = crate::R<DCTRLrs>;
pub type W = crate::W<DCTRLrs>;
pub type DTEN_R = crate::BitReader;
pub type DTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DTDIR_R = crate::BitReader;
pub type DTDIR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DTMODE_R = crate::FieldReader;
pub type DTMODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type DBLOCKSIZE_R = crate::FieldReader;
pub type DBLOCKSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type RWSTART_R = crate::BitReader;
pub type RWSTART_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RWSTOP_R = crate::BitReader;
pub type RWSTOP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RWMOD_R = crate::BitReader;
pub type RWMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SDIOEN_R = crate::BitReader;
pub type SDIOEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BOOTACKEN_R = crate::BitReader;
pub type BOOTACKEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FIFORST_R = crate::BitReader;
pub type FIFORST_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dten(&self) -> DTEN_R {
DTEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dtdir(&self) -> DTDIR_R {
DTDIR_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn dtmode(&self) -> DTMODE_R {
DTMODE_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn dblocksize(&self) -> DBLOCKSIZE_R {
DBLOCKSIZE_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn rwstart(&self) -> RWSTART_R {
RWSTART_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn rwstop(&self) -> RWSTOP_R {
RWSTOP_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn rwmod(&self) -> RWMOD_R {
RWMOD_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn sdioen(&self) -> SDIOEN_R {
SDIOEN_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn bootacken(&self) -> BOOTACKEN_R {
BOOTACKEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn fiforst(&self) -> FIFORST_R {
FIFORST_R::new(((self.bits >> 13) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DCTRL")
.field("dten", &self.dten())
.field("dtdir", &self.dtdir())
.field("dtmode", &self.dtmode())
.field("dblocksize", &self.dblocksize())
.field("rwstart", &self.rwstart())
.field("rwstop", &self.rwstop())
.field("rwmod", &self.rwmod())
.field("sdioen", &self.sdioen())
.field("bootacken", &self.bootacken())
.field("fiforst", &self.fiforst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dten(&mut self) -> DTEN_W<DCTRLrs> {
DTEN_W::new(self, 0)
}
#[inline(always)]
pub fn dtdir(&mut self) -> DTDIR_W<DCTRLrs> {
DTDIR_W::new(self, 1)
}
#[inline(always)]
pub fn dtmode(&mut self) -> DTMODE_W<DCTRLrs> {
DTMODE_W::new(self, 2)
}
#[inline(always)]
pub fn dblocksize(&mut self) -> DBLOCKSIZE_W<DCTRLrs> {
DBLOCKSIZE_W::new(self, 4)
}
#[inline(always)]
pub fn rwstart(&mut self) -> RWSTART_W<DCTRLrs> {
RWSTART_W::new(self, 8)
}
#[inline(always)]
pub fn rwstop(&mut self) -> RWSTOP_W<DCTRLrs> {
RWSTOP_W::new(self, 9)
}
#[inline(always)]
pub fn rwmod(&mut self) -> RWMOD_W<DCTRLrs> {
RWMOD_W::new(self, 10)
}
#[inline(always)]
pub fn sdioen(&mut self) -> SDIOEN_W<DCTRLrs> {
SDIOEN_W::new(self, 11)
}
#[inline(always)]
pub fn bootacken(&mut self) -> BOOTACKEN_W<DCTRLrs> {
BOOTACKEN_W::new(self, 12)
}
#[inline(always)]
pub fn fiforst(&mut self) -> FIFORST_W<DCTRLrs> {
FIFORST_W::new(self, 13)
}
}
pub struct DCTRLrs;
impl crate::RegisterSpec for DCTRLrs {
type Ux = u32;
}
impl crate::Readable for DCTRLrs {}
impl crate::Writable for DCTRLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DCTRLrs {}