stm32f1_staging/stm32f107/tim9/
smcr.rs1pub type R = crate::R<SMCRrs>;
3pub type W = crate::W<SMCRrs>;
5pub type SMS_R = crate::FieldReader;
7pub type SMS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9pub type TS_R = crate::FieldReader;
11pub type TS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13pub type MSM_R = crate::BitReader;
15pub type MSM_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[inline(always)]
20 pub fn sms(&self) -> SMS_R {
21 SMS_R::new((self.bits & 7) as u8)
22 }
23 #[inline(always)]
25 pub fn ts(&self) -> TS_R {
26 TS_R::new(((self.bits >> 4) & 7) as u8)
27 }
28 #[inline(always)]
30 pub fn msm(&self) -> MSM_R {
31 MSM_R::new(((self.bits >> 7) & 1) != 0)
32 }
33}
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("SMCR")
37 .field("msm", &self.msm())
38 .field("ts", &self.ts())
39 .field("sms", &self.sms())
40 .finish()
41 }
42}
43impl W {
44 #[inline(always)]
46 pub fn sms(&mut self) -> SMS_W<SMCRrs> {
47 SMS_W::new(self, 0)
48 }
49 #[inline(always)]
51 pub fn ts(&mut self) -> TS_W<SMCRrs> {
52 TS_W::new(self, 4)
53 }
54 #[inline(always)]
56 pub fn msm(&mut self) -> MSM_W<SMCRrs> {
57 MSM_W::new(self, 7)
58 }
59}
60pub struct SMCRrs;
66impl crate::RegisterSpec for SMCRrs {
67 type Ux = u32;
68}
69impl crate::Readable for SMCRrs {}
71impl crate::Writable for SMCRrs {
73 type Safety = crate::Unsafe;
74}
75impl crate::Resettable for SMCRrs {}