pub type R = crate::R<RX_ORDSETRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum RXORDSET {
Sop = 0,
Sopprime = 1,
SopdoublePrime = 2,
SopprimeDebug = 3,
SopdoublePrimeDebug = 4,
CableReset = 5,
Sopextension1 = 6,
Sopextension2 = 7,
}
impl From<RXORDSET> for u8 {
#[inline(always)]
fn from(variant: RXORDSET) -> Self {
variant as _
}
}
impl crate::FieldSpec for RXORDSET {
type Ux = u8;
}
impl crate::IsEnum for RXORDSET {}
pub type RXORDSET_R = crate::FieldReader<RXORDSET>;
impl RXORDSET_R {
#[inline(always)]
pub const fn variant(&self) -> RXORDSET {
match self.bits {
0 => RXORDSET::Sop,
1 => RXORDSET::Sopprime,
2 => RXORDSET::SopdoublePrime,
3 => RXORDSET::SopprimeDebug,
4 => RXORDSET::SopdoublePrimeDebug,
5 => RXORDSET::CableReset,
6 => RXORDSET::Sopextension1,
7 => RXORDSET::Sopextension2,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_sop(&self) -> bool {
*self == RXORDSET::Sop
}
#[inline(always)]
pub fn is_sopprime(&self) -> bool {
*self == RXORDSET::Sopprime
}
#[inline(always)]
pub fn is_sopdouble_prime(&self) -> bool {
*self == RXORDSET::SopdoublePrime
}
#[inline(always)]
pub fn is_sopprime_debug(&self) -> bool {
*self == RXORDSET::SopprimeDebug
}
#[inline(always)]
pub fn is_sopdouble_prime_debug(&self) -> bool {
*self == RXORDSET::SopdoublePrimeDebug
}
#[inline(always)]
pub fn is_cable_reset(&self) -> bool {
*self == RXORDSET::CableReset
}
#[inline(always)]
pub fn is_sopextension1(&self) -> bool {
*self == RXORDSET::Sopextension1
}
#[inline(always)]
pub fn is_sopextension2(&self) -> bool {
*self == RXORDSET::Sopextension2
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXSOP3OF4 {
AllCorrect = 0,
OneIncorrect = 1,
}
impl From<RXSOP3OF4> for bool {
#[inline(always)]
fn from(variant: RXSOP3OF4) -> Self {
variant as u8 != 0
}
}
pub type RXSOP3OF4_R = crate::BitReader<RXSOP3OF4>;
impl RXSOP3OF4_R {
#[inline(always)]
pub const fn variant(&self) -> RXSOP3OF4 {
match self.bits {
false => RXSOP3OF4::AllCorrect,
true => RXSOP3OF4::OneIncorrect,
}
}
#[inline(always)]
pub fn is_all_correct(&self) -> bool {
*self == RXSOP3OF4::AllCorrect
}
#[inline(always)]
pub fn is_one_incorrect(&self) -> bool {
*self == RXSOP3OF4::OneIncorrect
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum RXSOPKINVALID {
Valid = 0,
FirstCorrupted = 1,
SecondCorrupted = 2,
ThirdCorrupted = 3,
FourthCorrupted = 4,
}
impl From<RXSOPKINVALID> for u8 {
#[inline(always)]
fn from(variant: RXSOPKINVALID) -> Self {
variant as _
}
}
impl crate::FieldSpec for RXSOPKINVALID {
type Ux = u8;
}
impl crate::IsEnum for RXSOPKINVALID {}
pub type RXSOPKINVALID_R = crate::FieldReader<RXSOPKINVALID>;
impl RXSOPKINVALID_R {
#[inline(always)]
pub const fn variant(&self) -> Option<RXSOPKINVALID> {
match self.bits {
0 => Some(RXSOPKINVALID::Valid),
1 => Some(RXSOPKINVALID::FirstCorrupted),
2 => Some(RXSOPKINVALID::SecondCorrupted),
3 => Some(RXSOPKINVALID::ThirdCorrupted),
4 => Some(RXSOPKINVALID::FourthCorrupted),
_ => None,
}
}
#[inline(always)]
pub fn is_valid(&self) -> bool {
*self == RXSOPKINVALID::Valid
}
#[inline(always)]
pub fn is_first_corrupted(&self) -> bool {
*self == RXSOPKINVALID::FirstCorrupted
}
#[inline(always)]
pub fn is_second_corrupted(&self) -> bool {
*self == RXSOPKINVALID::SecondCorrupted
}
#[inline(always)]
pub fn is_third_corrupted(&self) -> bool {
*self == RXSOPKINVALID::ThirdCorrupted
}
#[inline(always)]
pub fn is_fourth_corrupted(&self) -> bool {
*self == RXSOPKINVALID::FourthCorrupted
}
}
impl R {
#[inline(always)]
pub fn rxordset(&self) -> RXORDSET_R {
RXORDSET_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn rxsop3of4(&self) -> RXSOP3OF4_R {
RXSOP3OF4_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn rxsopkinvalid(&self) -> RXSOPKINVALID_R {
RXSOPKINVALID_R::new(((self.bits >> 4) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RX_ORDSETR")
.field("rxordset", &self.rxordset())
.field("rxsop3of4", &self.rxsop3of4())
.field("rxsopkinvalid", &self.rxsopkinvalid())
.finish()
}
}
pub struct RX_ORDSETRrs;
impl crate::RegisterSpec for RX_ORDSETRrs {
type Ux = u32;
}
impl crate::Readable for RX_ORDSETRrs {}
impl crate::Resettable for RX_ORDSETRrs {}