pub type R = crate::R<SRrs>;
pub type W = crate::W<SRrs>;
pub type ENS_R = crate::BitReader;
pub type SOF_R = crate::BitReader;
pub type UDR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type UDD_R = crate::BitReader;
pub type RDY_R = crate::BitReader;
pub type FCRSF_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn ens(&self) -> ENS_R {
ENS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn sof(&self) -> SOF_R {
SOF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn udd(&self) -> UDD_R {
UDD_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn rdy(&self) -> RDY_R {
RDY_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn fcrsf(&self) -> FCRSF_R {
FCRSF_R::new(((self.bits >> 5) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("fcrsf", &self.fcrsf())
.field("rdy", &self.rdy())
.field("udd", &self.udd())
.field("sof", &self.sof())
.field("ens", &self.ens())
.finish()
}
}
impl W {
#[inline(always)]
pub fn udr(&mut self) -> UDR_W<SRrs> {
UDR_W::new(self, 2)
}
}
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 {
const RESET_VALUE: u32 = 0x20;
}