#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::INTENCLR {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = "Possible values of the field `STOPPED`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STOPPEDR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl STOPPEDR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
STOPPEDR::DISABLED => false,
STOPPEDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> STOPPEDR {
match value {
false => STOPPEDR::DISABLED,
true => STOPPEDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == STOPPEDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == STOPPEDR::ENABLED
}
}
#[doc = "Possible values of the field `ERROR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERRORR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl ERRORR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
ERRORR::DISABLED => false,
ERRORR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ERRORR {
match value {
false => ERRORR::DISABLED,
true => ERRORR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == ERRORR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == ERRORR::ENABLED
}
}
#[doc = "Possible values of the field `SUSPENDED`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SUSPENDEDR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl SUSPENDEDR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
SUSPENDEDR::DISABLED => false,
SUSPENDEDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> SUSPENDEDR {
match value {
false => SUSPENDEDR::DISABLED,
true => SUSPENDEDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == SUSPENDEDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == SUSPENDEDR::ENABLED
}
}
#[doc = "Possible values of the field `RXSTARTED`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTEDR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl RXSTARTEDR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
RXSTARTEDR::DISABLED => false,
RXSTARTEDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> RXSTARTEDR {
match value {
false => RXSTARTEDR::DISABLED,
true => RXSTARTEDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == RXSTARTEDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == RXSTARTEDR::ENABLED
}
}
#[doc = "Possible values of the field `TXSTARTED`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTEDR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl TXSTARTEDR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
TXSTARTEDR::DISABLED => false,
TXSTARTEDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> TXSTARTEDR {
match value {
false => TXSTARTEDR::DISABLED,
true => TXSTARTEDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == TXSTARTEDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == TXSTARTEDR::ENABLED
}
}
#[doc = "Possible values of the field `LASTRX`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTRXR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl LASTRXR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
LASTRXR::DISABLED => false,
LASTRXR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTRXR {
match value {
false => LASTRXR::DISABLED,
true => LASTRXR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTRXR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTRXR::ENABLED
}
}
#[doc = "Possible values of the field `LASTTX`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTTXR {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl LASTTXR {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
LASTTXR::DISABLED => false,
LASTTXR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTTXR {
match value {
false => LASTTXR::DISABLED,
true => LASTTXR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTTXR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTTXR::ENABLED
}
}
#[doc = "Values that can be written to the field `STOPPED`"]
pub enum STOPPEDW {
#[doc = "Disable"]
CLEAR,
}
impl STOPPEDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
STOPPEDW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _STOPPEDW<'a> {
w: &'a mut W,
}
impl<'a> _STOPPEDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: STOPPEDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(STOPPEDW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 1;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `ERROR`"]
pub enum ERRORW {
#[doc = "Disable"]
CLEAR,
}
impl ERRORW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
ERRORW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _ERRORW<'a> {
w: &'a mut W,
}
impl<'a> _ERRORW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: ERRORW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(ERRORW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 9;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `SUSPENDED`"]
pub enum SUSPENDEDW {
#[doc = "Disable"]
CLEAR,
}
impl SUSPENDEDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
SUSPENDEDW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _SUSPENDEDW<'a> {
w: &'a mut W,
}
impl<'a> _SUSPENDEDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: SUSPENDEDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(SUSPENDEDW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 18;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `RXSTARTED`"]
pub enum RXSTARTEDW {
#[doc = "Disable"]
CLEAR,
}
impl RXSTARTEDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
RXSTARTEDW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _RXSTARTEDW<'a> {
w: &'a mut W,
}
impl<'a> _RXSTARTEDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: RXSTARTEDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(RXSTARTEDW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 19;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `TXSTARTED`"]
pub enum TXSTARTEDW {
#[doc = "Disable"]
CLEAR,
}
impl TXSTARTEDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
TXSTARTEDW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _TXSTARTEDW<'a> {
w: &'a mut W,
}
impl<'a> _TXSTARTEDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: TXSTARTEDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(TXSTARTEDW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `LASTRX`"]
pub enum LASTRXW {
#[doc = "Disable"]
CLEAR,
}
impl LASTRXW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTRXW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTRXW<'a> {
w: &'a mut W,
}
impl<'a> _LASTRXW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTRXW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(LASTRXW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 23;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `LASTTX`"]
pub enum LASTTXW {
#[doc = "Disable"]
CLEAR,
}
impl LASTTXW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTTXW::CLEAR => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTTXW<'a> {
w: &'a mut W,
}
impl<'a> _LASTTXW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTTXW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable"]
#[inline]
pub fn clear(self) -> &'a mut W {
self.variant(LASTTXW::CLEAR)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"]
#[inline]
pub fn stopped(&self) -> STOPPEDR {
STOPPEDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
#[inline]
pub fn error(&self) -> ERRORR {
ERRORR::_from({
const MASK: bool = true;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"]
#[inline]
pub fn suspended(&self) -> SUSPENDEDR {
SUSPENDEDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"]
#[inline]
pub fn rxstarted(&self) -> RXSTARTEDR {
RXSTARTEDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"]
#[inline]
pub fn txstarted(&self) -> TXSTARTEDR {
TXSTARTEDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"]
#[inline]
pub fn lastrx(&self) -> LASTRXR {
LASTRXR::_from({
const MASK: bool = true;
const OFFSET: u8 = 23;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"]
#[inline]
pub fn lasttx(&self) -> LASTTXR {
LASTTXR::_from({
const MASK: bool = true;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"]
#[inline]
pub fn stopped(&mut self) -> _STOPPEDW {
_STOPPEDW { w: self }
}
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
#[inline]
pub fn error(&mut self) -> _ERRORW {
_ERRORW { w: self }
}
#[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"]
#[inline]
pub fn suspended(&mut self) -> _SUSPENDEDW {
_SUSPENDEDW { w: self }
}
#[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"]
#[inline]
pub fn rxstarted(&mut self) -> _RXSTARTEDW {
_RXSTARTEDW { w: self }
}
#[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"]
#[inline]
pub fn txstarted(&mut self) -> _TXSTARTEDW {
_TXSTARTEDW { w: self }
}
#[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"]
#[inline]
pub fn lastrx(&mut self) -> _LASTRXW {
_LASTRXW { w: self }
}
#[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"]
#[inline]
pub fn lasttx(&mut self) -> _LASTTXW {
_LASTTXW { w: self }
}
}