pub type R = crate::R<DMACTX_CRrs>;
pub type W = crate::W<DMACTX_CRrs>;
pub type ST_R = crate::BitReader;
pub type ST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OSF_R = crate::BitReader;
pub type OSF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TSE_R = crate::BitReader;
pub type TSE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TXPBL_R = crate::FieldReader;
pub type TXPBL_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
impl R {
#[inline(always)]
pub fn st(&self) -> ST_R {
ST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn osf(&self) -> OSF_R {
OSF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn tse(&self) -> TSE_R {
TSE_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn txpbl(&self) -> TXPBL_R {
TXPBL_R::new(((self.bits >> 16) & 0x3f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMACTxCR")
.field("txpbl", &self.txpbl())
.field("tse", &self.tse())
.field("osf", &self.osf())
.field("st", &self.st())
.finish()
}
}
impl W {
#[inline(always)]
pub fn st(&mut self) -> ST_W<DMACTX_CRrs> {
ST_W::new(self, 0)
}
#[inline(always)]
pub fn osf(&mut self) -> OSF_W<DMACTX_CRrs> {
OSF_W::new(self, 4)
}
#[inline(always)]
pub fn tse(&mut self) -> TSE_W<DMACTX_CRrs> {
TSE_W::new(self, 12)
}
#[inline(always)]
pub fn txpbl(&mut self) -> TXPBL_W<DMACTX_CRrs> {
TXPBL_W::new(self, 16)
}
}
pub struct DMACTX_CRrs;
impl crate::RegisterSpec for DMACTX_CRrs {
type Ux = u32;
}
impl crate::Readable for DMACTX_CRrs {}
impl crate::Writable for DMACTX_CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMACTX_CRrs {}