pub type R = crate::R<SWIER2rs>;
pub type W = crate::W<SWIER2rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SOFTWARE_INTERRUPT {
        Pend = 1,
}
impl From<SOFTWARE_INTERRUPT> for bool {
    #[inline(always)]
    fn from(variant: SOFTWARE_INTERRUPT) -> Self {
        variant as u8 != 0
    }
}
pub type SWI32_R = crate::BitReader<SOFTWARE_INTERRUPT>;
impl SWI32_R {
        #[inline(always)]
    pub const fn variant(&self) -> Option<SOFTWARE_INTERRUPT> {
        match self.bits {
            true => Some(SOFTWARE_INTERRUPT::Pend),
            _ => None,
        }
    }
        #[inline(always)]
    pub fn is_pend(&self) -> bool {
        *self == SOFTWARE_INTERRUPT::Pend
    }
}
pub type SWI32_W<'a, REG> = crate::BitWriter<'a, REG, SOFTWARE_INTERRUPT>;
impl<'a, REG> SWI32_W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
        #[inline(always)]
    pub fn pend(self) -> &'a mut crate::W<REG> {
        self.variant(SOFTWARE_INTERRUPT::Pend)
    }
}
pub use SWI32_R as SWI33_R;
pub use SWI32_R as SWI40_R;
pub use SWI32_R as SWI41_R;
pub use SWI32_W as SWI33_W;
pub use SWI32_W as SWI40_W;
pub use SWI32_W as SWI41_W;
impl R {
        #[inline(always)]
    pub fn swi32(&self) -> SWI32_R {
        SWI32_R::new((self.bits & 1) != 0)
    }
        #[inline(always)]
    pub fn swi33(&self) -> SWI33_R {
        SWI33_R::new(((self.bits >> 1) & 1) != 0)
    }
        #[inline(always)]
    pub fn swi40(&self) -> SWI40_R {
        SWI40_R::new(((self.bits >> 8) & 1) != 0)
    }
        #[inline(always)]
    pub fn swi41(&self) -> SWI41_R {
        SWI41_R::new(((self.bits >> 9) & 1) != 0)
    }
}
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("SWIER2")
            .field("swi32", &self.swi32())
            .field("swi33", &self.swi33())
            .field("swi40", &self.swi40())
            .field("swi41", &self.swi41())
            .finish()
    }
}
impl W {
        #[inline(always)]
    pub fn swi32(&mut self) -> SWI32_W<SWIER2rs> {
        SWI32_W::new(self, 0)
    }
        #[inline(always)]
    pub fn swi33(&mut self) -> SWI33_W<SWIER2rs> {
        SWI33_W::new(self, 1)
    }
        #[inline(always)]
    pub fn swi40(&mut self) -> SWI40_W<SWIER2rs> {
        SWI40_W::new(self, 8)
    }
        #[inline(always)]
    pub fn swi41(&mut self) -> SWI41_W<SWIER2rs> {
        SWI41_W::new(self, 9)
    }
}
pub struct SWIER2rs;
impl crate::RegisterSpec for SWIER2rs {
    type Ux = u32;
}
impl crate::Readable for SWIER2rs {}
impl crate::Writable for SWIER2rs {
    type Safety = crate::Unsafe;
}
impl crate::Resettable for SWIER2rs {}