pub type R = crate::R<FNRrs>;
pub type FN_R = crate::FieldReader<u16>;
pub type LSOF_R = crate::FieldReader;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LCK {
Locked = 1,
}
impl From<LCK> for bool {
#[inline(always)]
fn from(variant: LCK) -> Self {
variant as u8 != 0
}
}
pub type LCK_R = crate::BitReader<LCK>;
impl LCK_R {
#[inline(always)]
pub const fn variant(&self) -> Option<LCK> {
match self.bits {
true => Some(LCK::Locked),
_ => None,
}
}
#[inline(always)]
pub fn is_locked(&self) -> bool {
*self == LCK::Locked
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXDM {
Received = 1,
}
impl From<RXDM> for bool {
#[inline(always)]
fn from(variant: RXDM) -> Self {
variant as u8 != 0
}
}
pub type RXDM_R = crate::BitReader<RXDM>;
impl RXDM_R {
#[inline(always)]
pub const fn variant(&self) -> Option<RXDM> {
match self.bits {
true => Some(RXDM::Received),
_ => None,
}
}
#[inline(always)]
pub fn is_received(&self) -> bool {
*self == RXDM::Received
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXDP {
Received = 1,
}
impl From<RXDP> for bool {
#[inline(always)]
fn from(variant: RXDP) -> Self {
variant as u8 != 0
}
}
pub type RXDP_R = crate::BitReader<RXDP>;
impl RXDP_R {
#[inline(always)]
pub const fn variant(&self) -> Option<RXDP> {
match self.bits {
true => Some(RXDP::Received),
_ => None,
}
}
#[inline(always)]
pub fn is_received(&self) -> bool {
*self == RXDP::Received
}
}
impl R {
#[inline(always)]
pub fn fn_(&self) -> FN_R {
FN_R::new((self.bits & 0x07ff) as u16)
}
#[inline(always)]
pub fn lsof(&self) -> LSOF_R {
LSOF_R::new(((self.bits >> 11) & 3) as u8)
}
#[inline(always)]
pub fn lck(&self) -> LCK_R {
LCK_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn rxdm(&self) -> RXDM_R {
RXDM_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn rxdp(&self) -> RXDP_R {
RXDP_R::new(((self.bits >> 15) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FNR")
.field("fn_", &self.fn_())
.field("lsof", &self.lsof())
.field("lck", &self.lck())
.field("rxdm", &self.rxdm())
.field("rxdp", &self.rxdp())
.finish()
}
}
pub struct FNRrs;
impl crate::RegisterSpec for FNRrs {
type Ux = u32;
}
impl crate::Readable for FNRrs {}
impl crate::Resettable for FNRrs {}