pub type R = crate::R<SRrs>;
pub type W = crate::W<SRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXIS {
NotRequired = 0,
Required = 1,
}
impl From<TXIS> for bool {
#[inline(always)]
fn from(variant: TXIS) -> Self {
variant as u8 != 0
}
}
pub type TXIS_R = crate::BitReader<TXIS>;
impl TXIS_R {
#[inline(always)]
pub const fn variant(&self) -> TXIS {
match self.bits {
false => TXIS::NotRequired,
true => TXIS::Required,
}
}
#[inline(always)]
pub fn is_not_required(&self) -> bool {
*self == TXIS::NotRequired
}
#[inline(always)]
pub fn is_required(&self) -> bool {
*self == TXIS::Required
}
}
pub type TXIS_W<'a, REG> = crate::BitWriter<'a, REG, TXIS>;
impl<'a, REG> TXIS_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_required(self) -> &'a mut crate::W<REG> {
self.variant(TXIS::NotRequired)
}
#[inline(always)]
pub fn required(self) -> &'a mut crate::W<REG> {
self.variant(TXIS::Required)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXMSGDISC {
NotDiscarded = 0,
Discarded = 1,
}
impl From<TXMSGDISC> for bool {
#[inline(always)]
fn from(variant: TXMSGDISC) -> Self {
variant as u8 != 0
}
}
pub type TXMSGDISC_R = crate::BitReader<TXMSGDISC>;
impl TXMSGDISC_R {
#[inline(always)]
pub const fn variant(&self) -> TXMSGDISC {
match self.bits {
false => TXMSGDISC::NotDiscarded,
true => TXMSGDISC::Discarded,
}
}
#[inline(always)]
pub fn is_not_discarded(&self) -> bool {
*self == TXMSGDISC::NotDiscarded
}
#[inline(always)]
pub fn is_discarded(&self) -> bool {
*self == TXMSGDISC::Discarded
}
}
pub type TXMSGDISC_W<'a, REG> = crate::BitWriter<'a, REG, TXMSGDISC>;
impl<'a, REG> TXMSGDISC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_discarded(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGDISC::NotDiscarded)
}
#[inline(always)]
pub fn discarded(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGDISC::Discarded)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXMSGSENT {
NotCompleted = 0,
Completed = 1,
}
impl From<TXMSGSENT> for bool {
#[inline(always)]
fn from(variant: TXMSGSENT) -> Self {
variant as u8 != 0
}
}
pub type TXMSGSENT_R = crate::BitReader<TXMSGSENT>;
impl TXMSGSENT_R {
#[inline(always)]
pub const fn variant(&self) -> TXMSGSENT {
match self.bits {
false => TXMSGSENT::NotCompleted,
true => TXMSGSENT::Completed,
}
}
#[inline(always)]
pub fn is_not_completed(&self) -> bool {
*self == TXMSGSENT::NotCompleted
}
#[inline(always)]
pub fn is_completed(&self) -> bool {
*self == TXMSGSENT::Completed
}
}
pub type TXMSGSENT_W<'a, REG> = crate::BitWriter<'a, REG, TXMSGSENT>;
impl<'a, REG> TXMSGSENT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_completed(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGSENT::NotCompleted)
}
#[inline(always)]
pub fn completed(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGSENT::Completed)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXMSGABT {
NoAbort = 0,
Abort = 1,
}
impl From<TXMSGABT> for bool {
#[inline(always)]
fn from(variant: TXMSGABT) -> Self {
variant as u8 != 0
}
}
pub type TXMSGABT_R = crate::BitReader<TXMSGABT>;
impl TXMSGABT_R {
#[inline(always)]
pub const fn variant(&self) -> TXMSGABT {
match self.bits {
false => TXMSGABT::NoAbort,
true => TXMSGABT::Abort,
}
}
#[inline(always)]
pub fn is_no_abort(&self) -> bool {
*self == TXMSGABT::NoAbort
}
#[inline(always)]
pub fn is_abort(&self) -> bool {
*self == TXMSGABT::Abort
}
}
pub type TXMSGABT_W<'a, REG> = crate::BitWriter<'a, REG, TXMSGABT>;
impl<'a, REG> TXMSGABT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_abort(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGABT::NoAbort)
}
#[inline(always)]
pub fn abort(self) -> &'a mut crate::W<REG> {
self.variant(TXMSGABT::Abort)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HRSTDISC {
NotDiscarded = 0,
Discarded = 1,
}
impl From<HRSTDISC> for bool {
#[inline(always)]
fn from(variant: HRSTDISC) -> Self {
variant as u8 != 0
}
}
pub type HRSTDISC_R = crate::BitReader<HRSTDISC>;
impl HRSTDISC_R {
#[inline(always)]
pub const fn variant(&self) -> HRSTDISC {
match self.bits {
false => HRSTDISC::NotDiscarded,
true => HRSTDISC::Discarded,
}
}
#[inline(always)]
pub fn is_not_discarded(&self) -> bool {
*self == HRSTDISC::NotDiscarded
}
#[inline(always)]
pub fn is_discarded(&self) -> bool {
*self == HRSTDISC::Discarded
}
}
pub type HRSTDISC_W<'a, REG> = crate::BitWriter<'a, REG, HRSTDISC>;
impl<'a, REG> HRSTDISC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_discarded(self) -> &'a mut crate::W<REG> {
self.variant(HRSTDISC::NotDiscarded)
}
#[inline(always)]
pub fn discarded(self) -> &'a mut crate::W<REG> {
self.variant(HRSTDISC::Discarded)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HRSTSENT {
NotSent = 0,
Sent = 1,
}
impl From<HRSTSENT> for bool {
#[inline(always)]
fn from(variant: HRSTSENT) -> Self {
variant as u8 != 0
}
}
pub type HRSTSENT_R = crate::BitReader<HRSTSENT>;
impl HRSTSENT_R {
#[inline(always)]
pub const fn variant(&self) -> HRSTSENT {
match self.bits {
false => HRSTSENT::NotSent,
true => HRSTSENT::Sent,
}
}
#[inline(always)]
pub fn is_not_sent(&self) -> bool {
*self == HRSTSENT::NotSent
}
#[inline(always)]
pub fn is_sent(&self) -> bool {
*self == HRSTSENT::Sent
}
}
pub type HRSTSENT_W<'a, REG> = crate::BitWriter<'a, REG, HRSTSENT>;
impl<'a, REG> HRSTSENT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_sent(self) -> &'a mut crate::W<REG> {
self.variant(HRSTSENT::NotSent)
}
#[inline(always)]
pub fn sent(self) -> &'a mut crate::W<REG> {
self.variant(HRSTSENT::Sent)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXUND {
NoUnderrun = 0,
Underrun = 1,
}
impl From<TXUND> for bool {
#[inline(always)]
fn from(variant: TXUND) -> Self {
variant as u8 != 0
}
}
pub type TXUND_R = crate::BitReader<TXUND>;
impl TXUND_R {
#[inline(always)]
pub const fn variant(&self) -> TXUND {
match self.bits {
false => TXUND::NoUnderrun,
true => TXUND::Underrun,
}
}
#[inline(always)]
pub fn is_no_underrun(&self) -> bool {
*self == TXUND::NoUnderrun
}
#[inline(always)]
pub fn is_underrun(&self) -> bool {
*self == TXUND::Underrun
}
}
pub type TXUND_W<'a, REG> = crate::BitWriter<'a, REG, TXUND>;
impl<'a, REG> TXUND_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_underrun(self) -> &'a mut crate::W<REG> {
self.variant(TXUND::NoUnderrun)
}
#[inline(always)]
pub fn underrun(self) -> &'a mut crate::W<REG> {
self.variant(TXUND::Underrun)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXNE {
Empty = 0,
NotEmpty = 1,
}
impl From<RXNE> for bool {
#[inline(always)]
fn from(variant: RXNE) -> Self {
variant as u8 != 0
}
}
pub type RXNE_R = crate::BitReader<RXNE>;
impl RXNE_R {
#[inline(always)]
pub const fn variant(&self) -> RXNE {
match self.bits {
false => RXNE::Empty,
true => RXNE::NotEmpty,
}
}
#[inline(always)]
pub fn is_empty(&self) -> bool {
*self == RXNE::Empty
}
#[inline(always)]
pub fn is_not_empty(&self) -> bool {
*self == RXNE::NotEmpty
}
}
pub type RXNE_W<'a, REG> = crate::BitWriter<'a, REG, RXNE>;
impl<'a, REG> RXNE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn empty(self) -> &'a mut crate::W<REG> {
self.variant(RXNE::Empty)
}
#[inline(always)]
pub fn not_empty(self) -> &'a mut crate::W<REG> {
self.variant(RXNE::NotEmpty)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXORDDET {
NoOrderedSet = 0,
OrderedSet = 1,
}
impl From<RXORDDET> for bool {
#[inline(always)]
fn from(variant: RXORDDET) -> Self {
variant as u8 != 0
}
}
pub type RXORDDET_R = crate::BitReader<RXORDDET>;
impl RXORDDET_R {
#[inline(always)]
pub const fn variant(&self) -> RXORDDET {
match self.bits {
false => RXORDDET::NoOrderedSet,
true => RXORDDET::OrderedSet,
}
}
#[inline(always)]
pub fn is_no_ordered_set(&self) -> bool {
*self == RXORDDET::NoOrderedSet
}
#[inline(always)]
pub fn is_ordered_set(&self) -> bool {
*self == RXORDDET::OrderedSet
}
}
pub type RXORDDET_W<'a, REG> = crate::BitWriter<'a, REG, RXORDDET>;
impl<'a, REG> RXORDDET_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_ordered_set(self) -> &'a mut crate::W<REG> {
self.variant(RXORDDET::NoOrderedSet)
}
#[inline(always)]
pub fn ordered_set(self) -> &'a mut crate::W<REG> {
self.variant(RXORDDET::OrderedSet)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXHRSTDET {
NoHardReset = 0,
HardReset = 1,
}
impl From<RXHRSTDET> for bool {
#[inline(always)]
fn from(variant: RXHRSTDET) -> Self {
variant as u8 != 0
}
}
pub type RXHRSTDET_R = crate::BitReader<RXHRSTDET>;
impl RXHRSTDET_R {
#[inline(always)]
pub const fn variant(&self) -> RXHRSTDET {
match self.bits {
false => RXHRSTDET::NoHardReset,
true => RXHRSTDET::HardReset,
}
}
#[inline(always)]
pub fn is_no_hard_reset(&self) -> bool {
*self == RXHRSTDET::NoHardReset
}
#[inline(always)]
pub fn is_hard_reset(&self) -> bool {
*self == RXHRSTDET::HardReset
}
}
pub type RXHRSTDET_W<'a, REG> = crate::BitWriter<'a, REG, RXHRSTDET>;
impl<'a, REG> RXHRSTDET_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_hard_reset(self) -> &'a mut crate::W<REG> {
self.variant(RXHRSTDET::NoHardReset)
}
#[inline(always)]
pub fn hard_reset(self) -> &'a mut crate::W<REG> {
self.variant(RXHRSTDET::HardReset)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXOVR {
NoOverflow = 0,
Overflow = 1,
}
impl From<RXOVR> for bool {
#[inline(always)]
fn from(variant: RXOVR) -> Self {
variant as u8 != 0
}
}
pub type RXOVR_R = crate::BitReader<RXOVR>;
impl RXOVR_R {
#[inline(always)]
pub const fn variant(&self) -> RXOVR {
match self.bits {
false => RXOVR::NoOverflow,
true => RXOVR::Overflow,
}
}
#[inline(always)]
pub fn is_no_overflow(&self) -> bool {
*self == RXOVR::NoOverflow
}
#[inline(always)]
pub fn is_overflow(&self) -> bool {
*self == RXOVR::Overflow
}
}
pub type RXOVR_W<'a, REG> = crate::BitWriter<'a, REG, RXOVR>;
impl<'a, REG> RXOVR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_overflow(self) -> &'a mut crate::W<REG> {
self.variant(RXOVR::NoOverflow)
}
#[inline(always)]
pub fn overflow(self) -> &'a mut crate::W<REG> {
self.variant(RXOVR::Overflow)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXMSGEND {
NoNewMessage = 0,
NewMessage = 1,
}
impl From<RXMSGEND> for bool {
#[inline(always)]
fn from(variant: RXMSGEND) -> Self {
variant as u8 != 0
}
}
pub type RXMSGEND_R = crate::BitReader<RXMSGEND>;
impl RXMSGEND_R {
#[inline(always)]
pub const fn variant(&self) -> RXMSGEND {
match self.bits {
false => RXMSGEND::NoNewMessage,
true => RXMSGEND::NewMessage,
}
}
#[inline(always)]
pub fn is_no_new_message(&self) -> bool {
*self == RXMSGEND::NoNewMessage
}
#[inline(always)]
pub fn is_new_message(&self) -> bool {
*self == RXMSGEND::NewMessage
}
}
pub type RXMSGEND_W<'a, REG> = crate::BitWriter<'a, REG, RXMSGEND>;
impl<'a, REG> RXMSGEND_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_new_message(self) -> &'a mut crate::W<REG> {
self.variant(RXMSGEND::NoNewMessage)
}
#[inline(always)]
pub fn new_message(self) -> &'a mut crate::W<REG> {
self.variant(RXMSGEND::NewMessage)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXERR {
NoError = 0,
Error = 1,
}
impl From<RXERR> for bool {
#[inline(always)]
fn from(variant: RXERR) -> Self {
variant as u8 != 0
}
}
pub type RXERR_R = crate::BitReader<RXERR>;
impl RXERR_R {
#[inline(always)]
pub const fn variant(&self) -> RXERR {
match self.bits {
false => RXERR::NoError,
true => RXERR::Error,
}
}
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == RXERR::NoError
}
#[inline(always)]
pub fn is_error(&self) -> bool {
*self == RXERR::Error
}
}
pub type RXERR_W<'a, REG> = crate::BitWriter<'a, REG, RXERR>;
impl<'a, REG> RXERR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_error(self) -> &'a mut crate::W<REG> {
self.variant(RXERR::NoError)
}
#[inline(always)]
pub fn error(self) -> &'a mut crate::W<REG> {
self.variant(RXERR::Error)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TYPECEVT1 {
NoNewEvent = 0,
NewEvent = 1,
}
impl From<TYPECEVT1> for bool {
#[inline(always)]
fn from(variant: TYPECEVT1) -> Self {
variant as u8 != 0
}
}
pub type TYPECEVT1_R = crate::BitReader<TYPECEVT1>;
impl TYPECEVT1_R {
#[inline(always)]
pub const fn variant(&self) -> TYPECEVT1 {
match self.bits {
false => TYPECEVT1::NoNewEvent,
true => TYPECEVT1::NewEvent,
}
}
#[inline(always)]
pub fn is_no_new_event(&self) -> bool {
*self == TYPECEVT1::NoNewEvent
}
#[inline(always)]
pub fn is_new_event(&self) -> bool {
*self == TYPECEVT1::NewEvent
}
}
pub type TYPECEVT1_W<'a, REG> = crate::BitWriter<'a, REG, TYPECEVT1>;
impl<'a, REG> TYPECEVT1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_new_event(self) -> &'a mut crate::W<REG> {
self.variant(TYPECEVT1::NoNewEvent)
}
#[inline(always)]
pub fn new_event(self) -> &'a mut crate::W<REG> {
self.variant(TYPECEVT1::NewEvent)
}
}
pub use TYPECEVT1_R as TYPECEVT2_R;
pub use TYPECEVT1_W as TYPECEVT2_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum TYPEC_VSTATE_CC1 {
Lowest = 0,
Low = 1,
High = 2,
Highest = 3,
}
impl From<TYPEC_VSTATE_CC1> for u8 {
#[inline(always)]
fn from(variant: TYPEC_VSTATE_CC1) -> Self {
variant as _
}
}
impl crate::FieldSpec for TYPEC_VSTATE_CC1 {
type Ux = u8;
}
impl crate::IsEnum for TYPEC_VSTATE_CC1 {}
pub type TYPEC_VSTATE_CC1_R = crate::FieldReader<TYPEC_VSTATE_CC1>;
impl TYPEC_VSTATE_CC1_R {
#[inline(always)]
pub const fn variant(&self) -> TYPEC_VSTATE_CC1 {
match self.bits {
0 => TYPEC_VSTATE_CC1::Lowest,
1 => TYPEC_VSTATE_CC1::Low,
2 => TYPEC_VSTATE_CC1::High,
3 => TYPEC_VSTATE_CC1::Highest,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_lowest(&self) -> bool {
*self == TYPEC_VSTATE_CC1::Lowest
}
#[inline(always)]
pub fn is_low(&self) -> bool {
*self == TYPEC_VSTATE_CC1::Low
}
#[inline(always)]
pub fn is_high(&self) -> bool {
*self == TYPEC_VSTATE_CC1::High
}
#[inline(always)]
pub fn is_highest(&self) -> bool {
*self == TYPEC_VSTATE_CC1::Highest
}
}
pub type TYPEC_VSTATE_CC1_W<'a, REG> =
crate::FieldWriter<'a, REG, 2, TYPEC_VSTATE_CC1, crate::Safe>;
impl<'a, REG> TYPEC_VSTATE_CC1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn lowest(self) -> &'a mut crate::W<REG> {
self.variant(TYPEC_VSTATE_CC1::Lowest)
}
#[inline(always)]
pub fn low(self) -> &'a mut crate::W<REG> {
self.variant(TYPEC_VSTATE_CC1::Low)
}
#[inline(always)]
pub fn high(self) -> &'a mut crate::W<REG> {
self.variant(TYPEC_VSTATE_CC1::High)
}
#[inline(always)]
pub fn highest(self) -> &'a mut crate::W<REG> {
self.variant(TYPEC_VSTATE_CC1::Highest)
}
}
pub use TYPEC_VSTATE_CC1_R as TYPEC_VSTATE_CC2_R;
pub use TYPEC_VSTATE_CC1_W as TYPEC_VSTATE_CC2_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FRSEVT {
NoNewEvent = 0,
NewEvent = 1,
}
impl From<FRSEVT> for bool {
#[inline(always)]
fn from(variant: FRSEVT) -> Self {
variant as u8 != 0
}
}
pub type FRSEVT_R = crate::BitReader<FRSEVT>;
impl FRSEVT_R {
#[inline(always)]
pub const fn variant(&self) -> FRSEVT {
match self.bits {
false => FRSEVT::NoNewEvent,
true => FRSEVT::NewEvent,
}
}
#[inline(always)]
pub fn is_no_new_event(&self) -> bool {
*self == FRSEVT::NoNewEvent
}
#[inline(always)]
pub fn is_new_event(&self) -> bool {
*self == FRSEVT::NewEvent
}
}
pub type FRSEVT_W<'a, REG> = crate::BitWriter<'a, REG, FRSEVT>;
impl<'a, REG> FRSEVT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn no_new_event(self) -> &'a mut crate::W<REG> {
self.variant(FRSEVT::NoNewEvent)
}
#[inline(always)]
pub fn new_event(self) -> &'a mut crate::W<REG> {
self.variant(FRSEVT::NewEvent)
}
}
impl R {
#[inline(always)]
pub fn txis(&self) -> TXIS_R {
TXIS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txmsgdisc(&self) -> TXMSGDISC_R {
TXMSGDISC_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn txmsgsent(&self) -> TXMSGSENT_R {
TXMSGSENT_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn txmsgabt(&self) -> TXMSGABT_R {
TXMSGABT_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn hrstdisc(&self) -> HRSTDISC_R {
HRSTDISC_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn hrstsent(&self) -> HRSTSENT_R {
HRSTSENT_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn txund(&self) -> TXUND_R {
TXUND_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn rxne(&self) -> RXNE_R {
RXNE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn rxorddet(&self) -> RXORDDET_R {
RXORDDET_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn rxhrstdet(&self) -> RXHRSTDET_R {
RXHRSTDET_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rxovr(&self) -> RXOVR_R {
RXOVR_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rxmsgend(&self) -> RXMSGEND_R {
RXMSGEND_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn rxerr(&self) -> RXERR_R {
RXERR_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn typecevt1(&self) -> TYPECEVT1_R {
TYPECEVT1_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn typecevt2(&self) -> TYPECEVT2_R {
TYPECEVT2_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn typec_vstate_cc1(&self) -> TYPEC_VSTATE_CC1_R {
TYPEC_VSTATE_CC1_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn typec_vstate_cc2(&self) -> TYPEC_VSTATE_CC2_R {
TYPEC_VSTATE_CC2_R::new(((self.bits >> 18) & 3) as u8)
}
#[inline(always)]
pub fn frsevt(&self) -> FRSEVT_R {
FRSEVT_R::new(((self.bits >> 20) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("txis", &self.txis())
.field("txmsgdisc", &self.txmsgdisc())
.field("txmsgsent", &self.txmsgsent())
.field("txmsgabt", &self.txmsgabt())
.field("hrstdisc", &self.hrstdisc())
.field("hrstsent", &self.hrstsent())
.field("txund", &self.txund())
.field("rxne", &self.rxne())
.field("rxorddet", &self.rxorddet())
.field("rxhrstdet", &self.rxhrstdet())
.field("rxovr", &self.rxovr())
.field("rxmsgend", &self.rxmsgend())
.field("rxerr", &self.rxerr())
.field("typecevt1", &self.typecevt1())
.field("typecevt2", &self.typecevt2())
.field("typec_vstate_cc1", &self.typec_vstate_cc1())
.field("typec_vstate_cc2", &self.typec_vstate_cc2())
.field("frsevt", &self.frsevt())
.finish()
}
}
impl W {
#[inline(always)]
pub fn txis(&mut self) -> TXIS_W<SRrs> {
TXIS_W::new(self, 0)
}
#[inline(always)]
pub fn txmsgdisc(&mut self) -> TXMSGDISC_W<SRrs> {
TXMSGDISC_W::new(self, 1)
}
#[inline(always)]
pub fn txmsgsent(&mut self) -> TXMSGSENT_W<SRrs> {
TXMSGSENT_W::new(self, 2)
}
#[inline(always)]
pub fn txmsgabt(&mut self) -> TXMSGABT_W<SRrs> {
TXMSGABT_W::new(self, 3)
}
#[inline(always)]
pub fn hrstdisc(&mut self) -> HRSTDISC_W<SRrs> {
HRSTDISC_W::new(self, 4)
}
#[inline(always)]
pub fn hrstsent(&mut self) -> HRSTSENT_W<SRrs> {
HRSTSENT_W::new(self, 5)
}
#[inline(always)]
pub fn txund(&mut self) -> TXUND_W<SRrs> {
TXUND_W::new(self, 6)
}
#[inline(always)]
pub fn rxne(&mut self) -> RXNE_W<SRrs> {
RXNE_W::new(self, 8)
}
#[inline(always)]
pub fn rxorddet(&mut self) -> RXORDDET_W<SRrs> {
RXORDDET_W::new(self, 9)
}
#[inline(always)]
pub fn rxhrstdet(&mut self) -> RXHRSTDET_W<SRrs> {
RXHRSTDET_W::new(self, 10)
}
#[inline(always)]
pub fn rxovr(&mut self) -> RXOVR_W<SRrs> {
RXOVR_W::new(self, 11)
}
#[inline(always)]
pub fn rxmsgend(&mut self) -> RXMSGEND_W<SRrs> {
RXMSGEND_W::new(self, 12)
}
#[inline(always)]
pub fn rxerr(&mut self) -> RXERR_W<SRrs> {
RXERR_W::new(self, 13)
}
#[inline(always)]
pub fn typecevt1(&mut self) -> TYPECEVT1_W<SRrs> {
TYPECEVT1_W::new(self, 14)
}
#[inline(always)]
pub fn typecevt2(&mut self) -> TYPECEVT2_W<SRrs> {
TYPECEVT2_W::new(self, 15)
}
#[inline(always)]
pub fn typec_vstate_cc1(&mut self) -> TYPEC_VSTATE_CC1_W<SRrs> {
TYPEC_VSTATE_CC1_W::new(self, 16)
}
#[inline(always)]
pub fn typec_vstate_cc2(&mut self) -> TYPEC_VSTATE_CC2_W<SRrs> {
TYPEC_VSTATE_CC2_W::new(self, 18)
}
#[inline(always)]
pub fn frsevt(&mut self) -> FRSEVT_W<SRrs> {
FRSEVT_W::new(self, 20)
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u32;
}
impl crate::Readable for SRrs {}
impl crate::Writable for SRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SRrs {}