stm32l4x2_pac/dfsdm/flt/
icr.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7 bits: u32,
8}
9impl super::ICR {
10 #[doc = r" Modifies the contents of the register"]
11 #[inline]
12 pub fn modify<F>(&self, f: F)
13 where
14 for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15 {
16 let bits = self.register.get();
17 let r = R { bits: bits };
18 let mut w = W { bits: bits };
19 f(&r, &mut w);
20 self.register.set(w.bits);
21 }
22 #[doc = r" Reads the contents of the register"]
23 #[inline]
24 pub fn read(&self) -> R {
25 R {
26 bits: self.register.get(),
27 }
28 }
29 #[doc = r" Writes to the register"]
30 #[inline]
31 pub fn write<F>(&self, f: F)
32 where
33 F: FnOnce(&mut W) -> &mut W,
34 {
35 let mut w = W::reset_value();
36 f(&mut w);
37 self.register.set(w.bits);
38 }
39 #[doc = r" Writes the reset value to the register"]
40 #[inline]
41 pub fn reset(&self) {
42 self.write(|w| w)
43 }
44}
45#[doc = r" Value of the field"]
46pub struct CLRSCDFR {
47 bits: u8,
48}
49impl CLRSCDFR {
50 #[doc = r" Value of the field as raw bits"]
51 #[inline]
52 pub fn bits(&self) -> u8 {
53 self.bits
54 }
55}
56#[doc = r" Value of the field"]
57pub struct CLRCKABFR {
58 bits: u8,
59}
60impl CLRCKABFR {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bits(&self) -> u8 {
64 self.bits
65 }
66}
67#[doc = r" Value of the field"]
68pub struct CLRROVRFR {
69 bits: bool,
70}
71impl CLRROVRFR {
72 #[doc = r" Value of the field as raw bits"]
73 #[inline]
74 pub fn bit(&self) -> bool {
75 self.bits
76 }
77 #[doc = r" Returns `true` if the bit is clear (0)"]
78 #[inline]
79 pub fn bit_is_clear(&self) -> bool {
80 !self.bit()
81 }
82 #[doc = r" Returns `true` if the bit is set (1)"]
83 #[inline]
84 pub fn bit_is_set(&self) -> bool {
85 self.bit()
86 }
87}
88#[doc = r" Value of the field"]
89pub struct CLRJOVRFR {
90 bits: bool,
91}
92impl CLRJOVRFR {
93 #[doc = r" Value of the field as raw bits"]
94 #[inline]
95 pub fn bit(&self) -> bool {
96 self.bits
97 }
98 #[doc = r" Returns `true` if the bit is clear (0)"]
99 #[inline]
100 pub fn bit_is_clear(&self) -> bool {
101 !self.bit()
102 }
103 #[doc = r" Returns `true` if the bit is set (1)"]
104 #[inline]
105 pub fn bit_is_set(&self) -> bool {
106 self.bit()
107 }
108}
109#[doc = r" Proxy"]
110pub struct _CLRSCDFW<'a> {
111 w: &'a mut W,
112}
113impl<'a> _CLRSCDFW<'a> {
114 #[doc = r" Writes raw bits to the field"]
115 #[inline]
116 pub unsafe fn bits(self, value: u8) -> &'a mut W {
117 const MASK: u8 = 255;
118 const OFFSET: u8 = 24;
119 self.w.bits &= !((MASK as u32) << OFFSET);
120 self.w.bits |= ((value & MASK) as u32) << OFFSET;
121 self.w
122 }
123}
124#[doc = r" Proxy"]
125pub struct _CLRCKABFW<'a> {
126 w: &'a mut W,
127}
128impl<'a> _CLRCKABFW<'a> {
129 #[doc = r" Writes raw bits to the field"]
130 #[inline]
131 pub unsafe fn bits(self, value: u8) -> &'a mut W {
132 const MASK: u8 = 255;
133 const OFFSET: u8 = 16;
134 self.w.bits &= !((MASK as u32) << OFFSET);
135 self.w.bits |= ((value & MASK) as u32) << OFFSET;
136 self.w
137 }
138}
139#[doc = r" Proxy"]
140pub struct _CLRROVRFW<'a> {
141 w: &'a mut W,
142}
143impl<'a> _CLRROVRFW<'a> {
144 #[doc = r" Sets the field bit"]
145 pub fn set_bit(self) -> &'a mut W {
146 self.bit(true)
147 }
148 #[doc = r" Clears the field bit"]
149 pub fn clear_bit(self) -> &'a mut W {
150 self.bit(false)
151 }
152 #[doc = r" Writes raw bits to the field"]
153 #[inline]
154 pub fn bit(self, value: bool) -> &'a mut W {
155 const MASK: bool = true;
156 const OFFSET: u8 = 3;
157 self.w.bits &= !((MASK as u32) << OFFSET);
158 self.w.bits |= ((value & MASK) as u32) << OFFSET;
159 self.w
160 }
161}
162#[doc = r" Proxy"]
163pub struct _CLRJOVRFW<'a> {
164 w: &'a mut W,
165}
166impl<'a> _CLRJOVRFW<'a> {
167 #[doc = r" Sets the field bit"]
168 pub fn set_bit(self) -> &'a mut W {
169 self.bit(true)
170 }
171 #[doc = r" Clears the field bit"]
172 pub fn clear_bit(self) -> &'a mut W {
173 self.bit(false)
174 }
175 #[doc = r" Writes raw bits to the field"]
176 #[inline]
177 pub fn bit(self, value: bool) -> &'a mut W {
178 const MASK: bool = true;
179 const OFFSET: u8 = 2;
180 self.w.bits &= !((MASK as u32) << OFFSET);
181 self.w.bits |= ((value & MASK) as u32) << OFFSET;
182 self.w
183 }
184}
185impl R {
186 #[doc = r" Value of the register as raw bits"]
187 #[inline]
188 pub fn bits(&self) -> u32 {
189 self.bits
190 }
191 #[doc = "Bits 24:31 - Clear the short-circuit detector flag"]
192 #[inline]
193 pub fn clrscdf(&self) -> CLRSCDFR {
194 let bits = {
195 const MASK: u8 = 255;
196 const OFFSET: u8 = 24;
197 ((self.bits >> OFFSET) & MASK as u32) as u8
198 };
199 CLRSCDFR { bits }
200 }
201 #[doc = "Bits 16:23 - Clear the clock absence flag"]
202 #[inline]
203 pub fn clrckabf(&self) -> CLRCKABFR {
204 let bits = {
205 const MASK: u8 = 255;
206 const OFFSET: u8 = 16;
207 ((self.bits >> OFFSET) & MASK as u32) as u8
208 };
209 CLRCKABFR { bits }
210 }
211 #[doc = "Bit 3 - Clear the regular conversion overrun flag"]
212 #[inline]
213 pub fn clrrovrf(&self) -> CLRROVRFR {
214 let bits = {
215 const MASK: bool = true;
216 const OFFSET: u8 = 3;
217 ((self.bits >> OFFSET) & MASK as u32) != 0
218 };
219 CLRROVRFR { bits }
220 }
221 #[doc = "Bit 2 - Clear the injected conversion overrun flag"]
222 #[inline]
223 pub fn clrjovrf(&self) -> CLRJOVRFR {
224 let bits = {
225 const MASK: bool = true;
226 const OFFSET: u8 = 2;
227 ((self.bits >> OFFSET) & MASK as u32) != 0
228 };
229 CLRJOVRFR { bits }
230 }
231}
232impl W {
233 #[doc = r" Reset value of the register"]
234 #[inline]
235 pub fn reset_value() -> W {
236 W { bits: 0 }
237 }
238 #[doc = r" Writes raw bits to the register"]
239 #[inline]
240 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
241 self.bits = bits;
242 self
243 }
244 #[doc = "Bits 24:31 - Clear the short-circuit detector flag"]
245 #[inline]
246 pub fn clrscdf(&mut self) -> _CLRSCDFW {
247 _CLRSCDFW { w: self }
248 }
249 #[doc = "Bits 16:23 - Clear the clock absence flag"]
250 #[inline]
251 pub fn clrckabf(&mut self) -> _CLRCKABFW {
252 _CLRCKABFW { w: self }
253 }
254 #[doc = "Bit 3 - Clear the regular conversion overrun flag"]
255 #[inline]
256 pub fn clrrovrf(&mut self) -> _CLRROVRFW {
257 _CLRROVRFW { w: self }
258 }
259 #[doc = "Bit 2 - Clear the injected conversion overrun flag"]
260 #[inline]
261 pub fn clrjovrf(&mut self) -> _CLRJOVRFW {
262 _CLRJOVRFW { w: self }
263 }
264}