stm32f4_staging/stm32f413/fmpi2c1/
timingr.rs1pub type R = crate::R<TIMINGRrs>;
3pub type W = crate::W<TIMINGRrs>;
5pub type SCLL_R = crate::FieldReader;
7pub type SCLL_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
9pub type SCLH_R = crate::FieldReader;
11pub type SCLH_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
13pub type SDADEL_R = crate::FieldReader;
15pub type SDADEL_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
17pub type SCLDEL_R = crate::FieldReader;
19pub type SCLDEL_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
21pub type PRESC_R = crate::FieldReader;
23pub type PRESC_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
25impl R {
26 #[inline(always)]
28 pub fn scll(&self) -> SCLL_R {
29 SCLL_R::new((self.bits & 0xff) as u8)
30 }
31 #[inline(always)]
33 pub fn sclh(&self) -> SCLH_R {
34 SCLH_R::new(((self.bits >> 8) & 0xff) as u8)
35 }
36 #[inline(always)]
38 pub fn sdadel(&self) -> SDADEL_R {
39 SDADEL_R::new(((self.bits >> 16) & 0x0f) as u8)
40 }
41 #[inline(always)]
43 pub fn scldel(&self) -> SCLDEL_R {
44 SCLDEL_R::new(((self.bits >> 20) & 0x0f) as u8)
45 }
46 #[inline(always)]
48 pub fn presc(&self) -> PRESC_R {
49 PRESC_R::new(((self.bits >> 28) & 0x0f) as u8)
50 }
51}
52impl core::fmt::Debug for R {
53 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
54 f.debug_struct("TIMINGR")
55 .field("scll", &self.scll())
56 .field("sclh", &self.sclh())
57 .field("sdadel", &self.sdadel())
58 .field("scldel", &self.scldel())
59 .field("presc", &self.presc())
60 .finish()
61 }
62}
63impl W {
64 #[inline(always)]
66 pub fn scll(&mut self) -> SCLL_W<TIMINGRrs> {
67 SCLL_W::new(self, 0)
68 }
69 #[inline(always)]
71 pub fn sclh(&mut self) -> SCLH_W<TIMINGRrs> {
72 SCLH_W::new(self, 8)
73 }
74 #[inline(always)]
76 pub fn sdadel(&mut self) -> SDADEL_W<TIMINGRrs> {
77 SDADEL_W::new(self, 16)
78 }
79 #[inline(always)]
81 pub fn scldel(&mut self) -> SCLDEL_W<TIMINGRrs> {
82 SCLDEL_W::new(self, 20)
83 }
84 #[inline(always)]
86 pub fn presc(&mut self) -> PRESC_W<TIMINGRrs> {
87 PRESC_W::new(self, 28)
88 }
89}
90pub struct TIMINGRrs;
96impl crate::RegisterSpec for TIMINGRrs {
97 type Ux = u32;
98}
99impl crate::Readable for TIMINGRrs {}
101impl crate::Writable for TIMINGRrs {
103 type Safety = crate::Unsafe;
104}
105impl crate::Resettable for TIMINGRrs {}