1#[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::CS5WCR {
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 NORMAL_HWR {
47 bits: u8,
48}
49impl NORMAL_HWR {
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 NORMAL_WMR {
58 bits: bool,
59}
60impl NORMAL_WMR {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct NORMAL_WRR {
79 bits: u8,
80}
81impl NORMAL_WRR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bits(&self) -> u8 {
85 self.bits
86 }
87}
88#[doc = r" Value of the field"]
89pub struct NORMAL_SWR {
90 bits: u8,
91}
92impl NORMAL_SWR {
93 #[doc = r" Value of the field as raw bits"]
94 #[inline]
95 pub fn bits(&self) -> u8 {
96 self.bits
97 }
98}
99#[doc = r" Value of the field"]
100pub struct NORMAL_WWR {
101 bits: u8,
102}
103impl NORMAL_WWR {
104 #[doc = r" Value of the field as raw bits"]
105 #[inline]
106 pub fn bits(&self) -> u8 {
107 self.bits
108 }
109}
110#[doc = r" Value of the field"]
111pub struct NORMAL_MPXWBASR {
112 bits: bool,
113}
114impl NORMAL_MPXWBASR {
115 #[doc = r" Value of the field as raw bits"]
116 #[inline]
117 pub fn bit(&self) -> bool {
118 self.bits
119 }
120 #[doc = r" Returns `true` if the bit is clear (0)"]
121 #[inline]
122 pub fn bit_is_clear(&self) -> bool {
123 !self.bit()
124 }
125 #[doc = r" Returns `true` if the bit is set (1)"]
126 #[inline]
127 pub fn bit_is_set(&self) -> bool {
128 self.bit()
129 }
130}
131#[doc = r" Value of the field"]
132pub struct NORMAL_SZSELR {
133 bits: bool,
134}
135impl NORMAL_SZSELR {
136 #[doc = r" Value of the field as raw bits"]
137 #[inline]
138 pub fn bit(&self) -> bool {
139 self.bits
140 }
141 #[doc = r" Returns `true` if the bit is clear (0)"]
142 #[inline]
143 pub fn bit_is_clear(&self) -> bool {
144 !self.bit()
145 }
146 #[doc = r" Returns `true` if the bit is set (1)"]
147 #[inline]
148 pub fn bit_is_set(&self) -> bool {
149 self.bit()
150 }
151}
152#[doc = r" Proxy"]
153pub struct _NORMAL_HWW<'a> {
154 w: &'a mut W,
155}
156impl<'a> _NORMAL_HWW<'a> {
157 #[doc = r" Writes raw bits to the field"]
158 #[inline]
159 pub unsafe fn bits(self, value: u8) -> &'a mut W {
160 const MASK: u8 = 0x03;
161 const OFFSET: u8 = 0;
162 self.w.bits &= !((MASK as u32) << OFFSET);
163 self.w.bits |= ((value & MASK) as u32) << OFFSET;
164 self.w
165 }
166}
167#[doc = r" Proxy"]
168pub struct _NORMAL_WMW<'a> {
169 w: &'a mut W,
170}
171impl<'a> _NORMAL_WMW<'a> {
172 #[doc = r" Sets the field bit"]
173 pub fn set_bit(self) -> &'a mut W {
174 self.bit(true)
175 }
176 #[doc = r" Clears the field bit"]
177 pub fn clear_bit(self) -> &'a mut W {
178 self.bit(false)
179 }
180 #[doc = r" Writes raw bits to the field"]
181 #[inline]
182 pub fn bit(self, value: bool) -> &'a mut W {
183 const MASK: bool = true;
184 const OFFSET: u8 = 6;
185 self.w.bits &= !((MASK as u32) << OFFSET);
186 self.w.bits |= ((value & MASK) as u32) << OFFSET;
187 self.w
188 }
189}
190#[doc = r" Proxy"]
191pub struct _NORMAL_WRW<'a> {
192 w: &'a mut W,
193}
194impl<'a> _NORMAL_WRW<'a> {
195 #[doc = r" Writes raw bits to the field"]
196 #[inline]
197 pub unsafe fn bits(self, value: u8) -> &'a mut W {
198 const MASK: u8 = 0x0f;
199 const OFFSET: u8 = 7;
200 self.w.bits &= !((MASK as u32) << OFFSET);
201 self.w.bits |= ((value & MASK) as u32) << OFFSET;
202 self.w
203 }
204}
205#[doc = r" Proxy"]
206pub struct _NORMAL_SWW<'a> {
207 w: &'a mut W,
208}
209impl<'a> _NORMAL_SWW<'a> {
210 #[doc = r" Writes raw bits to the field"]
211 #[inline]
212 pub unsafe fn bits(self, value: u8) -> &'a mut W {
213 const MASK: u8 = 0x03;
214 const OFFSET: u8 = 11;
215 self.w.bits &= !((MASK as u32) << OFFSET);
216 self.w.bits |= ((value & MASK) as u32) << OFFSET;
217 self.w
218 }
219}
220#[doc = r" Proxy"]
221pub struct _NORMAL_WWW<'a> {
222 w: &'a mut W,
223}
224impl<'a> _NORMAL_WWW<'a> {
225 #[doc = r" Writes raw bits to the field"]
226 #[inline]
227 pub unsafe fn bits(self, value: u8) -> &'a mut W {
228 const MASK: u8 = 0x07;
229 const OFFSET: u8 = 16;
230 self.w.bits &= !((MASK as u32) << OFFSET);
231 self.w.bits |= ((value & MASK) as u32) << OFFSET;
232 self.w
233 }
234}
235#[doc = r" Proxy"]
236pub struct _NORMAL_MPXWBASW<'a> {
237 w: &'a mut W,
238}
239impl<'a> _NORMAL_MPXWBASW<'a> {
240 #[doc = r" Sets the field bit"]
241 pub fn set_bit(self) -> &'a mut W {
242 self.bit(true)
243 }
244 #[doc = r" Clears the field bit"]
245 pub fn clear_bit(self) -> &'a mut W {
246 self.bit(false)
247 }
248 #[doc = r" Writes raw bits to the field"]
249 #[inline]
250 pub fn bit(self, value: bool) -> &'a mut W {
251 const MASK: bool = true;
252 const OFFSET: u8 = 20;
253 self.w.bits &= !((MASK as u32) << OFFSET);
254 self.w.bits |= ((value & MASK) as u32) << OFFSET;
255 self.w
256 }
257}
258#[doc = r" Proxy"]
259pub struct _NORMAL_SZSELW<'a> {
260 w: &'a mut W,
261}
262impl<'a> _NORMAL_SZSELW<'a> {
263 #[doc = r" Sets the field bit"]
264 pub fn set_bit(self) -> &'a mut W {
265 self.bit(true)
266 }
267 #[doc = r" Clears the field bit"]
268 pub fn clear_bit(self) -> &'a mut W {
269 self.bit(false)
270 }
271 #[doc = r" Writes raw bits to the field"]
272 #[inline]
273 pub fn bit(self, value: bool) -> &'a mut W {
274 const MASK: bool = true;
275 const OFFSET: u8 = 21;
276 self.w.bits &= !((MASK as u32) << OFFSET);
277 self.w.bits |= ((value & MASK) as u32) << OFFSET;
278 self.w
279 }
280}
281impl R {
282 #[doc = r" Value of the register as raw bits"]
283 #[inline]
284 pub fn bits(&self) -> u32 {
285 self.bits
286 }
287 #[doc = "Bits 0:1"]
288 #[inline]
289 pub fn normal_hw(&self) -> NORMAL_HWR {
290 let bits = {
291 const MASK: u8 = 0x03;
292 const OFFSET: u8 = 0;
293 ((self.bits >> OFFSET) & MASK as u32) as u8
294 };
295 NORMAL_HWR { bits }
296 }
297 #[doc = "Bit 6"]
298 #[inline]
299 pub fn normal_wm(&self) -> NORMAL_WMR {
300 let bits = {
301 const MASK: bool = true;
302 const OFFSET: u8 = 6;
303 ((self.bits >> OFFSET) & MASK as u32) != 0
304 };
305 NORMAL_WMR { bits }
306 }
307 #[doc = "Bits 7:10"]
308 #[inline]
309 pub fn normal_wr(&self) -> NORMAL_WRR {
310 let bits = {
311 const MASK: u8 = 0x0f;
312 const OFFSET: u8 = 7;
313 ((self.bits >> OFFSET) & MASK as u32) as u8
314 };
315 NORMAL_WRR { bits }
316 }
317 #[doc = "Bits 11:12"]
318 #[inline]
319 pub fn normal_sw(&self) -> NORMAL_SWR {
320 let bits = {
321 const MASK: u8 = 0x03;
322 const OFFSET: u8 = 11;
323 ((self.bits >> OFFSET) & MASK as u32) as u8
324 };
325 NORMAL_SWR { bits }
326 }
327 #[doc = "Bits 16:18"]
328 #[inline]
329 pub fn normal_ww(&self) -> NORMAL_WWR {
330 let bits = {
331 const MASK: u8 = 0x07;
332 const OFFSET: u8 = 16;
333 ((self.bits >> OFFSET) & MASK as u32) as u8
334 };
335 NORMAL_WWR { bits }
336 }
337 #[doc = "Bit 20"]
338 #[inline]
339 pub fn normal_mpxwbas(&self) -> NORMAL_MPXWBASR {
340 let bits = {
341 const MASK: bool = true;
342 const OFFSET: u8 = 20;
343 ((self.bits >> OFFSET) & MASK as u32) != 0
344 };
345 NORMAL_MPXWBASR { bits }
346 }
347 #[doc = "Bit 21"]
348 #[inline]
349 pub fn normal_szsel(&self) -> NORMAL_SZSELR {
350 let bits = {
351 const MASK: bool = true;
352 const OFFSET: u8 = 21;
353 ((self.bits >> OFFSET) & MASK as u32) != 0
354 };
355 NORMAL_SZSELR { bits }
356 }
357}
358impl W {
359 #[doc = r" Reset value of the register"]
360 #[inline]
361 pub fn reset_value() -> W {
362 W { bits: 0 }
363 }
364 #[doc = r" Writes raw bits to the register"]
365 #[inline]
366 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
367 self.bits = bits;
368 self
369 }
370 #[doc = "Bits 0:1"]
371 #[inline]
372 pub fn normal_hw(&mut self) -> _NORMAL_HWW {
373 _NORMAL_HWW { w: self }
374 }
375 #[doc = "Bit 6"]
376 #[inline]
377 pub fn normal_wm(&mut self) -> _NORMAL_WMW {
378 _NORMAL_WMW { w: self }
379 }
380 #[doc = "Bits 7:10"]
381 #[inline]
382 pub fn normal_wr(&mut self) -> _NORMAL_WRW {
383 _NORMAL_WRW { w: self }
384 }
385 #[doc = "Bits 11:12"]
386 #[inline]
387 pub fn normal_sw(&mut self) -> _NORMAL_SWW {
388 _NORMAL_SWW { w: self }
389 }
390 #[doc = "Bits 16:18"]
391 #[inline]
392 pub fn normal_ww(&mut self) -> _NORMAL_WWW {
393 _NORMAL_WWW { w: self }
394 }
395 #[doc = "Bit 20"]
396 #[inline]
397 pub fn normal_mpxwbas(&mut self) -> _NORMAL_MPXWBASW {
398 _NORMAL_MPXWBASW { w: self }
399 }
400 #[doc = "Bit 21"]
401 #[inline]
402 pub fn normal_szsel(&mut self) -> _NORMAL_SZSELW {
403 _NORMAL_SZSELW { w: self }
404 }
405}