pub type R = crate::R<IERrs>;
pub type W = crate::W<IERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FLT1IE {
Disabled = 0,
Enabled = 1,
}
impl From<FLT1IE> for bool {
#[inline(always)]
fn from(variant: FLT1IE) -> Self {
variant as u8 != 0
}
}
pub type FLT1IE_R = crate::BitReader<FLT1IE>;
impl FLT1IE_R {
#[inline(always)]
pub const fn variant(&self) -> FLT1IE {
match self.bits {
false => FLT1IE::Disabled,
true => FLT1IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FLT1IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FLT1IE::Enabled
}
}
pub type FLT1IE_W<'a, REG> = crate::BitWriter<'a, REG, FLT1IE>;
impl<'a, REG> FLT1IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FLT1IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FLT1IE::Enabled)
}
}
pub use FLT1IE_R as FLT2IE_R;
pub use FLT1IE_R as FLT3IE_R;
pub use FLT1IE_R as FLT4IE_R;
pub use FLT1IE_R as FLT5IE_R;
pub use FLT1IE_R as SYSFLTIE_R;
pub use FLT1IE_W as FLT2IE_W;
pub use FLT1IE_W as FLT3IE_W;
pub use FLT1IE_W as FLT4IE_W;
pub use FLT1IE_W as FLT5IE_W;
pub use FLT1IE_W as SYSFLTIE_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BMPERIE {
Disabled = 0,
Enabled = 1,
}
impl From<BMPERIE> for bool {
#[inline(always)]
fn from(variant: BMPERIE) -> Self {
variant as u8 != 0
}
}
pub type BMPERIE_R = crate::BitReader<BMPERIE>;
impl BMPERIE_R {
#[inline(always)]
pub const fn variant(&self) -> BMPERIE {
match self.bits {
false => BMPERIE::Disabled,
true => BMPERIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BMPERIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BMPERIE::Enabled
}
}
pub type BMPERIE_W<'a, REG> = crate::BitWriter<'a, REG, BMPERIE>;
impl<'a, REG> BMPERIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(BMPERIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(BMPERIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn flt1ie(&self) -> FLT1IE_R {
FLT1IE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn flt2ie(&self) -> FLT2IE_R {
FLT2IE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn flt3ie(&self) -> FLT3IE_R {
FLT3IE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn flt4ie(&self) -> FLT4IE_R {
FLT4IE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn flt5ie(&self) -> FLT5IE_R {
FLT5IE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn sysfltie(&self) -> SYSFLTIE_R {
SYSFLTIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn bmperie(&self) -> BMPERIE_R {
BMPERIE_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("IER")
.field("bmperie", &self.bmperie())
.field("flt1ie", &self.flt1ie())
.field("sysfltie", &self.sysfltie())
.field("flt5ie", &self.flt5ie())
.field("flt4ie", &self.flt4ie())
.field("flt3ie", &self.flt3ie())
.field("flt2ie", &self.flt2ie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn flt1ie(&mut self) -> FLT1IE_W<IERrs> {
FLT1IE_W::new(self, 0)
}
#[inline(always)]
pub fn flt2ie(&mut self) -> FLT2IE_W<IERrs> {
FLT2IE_W::new(self, 1)
}
#[inline(always)]
pub fn flt3ie(&mut self) -> FLT3IE_W<IERrs> {
FLT3IE_W::new(self, 2)
}
#[inline(always)]
pub fn flt4ie(&mut self) -> FLT4IE_W<IERrs> {
FLT4IE_W::new(self, 3)
}
#[inline(always)]
pub fn flt5ie(&mut self) -> FLT5IE_W<IERrs> {
FLT5IE_W::new(self, 4)
}
#[inline(always)]
pub fn sysfltie(&mut self) -> SYSFLTIE_W<IERrs> {
SYSFLTIE_W::new(self, 5)
}
#[inline(always)]
pub fn bmperie(&mut self) -> BMPERIE_W<IERrs> {
BMPERIE_W::new(self, 17)
}
}
pub struct IERrs;
impl crate::RegisterSpec for IERrs {
type Ux = u32;
}
impl crate::Readable for IERrs {}
impl crate::Writable for IERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IERrs {}