stm32f0/stm32f0x1/rtc/
tafcr.rs1pub type R = crate::R<TAFCRrs>;
3pub type W = crate::W<TAFCRrs>;
5pub type TAMP1E_R = crate::BitReader;
7pub type TAMP1E_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type TAMP1TRG_R = crate::BitReader;
11pub type TAMP1TRG_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TAMPIE_R = crate::BitReader;
15pub type TAMPIE_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type TAMP2E_R = crate::BitReader;
19pub type TAMP2E_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TAMP2_TRG_R = crate::BitReader;
23pub type TAMP2_TRG_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type TAMPTS_R = crate::BitReader;
27pub type TAMPTS_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type TAMPFREQ_R = crate::FieldReader;
31pub type TAMPFREQ_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
33pub type TAMPFLT_R = crate::FieldReader;
35pub type TAMPFLT_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
37pub type TAMP_PRCH_R = crate::FieldReader;
39pub type TAMP_PRCH_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
41pub type TAMP_PUDIS_R = crate::BitReader;
43pub type TAMP_PUDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type PC13VALUE_R = crate::BitReader;
47pub type PC13VALUE_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type PC13MODE_R = crate::BitReader;
51pub type PC13MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type PC14VALUE_R = crate::BitReader;
55pub type PC14VALUE_W<'a, REG> = crate::BitWriter<'a, REG>;
57pub type PC14MODE_R = crate::BitReader;
59pub type PC14MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
61pub type PC15VALUE_R = crate::BitReader;
63pub type PC15VALUE_W<'a, REG> = crate::BitWriter<'a, REG>;
65pub type PC15MODE_R = crate::BitReader;
67pub type PC15MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70 #[inline(always)]
72 pub fn tamp1e(&self) -> TAMP1E_R {
73 TAMP1E_R::new((self.bits & 1) != 0)
74 }
75 #[inline(always)]
77 pub fn tamp1trg(&self) -> TAMP1TRG_R {
78 TAMP1TRG_R::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[inline(always)]
82 pub fn tampie(&self) -> TAMPIE_R {
83 TAMPIE_R::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[inline(always)]
87 pub fn tamp2e(&self) -> TAMP2E_R {
88 TAMP2E_R::new(((self.bits >> 3) & 1) != 0)
89 }
90 #[inline(always)]
92 pub fn tamp2_trg(&self) -> TAMP2_TRG_R {
93 TAMP2_TRG_R::new(((self.bits >> 4) & 1) != 0)
94 }
95 #[inline(always)]
97 pub fn tampts(&self) -> TAMPTS_R {
98 TAMPTS_R::new(((self.bits >> 7) & 1) != 0)
99 }
100 #[inline(always)]
102 pub fn tampfreq(&self) -> TAMPFREQ_R {
103 TAMPFREQ_R::new(((self.bits >> 8) & 7) as u8)
104 }
105 #[inline(always)]
107 pub fn tampflt(&self) -> TAMPFLT_R {
108 TAMPFLT_R::new(((self.bits >> 11) & 3) as u8)
109 }
110 #[inline(always)]
112 pub fn tamp_prch(&self) -> TAMP_PRCH_R {
113 TAMP_PRCH_R::new(((self.bits >> 13) & 3) as u8)
114 }
115 #[inline(always)]
117 pub fn tamp_pudis(&self) -> TAMP_PUDIS_R {
118 TAMP_PUDIS_R::new(((self.bits >> 15) & 1) != 0)
119 }
120 #[inline(always)]
122 pub fn pc13value(&self) -> PC13VALUE_R {
123 PC13VALUE_R::new(((self.bits >> 18) & 1) != 0)
124 }
125 #[inline(always)]
127 pub fn pc13mode(&self) -> PC13MODE_R {
128 PC13MODE_R::new(((self.bits >> 19) & 1) != 0)
129 }
130 #[inline(always)]
132 pub fn pc14value(&self) -> PC14VALUE_R {
133 PC14VALUE_R::new(((self.bits >> 20) & 1) != 0)
134 }
135 #[inline(always)]
137 pub fn pc14mode(&self) -> PC14MODE_R {
138 PC14MODE_R::new(((self.bits >> 21) & 1) != 0)
139 }
140 #[inline(always)]
142 pub fn pc15value(&self) -> PC15VALUE_R {
143 PC15VALUE_R::new(((self.bits >> 22) & 1) != 0)
144 }
145 #[inline(always)]
147 pub fn pc15mode(&self) -> PC15MODE_R {
148 PC15MODE_R::new(((self.bits >> 23) & 1) != 0)
149 }
150}
151impl core::fmt::Debug for R {
152 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
153 f.debug_struct("TAFCR")
154 .field("pc15mode", &self.pc15mode())
155 .field("pc15value", &self.pc15value())
156 .field("pc14mode", &self.pc14mode())
157 .field("pc14value", &self.pc14value())
158 .field("pc13mode", &self.pc13mode())
159 .field("pc13value", &self.pc13value())
160 .field("tamp_pudis", &self.tamp_pudis())
161 .field("tamp_prch", &self.tamp_prch())
162 .field("tampflt", &self.tampflt())
163 .field("tampfreq", &self.tampfreq())
164 .field("tampts", &self.tampts())
165 .field("tamp2_trg", &self.tamp2_trg())
166 .field("tamp2e", &self.tamp2e())
167 .field("tampie", &self.tampie())
168 .field("tamp1trg", &self.tamp1trg())
169 .field("tamp1e", &self.tamp1e())
170 .finish()
171 }
172}
173impl W {
174 #[inline(always)]
176 pub fn tamp1e(&mut self) -> TAMP1E_W<TAFCRrs> {
177 TAMP1E_W::new(self, 0)
178 }
179 #[inline(always)]
181 pub fn tamp1trg(&mut self) -> TAMP1TRG_W<TAFCRrs> {
182 TAMP1TRG_W::new(self, 1)
183 }
184 #[inline(always)]
186 pub fn tampie(&mut self) -> TAMPIE_W<TAFCRrs> {
187 TAMPIE_W::new(self, 2)
188 }
189 #[inline(always)]
191 pub fn tamp2e(&mut self) -> TAMP2E_W<TAFCRrs> {
192 TAMP2E_W::new(self, 3)
193 }
194 #[inline(always)]
196 pub fn tamp2_trg(&mut self) -> TAMP2_TRG_W<TAFCRrs> {
197 TAMP2_TRG_W::new(self, 4)
198 }
199 #[inline(always)]
201 pub fn tampts(&mut self) -> TAMPTS_W<TAFCRrs> {
202 TAMPTS_W::new(self, 7)
203 }
204 #[inline(always)]
206 pub fn tampfreq(&mut self) -> TAMPFREQ_W<TAFCRrs> {
207 TAMPFREQ_W::new(self, 8)
208 }
209 #[inline(always)]
211 pub fn tampflt(&mut self) -> TAMPFLT_W<TAFCRrs> {
212 TAMPFLT_W::new(self, 11)
213 }
214 #[inline(always)]
216 pub fn tamp_prch(&mut self) -> TAMP_PRCH_W<TAFCRrs> {
217 TAMP_PRCH_W::new(self, 13)
218 }
219 #[inline(always)]
221 pub fn tamp_pudis(&mut self) -> TAMP_PUDIS_W<TAFCRrs> {
222 TAMP_PUDIS_W::new(self, 15)
223 }
224 #[inline(always)]
226 pub fn pc13value(&mut self) -> PC13VALUE_W<TAFCRrs> {
227 PC13VALUE_W::new(self, 18)
228 }
229 #[inline(always)]
231 pub fn pc13mode(&mut self) -> PC13MODE_W<TAFCRrs> {
232 PC13MODE_W::new(self, 19)
233 }
234 #[inline(always)]
236 pub fn pc14value(&mut self) -> PC14VALUE_W<TAFCRrs> {
237 PC14VALUE_W::new(self, 20)
238 }
239 #[inline(always)]
241 pub fn pc14mode(&mut self) -> PC14MODE_W<TAFCRrs> {
242 PC14MODE_W::new(self, 21)
243 }
244 #[inline(always)]
246 pub fn pc15value(&mut self) -> PC15VALUE_W<TAFCRrs> {
247 PC15VALUE_W::new(self, 22)
248 }
249 #[inline(always)]
251 pub fn pc15mode(&mut self) -> PC15MODE_W<TAFCRrs> {
252 PC15MODE_W::new(self, 23)
253 }
254}
255pub struct TAFCRrs;
261impl crate::RegisterSpec for TAFCRrs {
262 type Ux = u32;
263}
264impl crate::Readable for TAFCRrs {}
266impl crate::Writable for TAFCRrs {
268 type Safety = crate::Unsafe;
269}
270impl crate::Resettable for TAFCRrs {}