pub type R = crate::R<EMR2rs>;
pub type W = crate::W<EMR2rs>;
pub type EM32_R = crate::BitReader;
pub type EM32_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM33_R = crate::BitReader;
pub type EM33_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM34_R = crate::BitReader;
pub type EM34_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM35_R = crate::BitReader;
pub type EM35_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM36_R = crate::BitReader;
pub type EM36_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM37_R = crate::BitReader;
pub type EM37_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM38_R = crate::BitReader;
pub type EM38_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM40_R = crate::BitReader;
pub type EM40_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM41_R = crate::BitReader;
pub type EM41_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EM42_R = crate::BitReader;
pub type EM42_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn em32(&self) -> EM32_R {
EM32_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn em33(&self) -> EM33_R {
EM33_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn em34(&self) -> EM34_R {
EM34_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn em35(&self) -> EM35_R {
EM35_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn em36(&self) -> EM36_R {
EM36_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn em37(&self) -> EM37_R {
EM37_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn em38(&self) -> EM38_R {
EM38_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn em40(&self) -> EM40_R {
EM40_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn em41(&self) -> EM41_R {
EM41_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn em42(&self) -> EM42_R {
EM42_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EMR2")
.field("em32", &self.em32())
.field("em33", &self.em33())
.field("em34", &self.em34())
.field("em35", &self.em35())
.field("em36", &self.em36())
.field("em37", &self.em37())
.field("em38", &self.em38())
.field("em40", &self.em40())
.field("em41", &self.em41())
.field("em42", &self.em42())
.finish()
}
}
impl W {
#[inline(always)]
pub fn em32(&mut self) -> EM32_W<EMR2rs> {
EM32_W::new(self, 0)
}
#[inline(always)]
pub fn em33(&mut self) -> EM33_W<EMR2rs> {
EM33_W::new(self, 1)
}
#[inline(always)]
pub fn em34(&mut self) -> EM34_W<EMR2rs> {
EM34_W::new(self, 2)
}
#[inline(always)]
pub fn em35(&mut self) -> EM35_W<EMR2rs> {
EM35_W::new(self, 3)
}
#[inline(always)]
pub fn em36(&mut self) -> EM36_W<EMR2rs> {
EM36_W::new(self, 4)
}
#[inline(always)]
pub fn em37(&mut self) -> EM37_W<EMR2rs> {
EM37_W::new(self, 5)
}
#[inline(always)]
pub fn em38(&mut self) -> EM38_W<EMR2rs> {
EM38_W::new(self, 6)
}
#[inline(always)]
pub fn em40(&mut self) -> EM40_W<EMR2rs> {
EM40_W::new(self, 8)
}
#[inline(always)]
pub fn em41(&mut self) -> EM41_W<EMR2rs> {
EM41_W::new(self, 9)
}
#[inline(always)]
pub fn em42(&mut self) -> EM42_W<EMR2rs> {
EM42_W::new(self, 10)
}
}
pub struct EMR2rs;
impl crate::RegisterSpec for EMR2rs {
type Ux = u32;
}
impl crate::Readable for EMR2rs {}
impl crate::Writable for EMR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EMR2rs {}