pub type R = crate::R<EMRrs>;
pub type W = crate::W<EMRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EVENT_MASK {
Masked = 0,
Unmasked = 1,
}
impl From<EVENT_MASK> for bool {
#[inline(always)]
fn from(variant: EVENT_MASK) -> Self {
variant as u8 != 0
}
}
pub type EM0_R = crate::BitReader<EVENT_MASK>;
impl EM0_R {
#[inline(always)]
pub const fn variant(&self) -> EVENT_MASK {
match self.bits {
false => EVENT_MASK::Masked,
true => EVENT_MASK::Unmasked,
}
}
#[inline(always)]
pub fn is_masked(&self) -> bool {
*self == EVENT_MASK::Masked
}
#[inline(always)]
pub fn is_unmasked(&self) -> bool {
*self == EVENT_MASK::Unmasked
}
}
pub type EM0_W<'a, REG> = crate::BitWriter<'a, REG, EVENT_MASK>;
impl<'a, REG> EM0_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn masked(self) -> &'a mut crate::W<REG> {
self.variant(EVENT_MASK::Masked)
}
#[inline(always)]
pub fn unmasked(self) -> &'a mut crate::W<REG> {
self.variant(EVENT_MASK::Unmasked)
}
}
pub use EM0_R as EM1_R;
pub use EM0_R as EM2_R;
pub use EM0_R as EM3_R;
pub use EM0_R as EM4_R;
pub use EM0_R as EM5_R;
pub use EM0_R as EM6_R;
pub use EM0_R as EM7_R;
pub use EM0_R as EM8_R;
pub use EM0_R as EM9_R;
pub use EM0_R as EM10_R;
pub use EM0_R as EM11_R;
pub use EM0_R as EM12_R;
pub use EM0_R as EM13_R;
pub use EM0_R as EM14_R;
pub use EM0_R as EM15_R;
pub use EM0_R as EM16_R;
pub use EM0_R as EM17_R;
pub use EM0_R as EM18_R;
pub use EM0_R as EM19_R;
pub use EM0_R as EM20_R;
pub use EM0_R as EM21_R;
pub use EM0_R as EM22_R;
pub use EM0_R as EM23_R;
pub use EM0_R as EM24_R;
pub use EM0_R as EM25_R;
pub use EM0_R as EM26_R;
pub use EM0_R as EM28_R;
pub use EM0_R as EM29_R;
pub use EM0_W as EM1_W;
pub use EM0_W as EM2_W;
pub use EM0_W as EM3_W;
pub use EM0_W as EM4_W;
pub use EM0_W as EM5_W;
pub use EM0_W as EM6_W;
pub use EM0_W as EM7_W;
pub use EM0_W as EM8_W;
pub use EM0_W as EM9_W;
pub use EM0_W as EM10_W;
pub use EM0_W as EM11_W;
pub use EM0_W as EM12_W;
pub use EM0_W as EM13_W;
pub use EM0_W as EM14_W;
pub use EM0_W as EM15_W;
pub use EM0_W as EM16_W;
pub use EM0_W as EM17_W;
pub use EM0_W as EM18_W;
pub use EM0_W as EM19_W;
pub use EM0_W as EM20_W;
pub use EM0_W as EM21_W;
pub use EM0_W as EM22_W;
pub use EM0_W as EM23_W;
pub use EM0_W as EM24_W;
pub use EM0_W as EM25_W;
pub use EM0_W as EM26_W;
pub use EM0_W as EM28_W;
pub use EM0_W as EM29_W;
impl R {
#[inline(always)]
pub fn em0(&self) -> EM0_R {
EM0_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn em1(&self) -> EM1_R {
EM1_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn em2(&self) -> EM2_R {
EM2_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn em3(&self) -> EM3_R {
EM3_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn em4(&self) -> EM4_R {
EM4_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn em5(&self) -> EM5_R {
EM5_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn em6(&self) -> EM6_R {
EM6_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn em7(&self) -> EM7_R {
EM7_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn em8(&self) -> EM8_R {
EM8_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn em9(&self) -> EM9_R {
EM9_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn em10(&self) -> EM10_R {
EM10_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn em11(&self) -> EM11_R {
EM11_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn em12(&self) -> EM12_R {
EM12_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn em13(&self) -> EM13_R {
EM13_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn em14(&self) -> EM14_R {
EM14_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn em15(&self) -> EM15_R {
EM15_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn em16(&self) -> EM16_R {
EM16_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn em17(&self) -> EM17_R {
EM17_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn em18(&self) -> EM18_R {
EM18_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn em19(&self) -> EM19_R {
EM19_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn em20(&self) -> EM20_R {
EM20_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn em21(&self) -> EM21_R {
EM21_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn em22(&self) -> EM22_R {
EM22_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn em23(&self) -> EM23_R {
EM23_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn em24(&self) -> EM24_R {
EM24_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn em25(&self) -> EM25_R {
EM25_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn em26(&self) -> EM26_R {
EM26_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn em28(&self) -> EM28_R {
EM28_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn em29(&self) -> EM29_R {
EM29_R::new(((self.bits >> 29) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EMR")
.field("em0", &self.em0())
.field("em1", &self.em1())
.field("em2", &self.em2())
.field("em3", &self.em3())
.field("em4", &self.em4())
.field("em5", &self.em5())
.field("em6", &self.em6())
.field("em7", &self.em7())
.field("em8", &self.em8())
.field("em9", &self.em9())
.field("em10", &self.em10())
.field("em11", &self.em11())
.field("em12", &self.em12())
.field("em13", &self.em13())
.field("em14", &self.em14())
.field("em15", &self.em15())
.field("em16", &self.em16())
.field("em17", &self.em17())
.field("em18", &self.em18())
.field("em19", &self.em19())
.field("em20", &self.em20())
.field("em21", &self.em21())
.field("em22", &self.em22())
.field("em23", &self.em23())
.field("em24", &self.em24())
.field("em25", &self.em25())
.field("em26", &self.em26())
.field("em28", &self.em28())
.field("em29", &self.em29())
.finish()
}
}
impl W {
#[inline(always)]
pub fn em0(&mut self) -> EM0_W<EMRrs> {
EM0_W::new(self, 0)
}
#[inline(always)]
pub fn em1(&mut self) -> EM1_W<EMRrs> {
EM1_W::new(self, 1)
}
#[inline(always)]
pub fn em2(&mut self) -> EM2_W<EMRrs> {
EM2_W::new(self, 2)
}
#[inline(always)]
pub fn em3(&mut self) -> EM3_W<EMRrs> {
EM3_W::new(self, 3)
}
#[inline(always)]
pub fn em4(&mut self) -> EM4_W<EMRrs> {
EM4_W::new(self, 4)
}
#[inline(always)]
pub fn em5(&mut self) -> EM5_W<EMRrs> {
EM5_W::new(self, 5)
}
#[inline(always)]
pub fn em6(&mut self) -> EM6_W<EMRrs> {
EM6_W::new(self, 6)
}
#[inline(always)]
pub fn em7(&mut self) -> EM7_W<EMRrs> {
EM7_W::new(self, 7)
}
#[inline(always)]
pub fn em8(&mut self) -> EM8_W<EMRrs> {
EM8_W::new(self, 8)
}
#[inline(always)]
pub fn em9(&mut self) -> EM9_W<EMRrs> {
EM9_W::new(self, 9)
}
#[inline(always)]
pub fn em10(&mut self) -> EM10_W<EMRrs> {
EM10_W::new(self, 10)
}
#[inline(always)]
pub fn em11(&mut self) -> EM11_W<EMRrs> {
EM11_W::new(self, 11)
}
#[inline(always)]
pub fn em12(&mut self) -> EM12_W<EMRrs> {
EM12_W::new(self, 12)
}
#[inline(always)]
pub fn em13(&mut self) -> EM13_W<EMRrs> {
EM13_W::new(self, 13)
}
#[inline(always)]
pub fn em14(&mut self) -> EM14_W<EMRrs> {
EM14_W::new(self, 14)
}
#[inline(always)]
pub fn em15(&mut self) -> EM15_W<EMRrs> {
EM15_W::new(self, 15)
}
#[inline(always)]
pub fn em16(&mut self) -> EM16_W<EMRrs> {
EM16_W::new(self, 16)
}
#[inline(always)]
pub fn em17(&mut self) -> EM17_W<EMRrs> {
EM17_W::new(self, 17)
}
#[inline(always)]
pub fn em18(&mut self) -> EM18_W<EMRrs> {
EM18_W::new(self, 18)
}
#[inline(always)]
pub fn em19(&mut self) -> EM19_W<EMRrs> {
EM19_W::new(self, 19)
}
#[inline(always)]
pub fn em20(&mut self) -> EM20_W<EMRrs> {
EM20_W::new(self, 20)
}
#[inline(always)]
pub fn em21(&mut self) -> EM21_W<EMRrs> {
EM21_W::new(self, 21)
}
#[inline(always)]
pub fn em22(&mut self) -> EM22_W<EMRrs> {
EM22_W::new(self, 22)
}
#[inline(always)]
pub fn em23(&mut self) -> EM23_W<EMRrs> {
EM23_W::new(self, 23)
}
#[inline(always)]
pub fn em24(&mut self) -> EM24_W<EMRrs> {
EM24_W::new(self, 24)
}
#[inline(always)]
pub fn em25(&mut self) -> EM25_W<EMRrs> {
EM25_W::new(self, 25)
}
#[inline(always)]
pub fn em26(&mut self) -> EM26_W<EMRrs> {
EM26_W::new(self, 26)
}
#[inline(always)]
pub fn em28(&mut self) -> EM28_W<EMRrs> {
EM28_W::new(self, 28)
}
#[inline(always)]
pub fn em29(&mut self) -> EM29_W<EMRrs> {
EM29_W::new(self, 29)
}
}
pub struct EMRrs;
impl crate::RegisterSpec for EMRrs {
type Ux = u32;
}
impl crate::Readable for EMRrs {}
impl crate::Writable for EMRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EMRrs {}