pub type R = crate::R<ISRrs>;
pub type W = crate::W<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FLT1R {
NoEvent = 0,
Event = 1,
}
impl From<FLT1R> for bool {
#[inline(always)]
fn from(variant: FLT1R) -> Self {
variant as u8 != 0
}
}
pub type FLT1_R = crate::BitReader<FLT1R>;
impl FLT1_R {
#[inline(always)]
pub const fn variant(&self) -> FLT1R {
match self.bits {
false => FLT1R::NoEvent,
true => FLT1R::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == FLT1R::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == FLT1R::Event
}
}
pub use FLT1_R as FLT2_R;
pub use FLT1_R as FLT3_R;
pub use FLT1_R as FLT4_R;
pub use FLT1_R as FLT5_R;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SYSFLTR {
NoEvent = 0,
Event = 1,
}
impl From<SYSFLTR> for bool {
#[inline(always)]
fn from(variant: SYSFLTR) -> Self {
variant as u8 != 0
}
}
pub type SYSFLT_R = crate::BitReader<SYSFLTR>;
impl SYSFLT_R {
#[inline(always)]
pub const fn variant(&self) -> SYSFLTR {
match self.bits {
false => SYSFLTR::NoEvent,
true => SYSFLTR::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == SYSFLTR::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == SYSFLTR::Event
}
}
pub type SYSFLT_W<'a, REG> = crate::BitWriter<'a, REG, SYSFLTR>;
impl<'a, REG> SYSFLT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_event(self) -> &'a mut crate::W<REG> {
self.variant(SYSFLTR::NoEvent)
}
#[inline(always)]
pub fn event(self) -> &'a mut crate::W<REG> {
self.variant(SYSFLTR::Event)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BMPERR {
NoEvent = 0,
Event = 1,
}
impl From<BMPERR> for bool {
#[inline(always)]
fn from(variant: BMPERR) -> Self {
variant as u8 != 0
}
}
pub type BMPER_R = crate::BitReader<BMPERR>;
impl BMPER_R {
#[inline(always)]
pub const fn variant(&self) -> BMPERR {
match self.bits {
false => BMPERR::NoEvent,
true => BMPERR::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == BMPERR::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == BMPERR::Event
}
}
impl R {
#[inline(always)]
pub fn flt1(&self) -> FLT1_R {
FLT1_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn flt2(&self) -> FLT2_R {
FLT2_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn flt3(&self) -> FLT3_R {
FLT3_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn flt4(&self) -> FLT4_R {
FLT4_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn flt5(&self) -> FLT5_R {
FLT5_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn sysflt(&self) -> SYSFLT_R {
SYSFLT_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn bmper(&self) -> BMPER_R {
BMPER_R::new(((self.bits >> 17) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("bmper", &self.bmper())
.field("sysflt", &self.sysflt())
.field("flt1", &self.flt1())
.field("flt5", &self.flt5())
.field("flt4", &self.flt4())
.field("flt3", &self.flt3())
.field("flt2", &self.flt2())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sysflt(&mut self) -> SYSFLT_W<ISRrs> {
SYSFLT_W::new(self, 5)
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Writable for ISRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ISRrs {}