pub type R = crate::R<MTLRX_QMPOCRrs>;
pub type W = crate::W<MTLRX_QMPOCRrs>;
pub type OVFPKTCNT_R = crate::FieldReader<u16>;
pub type OVFPKTCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
pub type OVFCNTOVF_R = crate::BitReader;
pub type OVFCNTOVF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MISPKTCNT_R = crate::FieldReader<u16>;
pub type MISPKTCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
pub type MISCNTOVF_R = crate::BitReader;
pub type MISCNTOVF_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ovfpktcnt(&self) -> OVFPKTCNT_R {
OVFPKTCNT_R::new((self.bits & 0x07ff) as u16)
}
#[inline(always)]
pub fn ovfcntovf(&self) -> OVFCNTOVF_R {
OVFCNTOVF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn mispktcnt(&self) -> MISPKTCNT_R {
MISPKTCNT_R::new(((self.bits >> 16) & 0x07ff) as u16)
}
#[inline(always)]
pub fn miscntovf(&self) -> MISCNTOVF_R {
MISCNTOVF_R::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MTLRxQMPOCR")
.field("miscntovf", &self.miscntovf())
.field("mispktcnt", &self.mispktcnt())
.field("ovfcntovf", &self.ovfcntovf())
.field("ovfpktcnt", &self.ovfpktcnt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ovfpktcnt(&mut self) -> OVFPKTCNT_W<MTLRX_QMPOCRrs> {
OVFPKTCNT_W::new(self, 0)
}
#[inline(always)]
pub fn ovfcntovf(&mut self) -> OVFCNTOVF_W<MTLRX_QMPOCRrs> {
OVFCNTOVF_W::new(self, 11)
}
#[inline(always)]
pub fn mispktcnt(&mut self) -> MISPKTCNT_W<MTLRX_QMPOCRrs> {
MISPKTCNT_W::new(self, 16)
}
#[inline(always)]
pub fn miscntovf(&mut self) -> MISCNTOVF_W<MTLRX_QMPOCRrs> {
MISCNTOVF_W::new(self, 27)
}
}
pub struct MTLRX_QMPOCRrs;
impl crate::RegisterSpec for MTLRX_QMPOCRrs {
type Ux = u32;
}
impl crate::Readable for MTLRX_QMPOCRrs {}
impl crate::Writable for MTLRX_QMPOCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MTLRX_QMPOCRrs {}