pub type R = crate::R<CMDRrs>;
pub type W = crate::W<CMDRrs>;
pub type CMDINDEX_R = crate::FieldReader;
pub type CMDINDEX_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type CMDTRANS_R = crate::BitReader;
pub type CMDTRANS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CMDSTOP_R = crate::BitReader;
pub type CMDSTOP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WAITRESP_R = crate::FieldReader;
pub type WAITRESP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type WAITINT_R = crate::BitReader;
pub type WAITINT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WAITPEND_R = crate::BitReader;
pub type WAITPEND_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CPSMEN_R = crate::BitReader;
pub type CPSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DTHOLD_R = crate::BitReader;
pub type DTHOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BOOTMODE_R = crate::BitReader;
pub type BOOTMODE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BOOTEN_R = crate::BitReader;
pub type BOOTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CMDSUSPEND_R = crate::BitReader;
pub type CMDSUSPEND_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn cmdindex(&self) -> CMDINDEX_R {
CMDINDEX_R::new((self.bits & 0x3f) as u8)
}
#[inline(always)]
pub fn cmdtrans(&self) -> CMDTRANS_R {
CMDTRANS_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn cmdstop(&self) -> CMDSTOP_R {
CMDSTOP_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn waitresp(&self) -> WAITRESP_R {
WAITRESP_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn waitint(&self) -> WAITINT_R {
WAITINT_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn waitpend(&self) -> WAITPEND_R {
WAITPEND_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn cpsmen(&self) -> CPSMEN_R {
CPSMEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn dthold(&self) -> DTHOLD_R {
DTHOLD_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn bootmode(&self) -> BOOTMODE_R {
BOOTMODE_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn booten(&self) -> BOOTEN_R {
BOOTEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn cmdsuspend(&self) -> CMDSUSPEND_R {
CMDSUSPEND_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CMDR")
.field("cmdindex", &self.cmdindex())
.field("cmdtrans", &self.cmdtrans())
.field("cmdstop", &self.cmdstop())
.field("waitresp", &self.waitresp())
.field("waitint", &self.waitint())
.field("waitpend", &self.waitpend())
.field("cpsmen", &self.cpsmen())
.field("dthold", &self.dthold())
.field("bootmode", &self.bootmode())
.field("booten", &self.booten())
.field("cmdsuspend", &self.cmdsuspend())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cmdindex(&mut self) -> CMDINDEX_W<CMDRrs> {
CMDINDEX_W::new(self, 0)
}
#[inline(always)]
pub fn cmdtrans(&mut self) -> CMDTRANS_W<CMDRrs> {
CMDTRANS_W::new(self, 6)
}
#[inline(always)]
pub fn cmdstop(&mut self) -> CMDSTOP_W<CMDRrs> {
CMDSTOP_W::new(self, 7)
}
#[inline(always)]
pub fn waitresp(&mut self) -> WAITRESP_W<CMDRrs> {
WAITRESP_W::new(self, 8)
}
#[inline(always)]
pub fn waitint(&mut self) -> WAITINT_W<CMDRrs> {
WAITINT_W::new(self, 10)
}
#[inline(always)]
pub fn waitpend(&mut self) -> WAITPEND_W<CMDRrs> {
WAITPEND_W::new(self, 11)
}
#[inline(always)]
pub fn cpsmen(&mut self) -> CPSMEN_W<CMDRrs> {
CPSMEN_W::new(self, 12)
}
#[inline(always)]
pub fn dthold(&mut self) -> DTHOLD_W<CMDRrs> {
DTHOLD_W::new(self, 13)
}
#[inline(always)]
pub fn bootmode(&mut self) -> BOOTMODE_W<CMDRrs> {
BOOTMODE_W::new(self, 14)
}
#[inline(always)]
pub fn booten(&mut self) -> BOOTEN_W<CMDRrs> {
BOOTEN_W::new(self, 15)
}
#[inline(always)]
pub fn cmdsuspend(&mut self) -> CMDSUSPEND_W<CMDRrs> {
CMDSUSPEND_W::new(self, 16)
}
}
pub struct CMDRrs;
impl crate::RegisterSpec for CMDRrs {
type Ux = u32;
}
impl crate::Readable for CMDRrs {}
impl crate::Writable for CMDRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CMDRrs {}