stm32f1/stm32f107/i2c1/
sr2.rs1pub type R = crate::R<SR2rs>;
3pub type MSL_R = crate::BitReader;
5pub type BUSY_R = crate::BitReader;
7pub type TRA_R = crate::BitReader;
9pub type GENCALL_R = crate::BitReader;
11pub type SMBDEFAULT_R = crate::BitReader;
13pub type SMBHOST_R = crate::BitReader;
15pub type DUALF_R = crate::BitReader;
17pub type PEC_R = crate::FieldReader;
19impl R {
20 #[inline(always)]
22 pub fn msl(&self) -> MSL_R {
23 MSL_R::new((self.bits & 1) != 0)
24 }
25 #[inline(always)]
27 pub fn busy(&self) -> BUSY_R {
28 BUSY_R::new(((self.bits >> 1) & 1) != 0)
29 }
30 #[inline(always)]
32 pub fn tra(&self) -> TRA_R {
33 TRA_R::new(((self.bits >> 2) & 1) != 0)
34 }
35 #[inline(always)]
37 pub fn gencall(&self) -> GENCALL_R {
38 GENCALL_R::new(((self.bits >> 4) & 1) != 0)
39 }
40 #[inline(always)]
42 pub fn smbdefault(&self) -> SMBDEFAULT_R {
43 SMBDEFAULT_R::new(((self.bits >> 5) & 1) != 0)
44 }
45 #[inline(always)]
47 pub fn smbhost(&self) -> SMBHOST_R {
48 SMBHOST_R::new(((self.bits >> 6) & 1) != 0)
49 }
50 #[inline(always)]
52 pub fn dualf(&self) -> DUALF_R {
53 DUALF_R::new(((self.bits >> 7) & 1) != 0)
54 }
55 #[inline(always)]
57 pub fn pec(&self) -> PEC_R {
58 PEC_R::new(((self.bits >> 8) & 0xff) as u8)
59 }
60}
61impl core::fmt::Debug for R {
62 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
63 f.debug_struct("SR2")
64 .field("pec", &self.pec())
65 .field("dualf", &self.dualf())
66 .field("smbhost", &self.smbhost())
67 .field("smbdefault", &self.smbdefault())
68 .field("gencall", &self.gencall())
69 .field("tra", &self.tra())
70 .field("busy", &self.busy())
71 .field("msl", &self.msl())
72 .finish()
73 }
74}
75pub struct SR2rs;
81impl crate::RegisterSpec for SR2rs {
82 type Ux = u16;
83}
84impl crate::Readable for SR2rs {}
86impl crate::Resettable for SR2rs {}