pub type R = crate::R<DMACRrs>;
pub type W = crate::W<DMACRrs>;
pub type DIEN_R = crate::BitReader;
pub type DIEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DOEN_R = crate::BitReader;
pub type DOEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dien(&self) -> DIEN_R {
DIEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn doen(&self) -> DOEN_R {
DOEN_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("DMACR")
.field("doen", &self.doen())
.field("dien", &self.dien())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dien(&mut self) -> DIEN_W<DMACRrs> {
DIEN_W::new(self, 0)
}
#[inline(always)]
pub fn doen(&mut self) -> DOEN_W<DMACRrs> {
DOEN_W::new(self, 1)
}
}
pub struct DMACRrs;
impl crate::RegisterSpec for DMACRrs {
type Ux = u32;
}
impl crate::Readable for DMACRrs {}
impl crate::Writable for DMACRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMACRrs {}