#[doc = "Register `INTEN` reader"]
pub struct R(crate::R<INTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<INTEN_SPEC>> for R {
fn from(reader: crate::R<INTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTEN` writer"]
pub struct W(crate::W<INTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl core::convert::From<crate::W<INTEN_SPEC>> for W {
fn from(writer: crate::W<INTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Sleep working interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLPWIE_A {
#[doc = "0: Sleep working interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Sleep working interrupt is enabled"]
ENABLED = 1,
}
impl From<SLPWIE_A> for bool {
#[inline(always)]
fn from(variant: SLPWIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLPWIE` reader - Sleep working interrupt enable"]
pub struct SLPWIE_R(crate::FieldReader<bool, SLPWIE_A>);
impl SLPWIE_R {
pub(crate) fn new(bits: bool) -> Self {
SLPWIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLPWIE_A {
match self.bits {
false => SLPWIE_A::DISABLED,
true => SLPWIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == SLPWIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == SLPWIE_A::ENABLED
}
}
impl core::ops::Deref for SLPWIE_R {
type Target = crate::FieldReader<bool, SLPWIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SLPWIE` writer - Sleep working interrupt enable"]
pub struct SLPWIE_W<'a> {
w: &'a mut W,
}
impl<'a> SLPWIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SLPWIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Sleep working interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SLPWIE_A::DISABLED)
}
#[doc = "Sleep working interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SLPWIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
self.w
}
}
#[doc = "Wakeup interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WIE_A {
#[doc = "0: Wakeup interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Wakeup interrupt is enabled"]
ENABLED = 1,
}
impl From<WIE_A> for bool {
#[inline(always)]
fn from(variant: WIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `WIE` reader - Wakeup interrupt enable"]
pub struct WIE_R(crate::FieldReader<bool, WIE_A>);
impl WIE_R {
pub(crate) fn new(bits: bool) -> Self {
WIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WIE_A {
match self.bits {
false => WIE_A::DISABLED,
true => WIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == WIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == WIE_A::ENABLED
}
}
impl core::ops::Deref for WIE_R {
type Target = crate::FieldReader<bool, WIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WIE` writer - Wakeup interrupt enable"]
pub struct WIE_W<'a> {
w: &'a mut W,
}
impl<'a> WIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Wakeup interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WIE_A::DISABLED)
}
#[doc = "Wakeup interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
self.w
}
}
#[doc = "Error interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERRIE_A {
#[doc = "0: Error interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Error interrupt is enabled"]
ENABLED = 1,
}
impl From<ERRIE_A> for bool {
#[inline(always)]
fn from(variant: ERRIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ERRIE` reader - Error interrupt enable"]
pub struct ERRIE_R(crate::FieldReader<bool, ERRIE_A>);
impl ERRIE_R {
pub(crate) fn new(bits: bool) -> Self {
ERRIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERRIE_A {
match self.bits {
false => ERRIE_A::DISABLED,
true => ERRIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == ERRIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == ERRIE_A::ENABLED
}
}
impl core::ops::Deref for ERRIE_R {
type Target = crate::FieldReader<bool, ERRIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ERRIE` writer - Error interrupt enable"]
pub struct ERRIE_W<'a> {
w: &'a mut W,
}
impl<'a> ERRIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ERRIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Error interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ERRIE_A::DISABLED)
}
#[doc = "Error interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ERRIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Error number interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERRNIE_A {
#[doc = "0: Error number interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Error number interrupt is enabled"]
ENABLED = 1,
}
impl From<ERRNIE_A> for bool {
#[inline(always)]
fn from(variant: ERRNIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ERRNIE` reader - Error number interrupt enable"]
pub struct ERRNIE_R(crate::FieldReader<bool, ERRNIE_A>);
impl ERRNIE_R {
pub(crate) fn new(bits: bool) -> Self {
ERRNIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERRNIE_A {
match self.bits {
false => ERRNIE_A::DISABLED,
true => ERRNIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == ERRNIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == ERRNIE_A::ENABLED
}
}
impl core::ops::Deref for ERRNIE_R {
type Target = crate::FieldReader<bool, ERRNIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `ERRNIE` writer - Error number interrupt enable"]
pub struct ERRNIE_W<'a> {
w: &'a mut W,
}
impl<'a> ERRNIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ERRNIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Error number interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ERRNIE_A::DISABLED)
}
#[doc = "Error number interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ERRNIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Bus-off interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BOIE_A {
#[doc = "0: Bus-off interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Bus-off interrupt is enabled"]
ENABLED = 1,
}
impl From<BOIE_A> for bool {
#[inline(always)]
fn from(variant: BOIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `BOIE` reader - Bus-off interrupt enable"]
pub struct BOIE_R(crate::FieldReader<bool, BOIE_A>);
impl BOIE_R {
pub(crate) fn new(bits: bool) -> Self {
BOIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BOIE_A {
match self.bits {
false => BOIE_A::DISABLED,
true => BOIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == BOIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == BOIE_A::ENABLED
}
}
impl core::ops::Deref for BOIE_R {
type Target = crate::FieldReader<bool, BOIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BOIE` writer - Bus-off interrupt enable"]
pub struct BOIE_W<'a> {
w: &'a mut W,
}
impl<'a> BOIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: BOIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Bus-off interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(BOIE_A::DISABLED)
}
#[doc = "Bus-off interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(BOIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Passive error interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PERRIE_A {
#[doc = "0: Passive error interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Passive error interrupt is enabled"]
ENABLED = 1,
}
impl From<PERRIE_A> for bool {
#[inline(always)]
fn from(variant: PERRIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PERRIE` reader - Passive error interrupt enable"]
pub struct PERRIE_R(crate::FieldReader<bool, PERRIE_A>);
impl PERRIE_R {
pub(crate) fn new(bits: bool) -> Self {
PERRIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PERRIE_A {
match self.bits {
false => PERRIE_A::DISABLED,
true => PERRIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == PERRIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == PERRIE_A::ENABLED
}
}
impl core::ops::Deref for PERRIE_R {
type Target = crate::FieldReader<bool, PERRIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PERRIE` writer - Passive error interrupt enable"]
pub struct PERRIE_W<'a> {
w: &'a mut W,
}
impl<'a> PERRIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PERRIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Passive error interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(PERRIE_A::DISABLED)
}
#[doc = "Passive error interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(PERRIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Warning error interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WERRIE_A {
#[doc = "0: Warning error interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Warning error interrupt is enabled"]
ENABLED = 1,
}
impl From<WERRIE_A> for bool {
#[inline(always)]
fn from(variant: WERRIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `WERRIE` reader - Warning error interrupt enable"]
pub struct WERRIE_R(crate::FieldReader<bool, WERRIE_A>);
impl WERRIE_R {
pub(crate) fn new(bits: bool) -> Self {
WERRIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WERRIE_A {
match self.bits {
false => WERRIE_A::DISABLED,
true => WERRIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == WERRIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == WERRIE_A::ENABLED
}
}
impl core::ops::Deref for WERRIE_R {
type Target = crate::FieldReader<bool, WERRIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WERRIE` writer - Warning error interrupt enable"]
pub struct WERRIE_W<'a> {
w: &'a mut W,
}
impl<'a> WERRIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WERRIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Warning error interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WERRIE_A::DISABLED)
}
#[doc = "Warning error interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WERRIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "Receive FIFO1 overfull interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RFOIE1_A {
#[doc = "0: Receive FIFO overfull interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Receive FIFO overfull interrupt is enabled"]
ENABLED = 1,
}
impl From<RFOIE1_A> for bool {
#[inline(always)]
fn from(variant: RFOIE1_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RFOIE1` reader - Receive FIFO1 overfull interrupt enable"]
pub struct RFOIE1_R(crate::FieldReader<bool, RFOIE1_A>);
impl RFOIE1_R {
pub(crate) fn new(bits: bool) -> Self {
RFOIE1_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RFOIE1_A {
match self.bits {
false => RFOIE1_A::DISABLED,
true => RFOIE1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RFOIE1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RFOIE1_A::ENABLED
}
}
impl core::ops::Deref for RFOIE1_R {
type Target = crate::FieldReader<bool, RFOIE1_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RFOIE1` writer - Receive FIFO1 overfull interrupt enable"]
pub struct RFOIE1_W<'a> {
w: &'a mut W,
}
impl<'a> RFOIE1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFOIE1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO overfull interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFOIE1_A::DISABLED)
}
#[doc = "Receive FIFO overfull interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFOIE1_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Receive FIFO1 full interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RFFIE1_A {
#[doc = "0: Receive FIFO full interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Receive FIFO full interrupt is enabled"]
ENABLED = 1,
}
impl From<RFFIE1_A> for bool {
#[inline(always)]
fn from(variant: RFFIE1_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RFFIE1` reader - Receive FIFO1 full interrupt enable"]
pub struct RFFIE1_R(crate::FieldReader<bool, RFFIE1_A>);
impl RFFIE1_R {
pub(crate) fn new(bits: bool) -> Self {
RFFIE1_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RFFIE1_A {
match self.bits {
false => RFFIE1_A::DISABLED,
true => RFFIE1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RFFIE1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RFFIE1_A::ENABLED
}
}
impl core::ops::Deref for RFFIE1_R {
type Target = crate::FieldReader<bool, RFFIE1_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RFFIE1` writer - Receive FIFO1 full interrupt enable"]
pub struct RFFIE1_W<'a> {
w: &'a mut W,
}
impl<'a> RFFIE1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFFIE1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO full interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFFIE1_A::DISABLED)
}
#[doc = "Receive FIFO full interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFFIE1_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Receive FIFO1 not empty interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RFNEIE1_A {
#[doc = "0: Receive FIFO not empty interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Receive FIFO not empty interrupt is enabled"]
ENABLED = 1,
}
impl From<RFNEIE1_A> for bool {
#[inline(always)]
fn from(variant: RFNEIE1_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RFNEIE1` reader - Receive FIFO1 not empty interrupt enable"]
pub struct RFNEIE1_R(crate::FieldReader<bool, RFNEIE1_A>);
impl RFNEIE1_R {
pub(crate) fn new(bits: bool) -> Self {
RFNEIE1_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RFNEIE1_A {
match self.bits {
false => RFNEIE1_A::DISABLED,
true => RFNEIE1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RFNEIE1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RFNEIE1_A::ENABLED
}
}
impl core::ops::Deref for RFNEIE1_R {
type Target = crate::FieldReader<bool, RFNEIE1_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RFNEIE1` writer - Receive FIFO1 not empty interrupt enable"]
pub struct RFNEIE1_W<'a> {
w: &'a mut W,
}
impl<'a> RFNEIE1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFNEIE1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO not empty interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFNEIE1_A::DISABLED)
}
#[doc = "Receive FIFO not empty interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFNEIE1_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Receive FIFO0 overfull interrupt enable"]
pub type RFOIE0_A = RFOIE1_A;
#[doc = "Field `RFOIE0` reader - Receive FIFO0 overfull interrupt enable"]
pub type RFOIE0_R = RFOIE1_R;
#[doc = "Field `RFOIE0` writer - Receive FIFO0 overfull interrupt enable"]
pub struct RFOIE0_W<'a> {
w: &'a mut W,
}
impl<'a> RFOIE0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFOIE0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO overfull interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFOIE0_A::DISABLED)
}
#[doc = "Receive FIFO overfull interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFOIE0_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Receive FIFO0 full interrupt enable"]
pub type RFFIE0_A = RFFIE1_A;
#[doc = "Field `RFFIE0` reader - Receive FIFO0 full interrupt enable"]
pub type RFFIE0_R = RFFIE1_R;
#[doc = "Field `RFFIE0` writer - Receive FIFO0 full interrupt enable"]
pub struct RFFIE0_W<'a> {
w: &'a mut W,
}
impl<'a> RFFIE0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFFIE0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO full interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFFIE0_A::DISABLED)
}
#[doc = "Receive FIFO full interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFFIE0_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Receive FIFO0 not empty interrupt enable"]
pub type RFNEIE0_A = RFNEIE1_A;
#[doc = "Field `RFNEIE0` reader - Receive FIFO0 not empty interrupt enable"]
pub type RFNEIE0_R = RFNEIE1_R;
#[doc = "Field `RFNEIE0` writer - Receive FIFO0 not empty interrupt enable"]
pub struct RFNEIE0_W<'a> {
w: &'a mut W,
}
impl<'a> RFNEIE0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RFNEIE0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Receive FIFO not empty interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RFNEIE0_A::DISABLED)
}
#[doc = "Receive FIFO not empty interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RFNEIE0_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Transmit mailbox empty interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TMEIE_A {
#[doc = "0: Transmit mailbox empty interrupt is disabled"]
DISABLED = 0,
#[doc = "1: Transmit mailbox empty interrupt is enabled"]
ENABLED = 1,
}
impl From<TMEIE_A> for bool {
#[inline(always)]
fn from(variant: TMEIE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TMEIE` reader - Transmit mailbox empty interrupt enable"]
pub struct TMEIE_R(crate::FieldReader<bool, TMEIE_A>);
impl TMEIE_R {
pub(crate) fn new(bits: bool) -> Self {
TMEIE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TMEIE_A {
match self.bits {
false => TMEIE_A::DISABLED,
true => TMEIE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == TMEIE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == TMEIE_A::ENABLED
}
}
impl core::ops::Deref for TMEIE_R {
type Target = crate::FieldReader<bool, TMEIE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TMEIE` writer - Transmit mailbox empty interrupt enable"]
pub struct TMEIE_W<'a> {
w: &'a mut W,
}
impl<'a> TMEIE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TMEIE_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Transmit mailbox empty interrupt is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TMEIE_A::DISABLED)
}
#[doc = "Transmit mailbox empty interrupt is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TMEIE_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
impl R {
#[doc = "Bit 17 - Sleep working interrupt enable"]
#[inline(always)]
pub fn slpwie(&self) -> SLPWIE_R {
SLPWIE_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 16 - Wakeup interrupt enable"]
#[inline(always)]
pub fn wie(&self) -> WIE_R {
WIE_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 15 - Error interrupt enable"]
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 11 - Error number interrupt enable"]
#[inline(always)]
pub fn errnie(&self) -> ERRNIE_R {
ERRNIE_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Bus-off interrupt enable"]
#[inline(always)]
pub fn boie(&self) -> BOIE_R {
BOIE_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Passive error interrupt enable"]
#[inline(always)]
pub fn perrie(&self) -> PERRIE_R {
PERRIE_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - Warning error interrupt enable"]
#[inline(always)]
pub fn werrie(&self) -> WERRIE_R {
WERRIE_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 6 - Receive FIFO1 overfull interrupt enable"]
#[inline(always)]
pub fn rfoie1(&self) -> RFOIE1_R {
RFOIE1_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Receive FIFO1 full interrupt enable"]
#[inline(always)]
pub fn rffie1(&self) -> RFFIE1_R {
RFFIE1_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Receive FIFO1 not empty interrupt enable"]
#[inline(always)]
pub fn rfneie1(&self) -> RFNEIE1_R {
RFNEIE1_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Receive FIFO0 overfull interrupt enable"]
#[inline(always)]
pub fn rfoie0(&self) -> RFOIE0_R {
RFOIE0_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Receive FIFO0 full interrupt enable"]
#[inline(always)]
pub fn rffie0(&self) -> RFFIE0_R {
RFFIE0_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Receive FIFO0 not empty interrupt enable"]
#[inline(always)]
pub fn rfneie0(&self) -> RFNEIE0_R {
RFNEIE0_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Transmit mailbox empty interrupt enable"]
#[inline(always)]
pub fn tmeie(&self) -> TMEIE_R {
TMEIE_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 17 - Sleep working interrupt enable"]
#[inline(always)]
pub fn slpwie(&mut self) -> SLPWIE_W {
SLPWIE_W { w: self }
}
#[doc = "Bit 16 - Wakeup interrupt enable"]
#[inline(always)]
pub fn wie(&mut self) -> WIE_W {
WIE_W { w: self }
}
#[doc = "Bit 15 - Error interrupt enable"]
#[inline(always)]
pub fn errie(&mut self) -> ERRIE_W {
ERRIE_W { w: self }
}
#[doc = "Bit 11 - Error number interrupt enable"]
#[inline(always)]
pub fn errnie(&mut self) -> ERRNIE_W {
ERRNIE_W { w: self }
}
#[doc = "Bit 10 - Bus-off interrupt enable"]
#[inline(always)]
pub fn boie(&mut self) -> BOIE_W {
BOIE_W { w: self }
}
#[doc = "Bit 9 - Passive error interrupt enable"]
#[inline(always)]
pub fn perrie(&mut self) -> PERRIE_W {
PERRIE_W { w: self }
}
#[doc = "Bit 8 - Warning error interrupt enable"]
#[inline(always)]
pub fn werrie(&mut self) -> WERRIE_W {
WERRIE_W { w: self }
}
#[doc = "Bit 6 - Receive FIFO1 overfull interrupt enable"]
#[inline(always)]
pub fn rfoie1(&mut self) -> RFOIE1_W {
RFOIE1_W { w: self }
}
#[doc = "Bit 5 - Receive FIFO1 full interrupt enable"]
#[inline(always)]
pub fn rffie1(&mut self) -> RFFIE1_W {
RFFIE1_W { w: self }
}
#[doc = "Bit 4 - Receive FIFO1 not empty interrupt enable"]
#[inline(always)]
pub fn rfneie1(&mut self) -> RFNEIE1_W {
RFNEIE1_W { w: self }
}
#[doc = "Bit 3 - Receive FIFO0 overfull interrupt enable"]
#[inline(always)]
pub fn rfoie0(&mut self) -> RFOIE0_W {
RFOIE0_W { w: self }
}
#[doc = "Bit 2 - Receive FIFO0 full interrupt enable"]
#[inline(always)]
pub fn rffie0(&mut self) -> RFFIE0_W {
RFFIE0_W { w: self }
}
#[doc = "Bit 1 - Receive FIFO0 not empty interrupt enable"]
#[inline(always)]
pub fn rfneie0(&mut self) -> RFNEIE0_W {
RFNEIE0_W { w: self }
}
#[doc = "Bit 0 - Transmit mailbox empty interrupt enable"]
#[inline(always)]
pub fn tmeie(&mut self) -> TMEIE_W {
TMEIE_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [inten](index.html) module"]
pub struct INTEN_SPEC;
impl crate::RegisterSpec for INTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [inten::R](R) reader structure"]
impl crate::Readable for INTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
impl crate::Writable for INTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTEN to value 0"]
impl crate::Resettable for INTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}