pub type R = crate::R<SWIER3rs>;
pub type W = crate::W<SWIER3rs>;
#[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 SWIER82_R = crate::BitReader<SOFTWARE_INTERRUPT>;
impl SWIER82_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 SWIER82_W<'a, REG> = crate::BitWriter<'a, REG, SOFTWARE_INTERRUPT>;
impl<'a, REG> SWIER82_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 SWIER82_R as SWIER84_R;
pub use SWIER82_R as SWIER85_R;
pub use SWIER82_R as SWIER86_R;
pub use SWIER82_W as SWIER84_W;
pub use SWIER82_W as SWIER85_W;
pub use SWIER82_W as SWIER86_W;
impl R {
#[inline(always)]
pub fn swier82(&self) -> SWIER82_R {
SWIER82_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn swier84(&self) -> SWIER84_R {
SWIER84_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn swier85(&self) -> SWIER85_R {
SWIER85_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn swier86(&self) -> SWIER86_R {
SWIER86_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SWIER3")
.field("swier82", &self.swier82())
.field("swier84", &self.swier84())
.field("swier85", &self.swier85())
.field("swier86", &self.swier86())
.finish()
}
}
impl W {
#[inline(always)]
pub fn swier82(&mut self) -> SWIER82_W<SWIER3rs> {
SWIER82_W::new(self, 18)
}
#[inline(always)]
pub fn swier84(&mut self) -> SWIER84_W<SWIER3rs> {
SWIER84_W::new(self, 20)
}
#[inline(always)]
pub fn swier85(&mut self) -> SWIER85_W<SWIER3rs> {
SWIER85_W::new(self, 21)
}
#[inline(always)]
pub fn swier86(&mut self) -> SWIER86_W<SWIER3rs> {
SWIER86_W::new(self, 22)
}
}
pub struct SWIER3rs;
impl crate::RegisterSpec for SWIER3rs {
type Ux = u32;
}
impl crate::Readable for SWIER3rs {}
impl crate::Writable for SWIER3rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SWIER3rs {}