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 CMPMIE {
Disabled = 0,
Enabled = 1,
}
impl From<CMPMIE> for bool {
#[inline(always)]
fn from(variant: CMPMIE) -> Self {
variant as u8 != 0
}
}
pub type CMPMIE_R = crate::BitReader<CMPMIE>;
impl CMPMIE_R {
#[inline(always)]
pub const fn variant(&self) -> CMPMIE {
match self.bits {
false => CMPMIE::Disabled,
true => CMPMIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CMPMIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CMPMIE::Enabled
}
}
pub type CMPMIE_W<'a, REG> = crate::BitWriter<'a, REG, CMPMIE>;
impl<'a, REG> CMPMIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(CMPMIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(CMPMIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ARRMIE {
Disabled = 0,
Enabled = 1,
}
impl From<ARRMIE> for bool {
#[inline(always)]
fn from(variant: ARRMIE) -> Self {
variant as u8 != 0
}
}
pub type ARRMIE_R = crate::BitReader<ARRMIE>;
impl ARRMIE_R {
#[inline(always)]
pub const fn variant(&self) -> ARRMIE {
match self.bits {
false => ARRMIE::Disabled,
true => ARRMIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ARRMIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ARRMIE::Enabled
}
}
pub type ARRMIE_W<'a, REG> = crate::BitWriter<'a, REG, ARRMIE>;
impl<'a, REG> ARRMIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(ARRMIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(ARRMIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EXTTRIGIE {
Disabled = 0,
Enabled = 1,
}
impl From<EXTTRIGIE> for bool {
#[inline(always)]
fn from(variant: EXTTRIGIE) -> Self {
variant as u8 != 0
}
}
pub type EXTTRIGIE_R = crate::BitReader<EXTTRIGIE>;
impl EXTTRIGIE_R {
#[inline(always)]
pub const fn variant(&self) -> EXTTRIGIE {
match self.bits {
false => EXTTRIGIE::Disabled,
true => EXTTRIGIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EXTTRIGIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EXTTRIGIE::Enabled
}
}
pub type EXTTRIGIE_W<'a, REG> = crate::BitWriter<'a, REG, EXTTRIGIE>;
impl<'a, REG> EXTTRIGIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EXTTRIGIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EXTTRIGIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMPOKIE {
Disabled = 0,
Enabled = 1,
}
impl From<CMPOKIE> for bool {
#[inline(always)]
fn from(variant: CMPOKIE) -> Self {
variant as u8 != 0
}
}
pub type CMPOKIE_R = crate::BitReader<CMPOKIE>;
impl CMPOKIE_R {
#[inline(always)]
pub const fn variant(&self) -> CMPOKIE {
match self.bits {
false => CMPOKIE::Disabled,
true => CMPOKIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CMPOKIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CMPOKIE::Enabled
}
}
pub type CMPOKIE_W<'a, REG> = crate::BitWriter<'a, REG, CMPOKIE>;
impl<'a, REG> CMPOKIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(CMPOKIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(CMPOKIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ARROKIE {
Disabled = 0,
Enabled = 1,
}
impl From<ARROKIE> for bool {
#[inline(always)]
fn from(variant: ARROKIE) -> Self {
variant as u8 != 0
}
}
pub type ARROKIE_R = crate::BitReader<ARROKIE>;
impl ARROKIE_R {
#[inline(always)]
pub const fn variant(&self) -> ARROKIE {
match self.bits {
false => ARROKIE::Disabled,
true => ARROKIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ARROKIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ARROKIE::Enabled
}
}
pub type ARROKIE_W<'a, REG> = crate::BitWriter<'a, REG, ARROKIE>;
impl<'a, REG> ARROKIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(ARROKIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(ARROKIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UPIE {
Disabled = 0,
Enabled = 1,
}
impl From<UPIE> for bool {
#[inline(always)]
fn from(variant: UPIE) -> Self {
variant as u8 != 0
}
}
pub type UPIE_R = crate::BitReader<UPIE>;
impl UPIE_R {
#[inline(always)]
pub const fn variant(&self) -> UPIE {
match self.bits {
false => UPIE::Disabled,
true => UPIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == UPIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == UPIE::Enabled
}
}
pub type UPIE_W<'a, REG> = crate::BitWriter<'a, REG, UPIE>;
impl<'a, REG> UPIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(UPIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(UPIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DOWNIE {
Disabled = 0,
Enabled = 1,
}
impl From<DOWNIE> for bool {
#[inline(always)]
fn from(variant: DOWNIE) -> Self {
variant as u8 != 0
}
}
pub type DOWNIE_R = crate::BitReader<DOWNIE>;
impl DOWNIE_R {
#[inline(always)]
pub const fn variant(&self) -> DOWNIE {
match self.bits {
false => DOWNIE::Disabled,
true => DOWNIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DOWNIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DOWNIE::Enabled
}
}
pub type DOWNIE_W<'a, REG> = crate::BitWriter<'a, REG, DOWNIE>;
impl<'a, REG> DOWNIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(DOWNIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(DOWNIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn cmpmie(&self) -> CMPMIE_R {
CMPMIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn arrmie(&self) -> ARRMIE_R {
ARRMIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn exttrigie(&self) -> EXTTRIGIE_R {
EXTTRIGIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cmpokie(&self) -> CMPOKIE_R {
CMPOKIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn arrokie(&self) -> ARROKIE_R {
ARROKIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn upie(&self) -> UPIE_R {
UPIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn downie(&self) -> DOWNIE_R {
DOWNIE_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("IER")
.field("downie", &self.downie())
.field("upie", &self.upie())
.field("arrokie", &self.arrokie())
.field("cmpokie", &self.cmpokie())
.field("exttrigie", &self.exttrigie())
.field("arrmie", &self.arrmie())
.field("cmpmie", &self.cmpmie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cmpmie(&mut self) -> CMPMIE_W<IERrs> {
CMPMIE_W::new(self, 0)
}
#[inline(always)]
pub fn arrmie(&mut self) -> ARRMIE_W<IERrs> {
ARRMIE_W::new(self, 1)
}
#[inline(always)]
pub fn exttrigie(&mut self) -> EXTTRIGIE_W<IERrs> {
EXTTRIGIE_W::new(self, 2)
}
#[inline(always)]
pub fn cmpokie(&mut self) -> CMPOKIE_W<IERrs> {
CMPOKIE_W::new(self, 3)
}
#[inline(always)]
pub fn arrokie(&mut self) -> ARROKIE_W<IERrs> {
ARROKIE_W::new(self, 4)
}
#[inline(always)]
pub fn upie(&mut self) -> UPIE_W<IERrs> {
UPIE_W::new(self, 5)
}
#[inline(always)]
pub fn downie(&mut self) -> DOWNIE_W<IERrs> {
DOWNIE_W::new(self, 6)
}
}
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 {}