pub type R = crate::R<SRrs>;
pub type RXNE_R = crate::BitReader;
pub type CSRNE_R = crate::BitReader;
pub type PERR_R = crate::BitReader;
pub type OVR_R = crate::BitReader;
pub type SBD_R = crate::BitReader;
pub type SYNCD_R = crate::BitReader;
pub type FERR_R = crate::BitReader;
pub type SERR_R = crate::BitReader;
pub type TERR_R = crate::BitReader;
pub type WIDTH5_R = crate::FieldReader<u16>;
impl R {
#[inline(always)]
pub fn rxne(&self) -> RXNE_R {
RXNE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn csrne(&self) -> CSRNE_R {
CSRNE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn perr(&self) -> PERR_R {
PERR_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn ovr(&self) -> OVR_R {
OVR_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn sbd(&self) -> SBD_R {
SBD_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn syncd(&self) -> SYNCD_R {
SYNCD_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn ferr(&self) -> FERR_R {
FERR_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn serr(&self) -> SERR_R {
SERR_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn terr(&self) -> TERR_R {
TERR_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn width5(&self) -> WIDTH5_R {
WIDTH5_R::new(((self.bits >> 16) & 0x7fff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("rxne", &self.rxne())
.field("csrne", &self.csrne())
.field("perr", &self.perr())
.field("ovr", &self.ovr())
.field("sbd", &self.sbd())
.field("syncd", &self.syncd())
.field("ferr", &self.ferr())
.field("serr", &self.serr())
.field("terr", &self.terr())
.field("width5", &self.width5())
.finish()
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u32;
}
impl crate::Readable for SRrs {}
impl crate::Resettable for SRrs {}