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 SWI35_R = crate::BitReader<SOFTWARE_INTERRUPT>;
impl SWI35_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 SWI35_W<'a, REG> = crate::BitWriter<'a, REG, SOFTWARE_INTERRUPT>;
impl<'a, REG> SWI35_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 SWI35_R as SWI36_R;
pub use SWI35_R as SWI37_R;
pub use SWI35_R as SWI38_R;
pub use SWI35_W as SWI36_W;
pub use SWI35_W as SWI37_W;
pub use SWI35_W as SWI38_W;
impl R {
#[inline(always)]
pub fn swi35(&self) -> SWI35_R {
SWI35_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn swi36(&self) -> SWI36_R {
SWI36_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn swi37(&self) -> SWI37_R {
SWI37_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn swi38(&self) -> SWI38_R {
SWI38_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SWIER2")
.field("swi35", &self.swi35())
.field("swi36", &self.swi36())
.field("swi37", &self.swi37())
.field("swi38", &self.swi38())
.finish()
}
}
impl W {
#[inline(always)]
pub fn swi35(&mut self) -> SWI35_W<SWIER2rs> {
SWI35_W::new(self, 3)
}
#[inline(always)]
pub fn swi36(&mut self) -> SWI36_W<SWIER2rs> {
SWI36_W::new(self, 4)
}
#[inline(always)]
pub fn swi37(&mut self) -> SWI37_W<SWIER2rs> {
SWI37_W::new(self, 5)
}
#[inline(always)]
pub fn swi38(&mut self) -> SWI38_W<SWIER2rs> {
SWI38_W::new(self, 6)
}
}
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 {}