pub type R = crate::R<PDMCRrs>;
pub type W = crate::W<PDMCRrs>;
pub type PDMEN_R = crate::BitReader;
pub type PDMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MICNBR_R = crate::FieldReader;
pub type MICNBR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type CKEN1_R = crate::BitReader;
pub type CKEN1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CKEN2_R = crate::BitReader;
pub type CKEN2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CKEN3_R = crate::BitReader;
pub type CKEN3_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CKEN4_R = crate::BitReader;
pub type CKEN4_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pdmen(&self) -> PDMEN_R {
PDMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn micnbr(&self) -> MICNBR_R {
MICNBR_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn cken1(&self) -> CKEN1_R {
CKEN1_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn cken2(&self) -> CKEN2_R {
CKEN2_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn cken3(&self) -> CKEN3_R {
CKEN3_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn cken4(&self) -> CKEN4_R {
CKEN4_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PDMCR")
.field("pdmen", &self.pdmen())
.field("micnbr", &self.micnbr())
.field("cken1", &self.cken1())
.field("cken2", &self.cken2())
.field("cken3", &self.cken3())
.field("cken4", &self.cken4())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pdmen(&mut self) -> PDMEN_W<PDMCRrs> {
PDMEN_W::new(self, 0)
}
#[inline(always)]
pub fn micnbr(&mut self) -> MICNBR_W<PDMCRrs> {
MICNBR_W::new(self, 4)
}
#[inline(always)]
pub fn cken1(&mut self) -> CKEN1_W<PDMCRrs> {
CKEN1_W::new(self, 8)
}
#[inline(always)]
pub fn cken2(&mut self) -> CKEN2_W<PDMCRrs> {
CKEN2_W::new(self, 9)
}
#[inline(always)]
pub fn cken3(&mut self) -> CKEN3_W<PDMCRrs> {
CKEN3_W::new(self, 10)
}
#[inline(always)]
pub fn cken4(&mut self) -> CKEN4_W<PDMCRrs> {
CKEN4_W::new(self, 11)
}
}
pub struct PDMCRrs;
impl crate::RegisterSpec for PDMCRrs {
type Ux = u32;
}
impl crate::Readable for PDMCRrs {}
impl crate::Writable for PDMCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PDMCRrs {}