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 LIE {
Disabled = 0,
Enabled = 1,
}
impl From<LIE> for bool {
#[inline(always)]
fn from(variant: LIE) -> Self {
variant as u8 != 0
}
}
pub type LIE_R = crate::BitReader<LIE>;
impl LIE_R {
#[inline(always)]
pub const fn variant(&self) -> LIE {
match self.bits {
false => LIE::Disabled,
true => LIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == LIE::Enabled
}
}
pub type LIE_W<'a, REG> = crate::BitWriter<'a, REG, LIE>;
impl<'a, REG> LIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(LIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(LIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FUIE {
Disabled = 0,
Enabled = 1,
}
impl From<FUIE> for bool {
#[inline(always)]
fn from(variant: FUIE) -> Self {
variant as u8 != 0
}
}
pub type FUIE_R = crate::BitReader<FUIE>;
impl FUIE_R {
#[inline(always)]
pub const fn variant(&self) -> FUIE {
match self.bits {
false => FUIE::Disabled,
true => FUIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FUIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FUIE::Enabled
}
}
pub type FUIE_W<'a, REG> = crate::BitWriter<'a, REG, FUIE>;
impl<'a, REG> FUIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FUIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FUIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TERRIE {
Disabled = 0,
Enabled = 1,
}
impl From<TERRIE> for bool {
#[inline(always)]
fn from(variant: TERRIE) -> Self {
variant as u8 != 0
}
}
pub type TERRIE_R = crate::BitReader<TERRIE>;
impl TERRIE_R {
#[inline(always)]
pub const fn variant(&self) -> TERRIE {
match self.bits {
false => TERRIE::Disabled,
true => TERRIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TERRIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TERRIE::Enabled
}
}
pub type TERRIE_W<'a, REG> = crate::BitWriter<'a, REG, TERRIE>;
impl<'a, REG> TERRIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TERRIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TERRIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RRIE {
Disabled = 0,
Enabled = 1,
}
impl From<RRIE> for bool {
#[inline(always)]
fn from(variant: RRIE) -> Self {
variant as u8 != 0
}
}
pub type RRIE_R = crate::BitReader<RRIE>;
impl RRIE_R {
#[inline(always)]
pub const fn variant(&self) -> RRIE {
match self.bits {
false => RRIE::Disabled,
true => RRIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RRIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RRIE::Enabled
}
}
pub type RRIE_W<'a, REG> = crate::BitWriter<'a, REG, RRIE>;
impl<'a, REG> RRIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RRIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RRIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn lie(&self) -> LIE_R {
LIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn fuie(&self) -> FUIE_R {
FUIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn terrie(&self) -> TERRIE_R {
TERRIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn rrie(&self) -> RRIE_R {
RRIE_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IER")
.field("rrie", &self.rrie())
.field("terrie", &self.terrie())
.field("fuie", &self.fuie())
.field("lie", &self.lie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lie(&mut self) -> LIE_W<IERrs> {
LIE_W::new(self, 0)
}
#[inline(always)]
pub fn fuie(&mut self) -> FUIE_W<IERrs> {
FUIE_W::new(self, 1)
}
#[inline(always)]
pub fn terrie(&mut self) -> TERRIE_W<IERrs> {
TERRIE_W::new(self, 2)
}
#[inline(always)]
pub fn rrie(&mut self) -> RRIE_W<IERrs> {
RRIE_W::new(self, 3)
}
}
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 {}