pub type R = crate::R<DMAMFBOCRrs>;
pub type W = crate::W<DMAMFBOCRrs>;
pub type MFC_R = crate::FieldReader<u16>;
pub type MFC_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
pub type OMFC_R = crate::BitReader;
pub type OMFC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MFA_R = crate::FieldReader<u16>;
pub type MFA_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
pub type OFOC_R = crate::BitReader;
pub type OFOC_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn mfc(&self) -> MFC_R {
MFC_R::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn omfc(&self) -> OMFC_R {
OMFC_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn mfa(&self) -> MFA_R {
MFA_R::new(((self.bits >> 17) & 0x07ff) as u16)
}
#[inline(always)]
pub fn ofoc(&self) -> OFOC_R {
OFOC_R::new(((self.bits >> 28) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DMAMFBOCR")
.field("mfc", &self.mfc())
.field("omfc", &self.omfc())
.field("mfa", &self.mfa())
.field("ofoc", &self.ofoc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn mfc(&mut self) -> MFC_W<DMAMFBOCRrs> {
MFC_W::new(self, 0)
}
#[inline(always)]
pub fn omfc(&mut self) -> OMFC_W<DMAMFBOCRrs> {
OMFC_W::new(self, 16)
}
#[inline(always)]
pub fn mfa(&mut self) -> MFA_W<DMAMFBOCRrs> {
MFA_W::new(self, 17)
}
#[inline(always)]
pub fn ofoc(&mut self) -> OFOC_W<DMAMFBOCRrs> {
OFOC_W::new(self, 28)
}
}
pub struct DMAMFBOCRrs;
impl crate::RegisterSpec for DMAMFBOCRrs {
type Ux = u32;
}
impl crate::Readable for DMAMFBOCRrs {}
impl crate::Writable for DMAMFBOCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DMAMFBOCRrs {}