pub type R = crate::R<DMAMRrs>;
pub type W = crate::W<DMAMRrs>;
pub type SWR_R = crate::BitReader;
pub type SWR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DA_R = crate::BitReader;
pub type DA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXPR_R = crate::BitReader;
pub type TXPR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PR_R = crate::FieldReader;
pub type PR_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type INTM_R = crate::FieldReader;
pub type INTM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn swr(&self) -> SWR_R {
SWR_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn da(&self) -> DA_R {
DA_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn txpr(&self) -> TXPR_R {
TXPR_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn pr(&self) -> PR_R {
PR_R::new(((self.bits >> 12) & 7) as u8)
}
#[inline(always)]
pub fn intm(&self) -> INTM_R {
INTM_R::new(((self.bits >> 16) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMAMR")
.field("swr", &self.swr())
.field("da", &self.da())
.field("txpr", &self.txpr())
.field("pr", &self.pr())
.field("intm", &self.intm())
.finish()
}
}
impl W {
#[inline(always)]
pub fn swr(&mut self) -> SWR_W<DMAMRrs> {
SWR_W::new(self, 0)
}
#[inline(always)]
pub fn da(&mut self) -> DA_W<DMAMRrs> {
DA_W::new(self, 1)
}
#[inline(always)]
pub fn txpr(&mut self) -> TXPR_W<DMAMRrs> {
TXPR_W::new(self, 11)
}
#[inline(always)]
pub fn pr(&mut self) -> PR_W<DMAMRrs> {
PR_W::new(self, 12)
}
#[inline(always)]
pub fn intm(&mut self) -> INTM_W<DMAMRrs> {
INTM_W::new(self, 16)
}
}
pub struct DMAMRrs;
impl crate::RegisterSpec for DMAMRrs {
type Ux = u32;
}
impl crate::Readable for DMAMRrs {}
impl crate::Writable for DMAMRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMAMRrs {}