stm32f1_staging/stm32f100/cec/
csr.rs1pub type R = crate::R<CSRrs>;
3pub type W = crate::W<CSRrs>;
5pub type TSOM_R = crate::BitReader;
7pub type TSOM_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type TEOM_R = crate::BitReader;
11pub type TEOM_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TERR_R = crate::BitReader;
15pub type TERR_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type TBTRF_R = crate::BitReader;
19pub type TBTRF_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type RSOM_R = crate::BitReader;
23pub type RSOM_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type REOM_R = crate::BitReader;
27pub type REOM_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type RERR_R = crate::BitReader;
31pub type RERR_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type RBTF_R = crate::BitReader;
35pub type RBTF_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[inline(always)]
40 pub fn tsom(&self) -> TSOM_R {
41 TSOM_R::new((self.bits & 1) != 0)
42 }
43 #[inline(always)]
45 pub fn teom(&self) -> TEOM_R {
46 TEOM_R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[inline(always)]
50 pub fn terr(&self) -> TERR_R {
51 TERR_R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[inline(always)]
55 pub fn tbtrf(&self) -> TBTRF_R {
56 TBTRF_R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[inline(always)]
60 pub fn rsom(&self) -> RSOM_R {
61 RSOM_R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn reom(&self) -> REOM_R {
66 REOM_R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn rerr(&self) -> RERR_R {
71 RERR_R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[inline(always)]
75 pub fn rbtf(&self) -> RBTF_R {
76 RBTF_R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79impl core::fmt::Debug for R {
80 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
81 f.debug_struct("CSR")
82 .field("tsom", &self.tsom())
83 .field("teom", &self.teom())
84 .field("terr", &self.terr())
85 .field("tbtrf", &self.tbtrf())
86 .field("rsom", &self.rsom())
87 .field("reom", &self.reom())
88 .field("rerr", &self.rerr())
89 .field("rbtf", &self.rbtf())
90 .finish()
91 }
92}
93impl W {
94 #[inline(always)]
96 pub fn tsom(&mut self) -> TSOM_W<CSRrs> {
97 TSOM_W::new(self, 0)
98 }
99 #[inline(always)]
101 pub fn teom(&mut self) -> TEOM_W<CSRrs> {
102 TEOM_W::new(self, 1)
103 }
104 #[inline(always)]
106 pub fn terr(&mut self) -> TERR_W<CSRrs> {
107 TERR_W::new(self, 2)
108 }
109 #[inline(always)]
111 pub fn tbtrf(&mut self) -> TBTRF_W<CSRrs> {
112 TBTRF_W::new(self, 3)
113 }
114 #[inline(always)]
116 pub fn rsom(&mut self) -> RSOM_W<CSRrs> {
117 RSOM_W::new(self, 4)
118 }
119 #[inline(always)]
121 pub fn reom(&mut self) -> REOM_W<CSRrs> {
122 REOM_W::new(self, 5)
123 }
124 #[inline(always)]
126 pub fn rerr(&mut self) -> RERR_W<CSRrs> {
127 RERR_W::new(self, 6)
128 }
129 #[inline(always)]
131 pub fn rbtf(&mut self) -> RBTF_W<CSRrs> {
132 RBTF_W::new(self, 7)
133 }
134}
135pub struct CSRrs;
141impl crate::RegisterSpec for CSRrs {
142 type Ux = u32;
143}
144impl crate::Readable for CSRrs {}
146impl crate::Writable for CSRrs {
148 type Safety = crate::Unsafe;
149}
150impl crate::Resettable for CSRrs {}