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 TMEIE {
Disabled = 0,
Enabled = 1,
}
impl From<TMEIE> for bool {
#[inline(always)]
fn from(variant: TMEIE) -> Self {
variant as u8 != 0
}
}
pub type TMEIE_R = crate::BitReader<TMEIE>;
impl TMEIE_R {
#[inline(always)]
pub const fn variant(&self) -> TMEIE {
match self.bits {
false => TMEIE::Disabled,
true => TMEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TMEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TMEIE::Enabled
}
}
pub type TMEIE_W<'a, REG> = crate::BitWriter<'a, REG, TMEIE>;
impl<'a, REG> TMEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TMEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TMEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FMPIE0 {
Disabled = 0,
Enabled = 1,
}
impl From<FMPIE0> for bool {
#[inline(always)]
fn from(variant: FMPIE0) -> Self {
variant as u8 != 0
}
}
pub type FMPIE0_R = crate::BitReader<FMPIE0>;
impl FMPIE0_R {
#[inline(always)]
pub const fn variant(&self) -> FMPIE0 {
match self.bits {
false => FMPIE0::Disabled,
true => FMPIE0::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FMPIE0::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FMPIE0::Enabled
}
}
pub type FMPIE0_W<'a, REG> = crate::BitWriter<'a, REG, FMPIE0>;
impl<'a, REG> FMPIE0_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FMPIE0::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FMPIE0::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FFIE0 {
Disabled = 0,
Enabled = 1,
}
impl From<FFIE0> for bool {
#[inline(always)]
fn from(variant: FFIE0) -> Self {
variant as u8 != 0
}
}
pub type FFIE0_R = crate::BitReader<FFIE0>;
impl FFIE0_R {
#[inline(always)]
pub const fn variant(&self) -> FFIE0 {
match self.bits {
false => FFIE0::Disabled,
true => FFIE0::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FFIE0::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FFIE0::Enabled
}
}
pub type FFIE0_W<'a, REG> = crate::BitWriter<'a, REG, FFIE0>;
impl<'a, REG> FFIE0_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FFIE0::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FFIE0::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FOVIE0 {
Disabled = 0,
Enabled = 1,
}
impl From<FOVIE0> for bool {
#[inline(always)]
fn from(variant: FOVIE0) -> Self {
variant as u8 != 0
}
}
pub type FOVIE0_R = crate::BitReader<FOVIE0>;
impl FOVIE0_R {
#[inline(always)]
pub const fn variant(&self) -> FOVIE0 {
match self.bits {
false => FOVIE0::Disabled,
true => FOVIE0::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FOVIE0::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FOVIE0::Enabled
}
}
pub type FOVIE0_W<'a, REG> = crate::BitWriter<'a, REG, FOVIE0>;
impl<'a, REG> FOVIE0_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FOVIE0::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FOVIE0::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FMPIE1 {
Disabled = 0,
Enabled = 1,
}
impl From<FMPIE1> for bool {
#[inline(always)]
fn from(variant: FMPIE1) -> Self {
variant as u8 != 0
}
}
pub type FMPIE1_R = crate::BitReader<FMPIE1>;
impl FMPIE1_R {
#[inline(always)]
pub const fn variant(&self) -> FMPIE1 {
match self.bits {
false => FMPIE1::Disabled,
true => FMPIE1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FMPIE1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FMPIE1::Enabled
}
}
pub type FMPIE1_W<'a, REG> = crate::BitWriter<'a, REG, FMPIE1>;
impl<'a, REG> FMPIE1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FMPIE1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FMPIE1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FFIE1 {
Disabled = 0,
Enabled = 1,
}
impl From<FFIE1> for bool {
#[inline(always)]
fn from(variant: FFIE1) -> Self {
variant as u8 != 0
}
}
pub type FFIE1_R = crate::BitReader<FFIE1>;
impl FFIE1_R {
#[inline(always)]
pub const fn variant(&self) -> FFIE1 {
match self.bits {
false => FFIE1::Disabled,
true => FFIE1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FFIE1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FFIE1::Enabled
}
}
pub type FFIE1_W<'a, REG> = crate::BitWriter<'a, REG, FFIE1>;
impl<'a, REG> FFIE1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FFIE1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FFIE1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FOVIE1 {
Disabled = 0,
Enabled = 1,
}
impl From<FOVIE1> for bool {
#[inline(always)]
fn from(variant: FOVIE1) -> Self {
variant as u8 != 0
}
}
pub type FOVIE1_R = crate::BitReader<FOVIE1>;
impl FOVIE1_R {
#[inline(always)]
pub const fn variant(&self) -> FOVIE1 {
match self.bits {
false => FOVIE1::Disabled,
true => FOVIE1::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FOVIE1::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FOVIE1::Enabled
}
}
pub type FOVIE1_W<'a, REG> = crate::BitWriter<'a, REG, FOVIE1>;
impl<'a, REG> FOVIE1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FOVIE1::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FOVIE1::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EWGIE {
Disabled = 0,
Enabled = 1,
}
impl From<EWGIE> for bool {
#[inline(always)]
fn from(variant: EWGIE) -> Self {
variant as u8 != 0
}
}
pub type EWGIE_R = crate::BitReader<EWGIE>;
impl EWGIE_R {
#[inline(always)]
pub const fn variant(&self) -> EWGIE {
match self.bits {
false => EWGIE::Disabled,
true => EWGIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EWGIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EWGIE::Enabled
}
}
pub type EWGIE_W<'a, REG> = crate::BitWriter<'a, REG, EWGIE>;
impl<'a, REG> EWGIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EWGIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EWGIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EPVIE {
Disabled = 0,
Enabled = 1,
}
impl From<EPVIE> for bool {
#[inline(always)]
fn from(variant: EPVIE) -> Self {
variant as u8 != 0
}
}
pub type EPVIE_R = crate::BitReader<EPVIE>;
impl EPVIE_R {
#[inline(always)]
pub const fn variant(&self) -> EPVIE {
match self.bits {
false => EPVIE::Disabled,
true => EPVIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EPVIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EPVIE::Enabled
}
}
pub type EPVIE_W<'a, REG> = crate::BitWriter<'a, REG, EPVIE>;
impl<'a, REG> EPVIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EPVIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EPVIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BOFIE {
Disabled = 0,
Enabled = 1,
}
impl From<BOFIE> for bool {
#[inline(always)]
fn from(variant: BOFIE) -> Self {
variant as u8 != 0
}
}
pub type BOFIE_R = crate::BitReader<BOFIE>;
impl BOFIE_R {
#[inline(always)]
pub const fn variant(&self) -> BOFIE {
match self.bits {
false => BOFIE::Disabled,
true => BOFIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BOFIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BOFIE::Enabled
}
}
pub type BOFIE_W<'a, REG> = crate::BitWriter<'a, REG, BOFIE>;
impl<'a, REG> BOFIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(BOFIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(BOFIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LECIE {
Disabled = 0,
Enabled = 1,
}
impl From<LECIE> for bool {
#[inline(always)]
fn from(variant: LECIE) -> Self {
variant as u8 != 0
}
}
pub type LECIE_R = crate::BitReader<LECIE>;
impl LECIE_R {
#[inline(always)]
pub const fn variant(&self) -> LECIE {
match self.bits {
false => LECIE::Disabled,
true => LECIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LECIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == LECIE::Enabled
}
}
pub type LECIE_W<'a, REG> = crate::BitWriter<'a, REG, LECIE>;
impl<'a, REG> LECIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(LECIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(LECIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ERRIE {
Disabled = 0,
Enabled = 1,
}
impl From<ERRIE> for bool {
#[inline(always)]
fn from(variant: ERRIE) -> Self {
variant as u8 != 0
}
}
pub type ERRIE_R = crate::BitReader<ERRIE>;
impl ERRIE_R {
#[inline(always)]
pub const fn variant(&self) -> ERRIE {
match self.bits {
false => ERRIE::Disabled,
true => ERRIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERRIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERRIE::Enabled
}
}
pub type ERRIE_W<'a, REG> = crate::BitWriter<'a, REG, ERRIE>;
impl<'a, REG> ERRIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(ERRIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(ERRIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WKUIE {
Disabled = 0,
Enabled = 1,
}
impl From<WKUIE> for bool {
#[inline(always)]
fn from(variant: WKUIE) -> Self {
variant as u8 != 0
}
}
pub type WKUIE_R = crate::BitReader<WKUIE>;
impl WKUIE_R {
#[inline(always)]
pub const fn variant(&self) -> WKUIE {
match self.bits {
false => WKUIE::Disabled,
true => WKUIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WKUIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WKUIE::Enabled
}
}
pub type WKUIE_W<'a, REG> = crate::BitWriter<'a, REG, WKUIE>;
impl<'a, REG> WKUIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(WKUIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(WKUIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SLKIE {
Disabled = 0,
Enabled = 1,
}
impl From<SLKIE> for bool {
#[inline(always)]
fn from(variant: SLKIE) -> Self {
variant as u8 != 0
}
}
pub type SLKIE_R = crate::BitReader<SLKIE>;
impl SLKIE_R {
#[inline(always)]
pub const fn variant(&self) -> SLKIE {
match self.bits {
false => SLKIE::Disabled,
true => SLKIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLKIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLKIE::Enabled
}
}
pub type SLKIE_W<'a, REG> = crate::BitWriter<'a, REG, SLKIE>;
impl<'a, REG> SLKIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SLKIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(SLKIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn tmeie(&self) -> TMEIE_R {
TMEIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn fmpie0(&self) -> FMPIE0_R {
FMPIE0_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ffie0(&self) -> FFIE0_R {
FFIE0_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn fovie0(&self) -> FOVIE0_R {
FOVIE0_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn fmpie1(&self) -> FMPIE1_R {
FMPIE1_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn ffie1(&self) -> FFIE1_R {
FFIE1_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn fovie1(&self) -> FOVIE1_R {
FOVIE1_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn ewgie(&self) -> EWGIE_R {
EWGIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn epvie(&self) -> EPVIE_R {
EPVIE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn bofie(&self) -> BOFIE_R {
BOFIE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn lecie(&self) -> LECIE_R {
LECIE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn wkuie(&self) -> WKUIE_R {
WKUIE_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn slkie(&self) -> SLKIE_R {
SLKIE_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("slkie", &self.slkie())
.field("wkuie", &self.wkuie())
.field("errie", &self.errie())
.field("lecie", &self.lecie())
.field("bofie", &self.bofie())
.field("epvie", &self.epvie())
.field("ewgie", &self.ewgie())
.field("fovie1", &self.fovie1())
.field("ffie1", &self.ffie1())
.field("fmpie1", &self.fmpie1())
.field("fovie0", &self.fovie0())
.field("ffie0", &self.ffie0())
.field("fmpie0", &self.fmpie0())
.field("tmeie", &self.tmeie())
.finish()
}
}
impl W {
#[inline(always)]
#[must_use]
pub fn tmeie(&mut self) -> TMEIE_W<IERrs> {
TMEIE_W::new(self, 0)
}
#[inline(always)]
#[must_use]
pub fn fmpie0(&mut self) -> FMPIE0_W<IERrs> {
FMPIE0_W::new(self, 1)
}
#[inline(always)]
#[must_use]
pub fn ffie0(&mut self) -> FFIE0_W<IERrs> {
FFIE0_W::new(self, 2)
}
#[inline(always)]
#[must_use]
pub fn fovie0(&mut self) -> FOVIE0_W<IERrs> {
FOVIE0_W::new(self, 3)
}
#[inline(always)]
#[must_use]
pub fn fmpie1(&mut self) -> FMPIE1_W<IERrs> {
FMPIE1_W::new(self, 4)
}
#[inline(always)]
#[must_use]
pub fn ffie1(&mut self) -> FFIE1_W<IERrs> {
FFIE1_W::new(self, 5)
}
#[inline(always)]
#[must_use]
pub fn fovie1(&mut self) -> FOVIE1_W<IERrs> {
FOVIE1_W::new(self, 6)
}
#[inline(always)]
#[must_use]
pub fn ewgie(&mut self) -> EWGIE_W<IERrs> {
EWGIE_W::new(self, 8)
}
#[inline(always)]
#[must_use]
pub fn epvie(&mut self) -> EPVIE_W<IERrs> {
EPVIE_W::new(self, 9)
}
#[inline(always)]
#[must_use]
pub fn bofie(&mut self) -> BOFIE_W<IERrs> {
BOFIE_W::new(self, 10)
}
#[inline(always)]
#[must_use]
pub fn lecie(&mut self) -> LECIE_W<IERrs> {
LECIE_W::new(self, 11)
}
#[inline(always)]
#[must_use]
pub fn errie(&mut self) -> ERRIE_W<IERrs> {
ERRIE_W::new(self, 15)
}
#[inline(always)]
#[must_use]
pub fn wkuie(&mut self) -> WKUIE_W<IERrs> {
WKUIE_W::new(self, 16)
}
#[inline(always)]
#[must_use]
pub fn slkie(&mut self) -> SLKIE_W<IERrs> {
SLKIE_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;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
impl crate::Resettable for IERrs {
const RESET_VALUE: u32 = 0;
}