pub type R = crate::R<SMCRrs>;
pub type W = crate::W<SMCRrs>;
pub type SMS_R = crate::FieldReader;
pub type SMS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type TS_R = crate::FieldReader;
pub type TS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type MSM_R = crate::BitReader;
pub type MSM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SMS_3_R = crate::BitReader;
pub type SMS_3_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn sms(&self) -> SMS_R {
SMS_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn ts(&self) -> TS_R {
TS_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn msm(&self) -> MSM_R {
MSM_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn sms_3(&self) -> SMS_3_R {
SMS_3_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SMCR")
.field("sms", &self.sms())
.field("ts", &self.ts())
.field("msm", &self.msm())
.field("sms_3", &self.sms_3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sms(&mut self) -> SMS_W<SMCRrs> {
SMS_W::new(self, 0)
}
#[inline(always)]
pub fn ts(&mut self) -> TS_W<SMCRrs> {
TS_W::new(self, 4)
}
#[inline(always)]
pub fn msm(&mut self) -> MSM_W<SMCRrs> {
MSM_W::new(self, 7)
}
#[inline(always)]
pub fn sms_3(&mut self) -> SMS_3_W<SMCRrs> {
SMS_3_W::new(self, 16)
}
}
pub struct SMCRrs;
impl crate::RegisterSpec for SMCRrs {
type Ux = u32;
}
impl crate::Readable for SMCRrs {}
impl crate::Writable for SMCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SMCRrs {}