pub type R = crate::R<SR2rs>;
pub type MSL_R = crate::BitReader;
pub type BUSY_R = crate::BitReader;
pub type TRA_R = crate::BitReader;
pub type GENCALL_R = crate::BitReader;
pub type SMBDEFAULT_R = crate::BitReader;
pub type SMBHOST_R = crate::BitReader;
pub type DUALF_R = crate::BitReader;
pub type PEC_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn msl(&self) -> MSL_R {
MSL_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn busy(&self) -> BUSY_R {
BUSY_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn tra(&self) -> TRA_R {
TRA_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn gencall(&self) -> GENCALL_R {
GENCALL_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn smbdefault(&self) -> SMBDEFAULT_R {
SMBDEFAULT_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn smbhost(&self) -> SMBHOST_R {
SMBHOST_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn dualf(&self) -> DUALF_R {
DUALF_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn pec(&self) -> PEC_R {
PEC_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR2")
.field("pec", &self.pec())
.field("dualf", &self.dualf())
.field("smbhost", &self.smbhost())
.field("smbdefault", &self.smbdefault())
.field("gencall", &self.gencall())
.field("tra", &self.tra())
.field("busy", &self.busy())
.field("msl", &self.msl())
.finish()
}
}
pub struct SR2rs;
impl crate::RegisterSpec for SR2rs {
type Ux = u16;
}
impl crate::Readable for SR2rs {}
impl crate::Resettable for SR2rs {}