pub type R = crate::R<MACPOCRrs>;
pub type W = crate::W<MACPOCRrs>;
pub type PTOEN_R = crate::BitReader;
pub type PTOEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ASYNCEN_R = crate::BitReader;
pub type ASYNCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type APDREQEN_R = crate::BitReader;
pub type APDREQEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ASYNCTRIG_R = crate::BitReader;
pub type ASYNCTRIG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type APDREQTRIG_R = crate::BitReader;
pub type APDREQTRIG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DRRDIS_R = crate::BitReader;
pub type DRRDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DN_R = crate::FieldReader;
pub type DN_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn ptoen(&self) -> PTOEN_R {
PTOEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn asyncen(&self) -> ASYNCEN_R {
ASYNCEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn apdreqen(&self) -> APDREQEN_R {
APDREQEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn asynctrig(&self) -> ASYNCTRIG_R {
ASYNCTRIG_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn apdreqtrig(&self) -> APDREQTRIG_R {
APDREQTRIG_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn drrdis(&self) -> DRRDIS_R {
DRRDIS_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn dn(&self) -> DN_R {
DN_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACPOCR")
.field("ptoen", &self.ptoen())
.field("asyncen", &self.asyncen())
.field("apdreqen", &self.apdreqen())
.field("asynctrig", &self.asynctrig())
.field("apdreqtrig", &self.apdreqtrig())
.field("drrdis", &self.drrdis())
.field("dn", &self.dn())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ptoen(&mut self) -> PTOEN_W<MACPOCRrs> {
PTOEN_W::new(self, 0)
}
#[inline(always)]
pub fn asyncen(&mut self) -> ASYNCEN_W<MACPOCRrs> {
ASYNCEN_W::new(self, 1)
}
#[inline(always)]
pub fn apdreqen(&mut self) -> APDREQEN_W<MACPOCRrs> {
APDREQEN_W::new(self, 2)
}
#[inline(always)]
pub fn asynctrig(&mut self) -> ASYNCTRIG_W<MACPOCRrs> {
ASYNCTRIG_W::new(self, 4)
}
#[inline(always)]
pub fn apdreqtrig(&mut self) -> APDREQTRIG_W<MACPOCRrs> {
APDREQTRIG_W::new(self, 5)
}
#[inline(always)]
pub fn drrdis(&mut self) -> DRRDIS_W<MACPOCRrs> {
DRRDIS_W::new(self, 6)
}
#[inline(always)]
pub fn dn(&mut self) -> DN_W<MACPOCRrs> {
DN_W::new(self, 8)
}
}
pub struct MACPOCRrs;
impl crate::RegisterSpec for MACPOCRrs {
type Ux = u32;
}
impl crate::Readable for MACPOCRrs {}
impl crate::Writable for MACPOCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACPOCRrs {}