stm32f1_staging/stm32f101/fsmc/
sr2.rs1pub type R = crate::R<SR2rs>;
3pub type W = crate::W<SR2rs>;
5pub type IRS_R = crate::BitReader;
7pub type IRS_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type ILS_R = crate::BitReader;
11pub type ILS_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type IFS_R = crate::BitReader;
15pub type IFS_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type IREN_R = crate::BitReader;
19pub type IREN_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type ILEN_R = crate::BitReader;
23pub type ILEN_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type IFEN_R = crate::BitReader;
27pub type IFEN_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type FEMPT_R = crate::BitReader;
31impl R {
32 #[inline(always)]
34 pub fn irs(&self) -> IRS_R {
35 IRS_R::new((self.bits & 1) != 0)
36 }
37 #[inline(always)]
39 pub fn ils(&self) -> ILS_R {
40 ILS_R::new(((self.bits >> 1) & 1) != 0)
41 }
42 #[inline(always)]
44 pub fn ifs(&self) -> IFS_R {
45 IFS_R::new(((self.bits >> 2) & 1) != 0)
46 }
47 #[inline(always)]
49 pub fn iren(&self) -> IREN_R {
50 IREN_R::new(((self.bits >> 3) & 1) != 0)
51 }
52 #[inline(always)]
54 pub fn ilen(&self) -> ILEN_R {
55 ILEN_R::new(((self.bits >> 4) & 1) != 0)
56 }
57 #[inline(always)]
59 pub fn ifen(&self) -> IFEN_R {
60 IFEN_R::new(((self.bits >> 5) & 1) != 0)
61 }
62 #[inline(always)]
64 pub fn fempt(&self) -> FEMPT_R {
65 FEMPT_R::new(((self.bits >> 6) & 1) != 0)
66 }
67}
68impl core::fmt::Debug for R {
69 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
70 f.debug_struct("SR2")
71 .field("fempt", &self.fempt())
72 .field("ifen", &self.ifen())
73 .field("ilen", &self.ilen())
74 .field("iren", &self.iren())
75 .field("ifs", &self.ifs())
76 .field("ils", &self.ils())
77 .field("irs", &self.irs())
78 .finish()
79 }
80}
81impl W {
82 #[inline(always)]
84 pub fn irs(&mut self) -> IRS_W<SR2rs> {
85 IRS_W::new(self, 0)
86 }
87 #[inline(always)]
89 pub fn ils(&mut self) -> ILS_W<SR2rs> {
90 ILS_W::new(self, 1)
91 }
92 #[inline(always)]
94 pub fn ifs(&mut self) -> IFS_W<SR2rs> {
95 IFS_W::new(self, 2)
96 }
97 #[inline(always)]
99 pub fn iren(&mut self) -> IREN_W<SR2rs> {
100 IREN_W::new(self, 3)
101 }
102 #[inline(always)]
104 pub fn ilen(&mut self) -> ILEN_W<SR2rs> {
105 ILEN_W::new(self, 4)
106 }
107 #[inline(always)]
109 pub fn ifen(&mut self) -> IFEN_W<SR2rs> {
110 IFEN_W::new(self, 5)
111 }
112}
113pub struct SR2rs;
119impl crate::RegisterSpec for SR2rs {
120 type Ux = u32;
121}
122impl crate::Readable for SR2rs {}
124impl crate::Writable for SR2rs {
126 type Safety = crate::Unsafe;
127}
128impl crate::Resettable for SR2rs {
130 const RESET_VALUE: u32 = 0x40;
131}