#[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::SHORTS {
#[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 `LASTTX_STARTRX`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTTX_STARTRXR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_STARTRXR {
#[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 {
LASTTX_STARTRXR::DISABLED => false,
LASTTX_STARTRXR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTTX_STARTRXR {
match value {
false => LASTTX_STARTRXR::DISABLED,
true => LASTTX_STARTRXR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTTX_STARTRXR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTTX_STARTRXR::ENABLED
}
}
#[doc = "Possible values of the field `LASTTX_SUSPEND`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTTX_SUSPENDR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_SUSPENDR {
#[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 {
LASTTX_SUSPENDR::DISABLED => false,
LASTTX_SUSPENDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTTX_SUSPENDR {
match value {
false => LASTTX_SUSPENDR::DISABLED,
true => LASTTX_SUSPENDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTTX_SUSPENDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTTX_SUSPENDR::ENABLED
}
}
#[doc = "Possible values of the field `LASTTX_STOP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTTX_STOPR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_STOPR {
#[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 {
LASTTX_STOPR::DISABLED => false,
LASTTX_STOPR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTTX_STOPR {
match value {
false => LASTTX_STOPR::DISABLED,
true => LASTTX_STOPR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTTX_STOPR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTTX_STOPR::ENABLED
}
}
#[doc = "Possible values of the field `LASTRX_STARTTX`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTRX_STARTTXR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_STARTTXR {
#[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 {
LASTRX_STARTTXR::DISABLED => false,
LASTRX_STARTTXR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTRX_STARTTXR {
match value {
false => LASTRX_STARTTXR::DISABLED,
true => LASTRX_STARTTXR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTRX_STARTTXR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTRX_STARTTXR::ENABLED
}
}
#[doc = "Possible values of the field `LASTRX_SUSPEND`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTRX_SUSPENDR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_SUSPENDR {
#[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 {
LASTRX_SUSPENDR::DISABLED => false,
LASTRX_SUSPENDR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTRX_SUSPENDR {
match value {
false => LASTRX_SUSPENDR::DISABLED,
true => LASTRX_SUSPENDR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTRX_SUSPENDR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTRX_SUSPENDR::ENABLED
}
}
#[doc = "Possible values of the field `LASTRX_STOP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LASTRX_STOPR {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_STOPR {
#[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 {
LASTRX_STOPR::DISABLED => false,
LASTRX_STOPR::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> LASTRX_STOPR {
match value {
false => LASTRX_STOPR::DISABLED,
true => LASTRX_STOPR::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == LASTRX_STOPR::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == LASTRX_STOPR::ENABLED
}
}
#[doc = "Values that can be written to the field `LASTTX_STARTRX`"]
pub enum LASTTX_STARTRXW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_STARTRXW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTTX_STARTRXW::DISABLED => false,
LASTTX_STARTRXW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTTX_STARTRXW<'a> {
w: &'a mut W,
}
impl<'a> _LASTTX_STARTRXW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTTX_STARTRXW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTTX_STARTRXW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTTX_STARTRXW::ENABLED)
}
#[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 = 7;
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_SUSPEND`"]
pub enum LASTTX_SUSPENDW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_SUSPENDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTTX_SUSPENDW::DISABLED => false,
LASTTX_SUSPENDW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTTX_SUSPENDW<'a> {
w: &'a mut W,
}
impl<'a> _LASTTX_SUSPENDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTTX_SUSPENDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTTX_SUSPENDW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTTX_SUSPENDW::ENABLED)
}
#[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 = 8;
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_STOP`"]
pub enum LASTTX_STOPW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTTX_STOPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTTX_STOPW::DISABLED => false,
LASTTX_STOPW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTTX_STOPW<'a> {
w: &'a mut W,
}
impl<'a> _LASTTX_STOPW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTTX_STOPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTTX_STOPW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTTX_STOPW::ENABLED)
}
#[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 `LASTRX_STARTTX`"]
pub enum LASTRX_STARTTXW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_STARTTXW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTRX_STARTTXW::DISABLED => false,
LASTRX_STARTTXW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTRX_STARTTXW<'a> {
w: &'a mut W,
}
impl<'a> _LASTRX_STARTTXW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTRX_STARTTXW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTRX_STARTTXW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTRX_STARTTXW::ENABLED)
}
#[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 = 10;
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_SUSPEND`"]
pub enum LASTRX_SUSPENDW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_SUSPENDW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTRX_SUSPENDW::DISABLED => false,
LASTRX_SUSPENDW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTRX_SUSPENDW<'a> {
w: &'a mut W,
}
impl<'a> _LASTRX_SUSPENDW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTRX_SUSPENDW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTRX_SUSPENDW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTRX_SUSPENDW::ENABLED)
}
#[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 = 11;
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_STOP`"]
pub enum LASTRX_STOPW {
#[doc = "Disable shortcut"]
DISABLED,
#[doc = "Enable shortcut"]
ENABLED,
}
impl LASTRX_STOPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
LASTRX_STOPW::DISABLED => false,
LASTRX_STOPW::ENABLED => true,
}
}
}
#[doc = r" Proxy"]
pub struct _LASTRX_STOPW<'a> {
w: &'a mut W,
}
impl<'a> _LASTRX_STOPW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: LASTRX_STOPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable shortcut"]
#[inline]
pub fn disabled(self) -> &'a mut W {
self.variant(LASTRX_STOPW::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline]
pub fn enabled(self) -> &'a mut W {
self.variant(LASTRX_STOPW::ENABLED)
}
#[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 = 12;
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 7 - Shortcut between event LASTTX and task STARTRX"]
#[inline]
pub fn lasttx_startrx(&self) -> LASTTX_STARTRXR {
LASTTX_STARTRXR::_from({
const MASK: bool = true;
const OFFSET: u8 = 7;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"]
#[inline]
pub fn lasttx_suspend(&self) -> LASTTX_SUSPENDR {
LASTTX_SUSPENDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"]
#[inline]
pub fn lasttx_stop(&self) -> LASTTX_STOPR {
LASTTX_STOPR::_from({
const MASK: bool = true;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"]
#[inline]
pub fn lastrx_starttx(&self) -> LASTRX_STARTTXR {
LASTRX_STARTTXR::_from({
const MASK: bool = true;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 11 - Shortcut between event LASTRX and task SUSPEND"]
#[inline]
pub fn lastrx_suspend(&self) -> LASTRX_SUSPENDR {
LASTRX_SUSPENDR::_from({
const MASK: bool = true;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"]
#[inline]
pub fn lastrx_stop(&self) -> LASTRX_STOPR {
LASTRX_STOPR::_from({
const MASK: bool = true;
const OFFSET: u8 = 12;
((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 7 - Shortcut between event LASTTX and task STARTRX"]
#[inline]
pub fn lasttx_startrx(&mut self) -> _LASTTX_STARTRXW {
_LASTTX_STARTRXW { w: self }
}
#[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"]
#[inline]
pub fn lasttx_suspend(&mut self) -> _LASTTX_SUSPENDW {
_LASTTX_SUSPENDW { w: self }
}
#[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"]
#[inline]
pub fn lasttx_stop(&mut self) -> _LASTTX_STOPW {
_LASTTX_STOPW { w: self }
}
#[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"]
#[inline]
pub fn lastrx_starttx(&mut self) -> _LASTRX_STARTTXW {
_LASTRX_STARTTXW { w: self }
}
#[doc = "Bit 11 - Shortcut between event LASTRX and task SUSPEND"]
#[inline]
pub fn lastrx_suspend(&mut self) -> _LASTRX_SUSPENDW {
_LASTRX_SUSPENDW { w: self }
}
#[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"]
#[inline]
pub fn lastrx_stop(&mut self) -> _LASTRX_STOPW {
_LASTRX_STOPW { w: self }
}
}