pub type R = crate::R<DMACRX_CRrs>;
pub type W = crate::W<DMACRX_CRrs>;
pub type SR_R = crate::BitReader;
pub type SR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RBSZ_R = crate::FieldReader<u16>;
pub type RBSZ_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16>;
pub type RXPBL_R = crate::FieldReader;
pub type RXPBL_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type RPF_R = crate::BitReader;
pub type RPF_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn sr(&self) -> SR_R {
SR_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn rbsz(&self) -> RBSZ_R {
RBSZ_R::new(((self.bits >> 1) & 0x3fff) as u16)
}
#[inline(always)]
pub fn rxpbl(&self) -> RXPBL_R {
RXPBL_R::new(((self.bits >> 16) & 0x3f) as u8)
}
#[inline(always)]
pub fn rpf(&self) -> RPF_R {
RPF_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMACRxCR")
.field("sr", &self.sr())
.field("rbsz", &self.rbsz())
.field("rxpbl", &self.rxpbl())
.field("rpf", &self.rpf())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sr(&mut self) -> SR_W<DMACRX_CRrs> {
SR_W::new(self, 0)
}
#[inline(always)]
pub fn rbsz(&mut self) -> RBSZ_W<DMACRX_CRrs> {
RBSZ_W::new(self, 1)
}
#[inline(always)]
pub fn rxpbl(&mut self) -> RXPBL_W<DMACRX_CRrs> {
RXPBL_W::new(self, 16)
}
#[inline(always)]
pub fn rpf(&mut self) -> RPF_W<DMACRX_CRrs> {
RPF_W::new(self, 31)
}
}
pub struct DMACRX_CRrs;
impl crate::RegisterSpec for DMACRX_CRrs {
type Ux = u32;
}
impl crate::Readable for DMACRX_CRrs {}
impl crate::Writable for DMACRX_CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMACRX_CRrs {}