pub type R = crate::R<DMACCRrs>;
pub type W = crate::W<DMACCRrs>;
pub type MSS_R = crate::FieldReader<u16>;
pub type MSS_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16>;
pub type PBLX8_R = crate::BitReader;
pub type PBLX8_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DSL_R = crate::FieldReader;
pub type DSL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn mss(&self) -> MSS_R {
MSS_R::new((self.bits & 0x3fff) as u16)
}
#[inline(always)]
pub fn pblx8(&self) -> PBLX8_R {
PBLX8_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn dsl(&self) -> DSL_R {
DSL_R::new(((self.bits >> 18) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMACCR")
.field("dsl", &self.dsl())
.field("pblx8", &self.pblx8())
.field("mss", &self.mss())
.finish()
}
}
impl W {
#[inline(always)]
pub fn mss(&mut self) -> MSS_W<DMACCRrs> {
MSS_W::new(self, 0)
}
#[inline(always)]
pub fn pblx8(&mut self) -> PBLX8_W<DMACCRrs> {
PBLX8_W::new(self, 16)
}
#[inline(always)]
pub fn dsl(&mut self) -> DSL_W<DMACCRrs> {
DSL_W::new(self, 18)
}
}
pub struct DMACCRrs;
impl crate::RegisterSpec for DMACCRrs {
type Ux = u32;
}
impl crate::Readable for DMACCRrs {}
impl crate::Writable for DMACCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMACCRrs {}