stm32l4x2_pac/quadspi/
cr.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::CR {
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 PRESCALERR {
47 bits: u8,
48}
49impl PRESCALERR {
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 PMMR {
58 bits: bool,
59}
60impl PMMR {
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 APMSR {
79 bits: bool,
80}
81impl APMSR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct TOIER {
100 bits: bool,
101}
102impl TOIER {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct SMIER {
121 bits: bool,
122}
123impl SMIER {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct FTIER {
142 bits: bool,
143}
144impl FTIER {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct TCIER {
163 bits: bool,
164}
165impl TCIER {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182#[doc = r" Value of the field"]
183pub struct TEIER {
184 bits: bool,
185}
186impl TEIER {
187 #[doc = r" Value of the field as raw bits"]
188 #[inline]
189 pub fn bit(&self) -> bool {
190 self.bits
191 }
192 #[doc = r" Returns `true` if the bit is clear (0)"]
193 #[inline]
194 pub fn bit_is_clear(&self) -> bool {
195 !self.bit()
196 }
197 #[doc = r" Returns `true` if the bit is set (1)"]
198 #[inline]
199 pub fn bit_is_set(&self) -> bool {
200 self.bit()
201 }
202}
203#[doc = r" Value of the field"]
204pub struct FTHRESR {
205 bits: u8,
206}
207impl FTHRESR {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bits(&self) -> u8 {
211 self.bits
212 }
213}
214#[doc = r" Value of the field"]
215pub struct FSELR {
216 bits: bool,
217}
218impl FSELR {
219 #[doc = r" Value of the field as raw bits"]
220 #[inline]
221 pub fn bit(&self) -> bool {
222 self.bits
223 }
224 #[doc = r" Returns `true` if the bit is clear (0)"]
225 #[inline]
226 pub fn bit_is_clear(&self) -> bool {
227 !self.bit()
228 }
229 #[doc = r" Returns `true` if the bit is set (1)"]
230 #[inline]
231 pub fn bit_is_set(&self) -> bool {
232 self.bit()
233 }
234}
235#[doc = r" Value of the field"]
236pub struct DFMR {
237 bits: bool,
238}
239impl DFMR {
240 #[doc = r" Value of the field as raw bits"]
241 #[inline]
242 pub fn bit(&self) -> bool {
243 self.bits
244 }
245 #[doc = r" Returns `true` if the bit is clear (0)"]
246 #[inline]
247 pub fn bit_is_clear(&self) -> bool {
248 !self.bit()
249 }
250 #[doc = r" Returns `true` if the bit is set (1)"]
251 #[inline]
252 pub fn bit_is_set(&self) -> bool {
253 self.bit()
254 }
255}
256#[doc = r" Value of the field"]
257pub struct SSHIFTR {
258 bits: bool,
259}
260impl SSHIFTR {
261 #[doc = r" Value of the field as raw bits"]
262 #[inline]
263 pub fn bit(&self) -> bool {
264 self.bits
265 }
266 #[doc = r" Returns `true` if the bit is clear (0)"]
267 #[inline]
268 pub fn bit_is_clear(&self) -> bool {
269 !self.bit()
270 }
271 #[doc = r" Returns `true` if the bit is set (1)"]
272 #[inline]
273 pub fn bit_is_set(&self) -> bool {
274 self.bit()
275 }
276}
277#[doc = r" Value of the field"]
278pub struct TCENR {
279 bits: bool,
280}
281impl TCENR {
282 #[doc = r" Value of the field as raw bits"]
283 #[inline]
284 pub fn bit(&self) -> bool {
285 self.bits
286 }
287 #[doc = r" Returns `true` if the bit is clear (0)"]
288 #[inline]
289 pub fn bit_is_clear(&self) -> bool {
290 !self.bit()
291 }
292 #[doc = r" Returns `true` if the bit is set (1)"]
293 #[inline]
294 pub fn bit_is_set(&self) -> bool {
295 self.bit()
296 }
297}
298#[doc = r" Value of the field"]
299pub struct DMAENR {
300 bits: bool,
301}
302impl DMAENR {
303 #[doc = r" Value of the field as raw bits"]
304 #[inline]
305 pub fn bit(&self) -> bool {
306 self.bits
307 }
308 #[doc = r" Returns `true` if the bit is clear (0)"]
309 #[inline]
310 pub fn bit_is_clear(&self) -> bool {
311 !self.bit()
312 }
313 #[doc = r" Returns `true` if the bit is set (1)"]
314 #[inline]
315 pub fn bit_is_set(&self) -> bool {
316 self.bit()
317 }
318}
319#[doc = r" Value of the field"]
320pub struct ABORTR {
321 bits: bool,
322}
323impl ABORTR {
324 #[doc = r" Value of the field as raw bits"]
325 #[inline]
326 pub fn bit(&self) -> bool {
327 self.bits
328 }
329 #[doc = r" Returns `true` if the bit is clear (0)"]
330 #[inline]
331 pub fn bit_is_clear(&self) -> bool {
332 !self.bit()
333 }
334 #[doc = r" Returns `true` if the bit is set (1)"]
335 #[inline]
336 pub fn bit_is_set(&self) -> bool {
337 self.bit()
338 }
339}
340#[doc = r" Value of the field"]
341pub struct ENR {
342 bits: bool,
343}
344impl ENR {
345 #[doc = r" Value of the field as raw bits"]
346 #[inline]
347 pub fn bit(&self) -> bool {
348 self.bits
349 }
350 #[doc = r" Returns `true` if the bit is clear (0)"]
351 #[inline]
352 pub fn bit_is_clear(&self) -> bool {
353 !self.bit()
354 }
355 #[doc = r" Returns `true` if the bit is set (1)"]
356 #[inline]
357 pub fn bit_is_set(&self) -> bool {
358 self.bit()
359 }
360}
361#[doc = r" Proxy"]
362pub struct _PRESCALERW<'a> {
363 w: &'a mut W,
364}
365impl<'a> _PRESCALERW<'a> {
366 #[doc = r" Writes raw bits to the field"]
367 #[inline]
368 pub unsafe fn bits(self, value: u8) -> &'a mut W {
369 const MASK: u8 = 255;
370 const OFFSET: u8 = 24;
371 self.w.bits &= !((MASK as u32) << OFFSET);
372 self.w.bits |= ((value & MASK) as u32) << OFFSET;
373 self.w
374 }
375}
376#[doc = r" Proxy"]
377pub struct _PMMW<'a> {
378 w: &'a mut W,
379}
380impl<'a> _PMMW<'a> {
381 #[doc = r" Sets the field bit"]
382 pub fn set_bit(self) -> &'a mut W {
383 self.bit(true)
384 }
385 #[doc = r" Clears the field bit"]
386 pub fn clear_bit(self) -> &'a mut W {
387 self.bit(false)
388 }
389 #[doc = r" Writes raw bits to the field"]
390 #[inline]
391 pub fn bit(self, value: bool) -> &'a mut W {
392 const MASK: bool = true;
393 const OFFSET: u8 = 23;
394 self.w.bits &= !((MASK as u32) << OFFSET);
395 self.w.bits |= ((value & MASK) as u32) << OFFSET;
396 self.w
397 }
398}
399#[doc = r" Proxy"]
400pub struct _APMSW<'a> {
401 w: &'a mut W,
402}
403impl<'a> _APMSW<'a> {
404 #[doc = r" Sets the field bit"]
405 pub fn set_bit(self) -> &'a mut W {
406 self.bit(true)
407 }
408 #[doc = r" Clears the field bit"]
409 pub fn clear_bit(self) -> &'a mut W {
410 self.bit(false)
411 }
412 #[doc = r" Writes raw bits to the field"]
413 #[inline]
414 pub fn bit(self, value: bool) -> &'a mut W {
415 const MASK: bool = true;
416 const OFFSET: u8 = 22;
417 self.w.bits &= !((MASK as u32) << OFFSET);
418 self.w.bits |= ((value & MASK) as u32) << OFFSET;
419 self.w
420 }
421}
422#[doc = r" Proxy"]
423pub struct _TOIEW<'a> {
424 w: &'a mut W,
425}
426impl<'a> _TOIEW<'a> {
427 #[doc = r" Sets the field bit"]
428 pub fn set_bit(self) -> &'a mut W {
429 self.bit(true)
430 }
431 #[doc = r" Clears the field bit"]
432 pub fn clear_bit(self) -> &'a mut W {
433 self.bit(false)
434 }
435 #[doc = r" Writes raw bits to the field"]
436 #[inline]
437 pub fn bit(self, value: bool) -> &'a mut W {
438 const MASK: bool = true;
439 const OFFSET: u8 = 20;
440 self.w.bits &= !((MASK as u32) << OFFSET);
441 self.w.bits |= ((value & MASK) as u32) << OFFSET;
442 self.w
443 }
444}
445#[doc = r" Proxy"]
446pub struct _SMIEW<'a> {
447 w: &'a mut W,
448}
449impl<'a> _SMIEW<'a> {
450 #[doc = r" Sets the field bit"]
451 pub fn set_bit(self) -> &'a mut W {
452 self.bit(true)
453 }
454 #[doc = r" Clears the field bit"]
455 pub fn clear_bit(self) -> &'a mut W {
456 self.bit(false)
457 }
458 #[doc = r" Writes raw bits to the field"]
459 #[inline]
460 pub fn bit(self, value: bool) -> &'a mut W {
461 const MASK: bool = true;
462 const OFFSET: u8 = 19;
463 self.w.bits &= !((MASK as u32) << OFFSET);
464 self.w.bits |= ((value & MASK) as u32) << OFFSET;
465 self.w
466 }
467}
468#[doc = r" Proxy"]
469pub struct _FTIEW<'a> {
470 w: &'a mut W,
471}
472impl<'a> _FTIEW<'a> {
473 #[doc = r" Sets the field bit"]
474 pub fn set_bit(self) -> &'a mut W {
475 self.bit(true)
476 }
477 #[doc = r" Clears the field bit"]
478 pub fn clear_bit(self) -> &'a mut W {
479 self.bit(false)
480 }
481 #[doc = r" Writes raw bits to the field"]
482 #[inline]
483 pub fn bit(self, value: bool) -> &'a mut W {
484 const MASK: bool = true;
485 const OFFSET: u8 = 18;
486 self.w.bits &= !((MASK as u32) << OFFSET);
487 self.w.bits |= ((value & MASK) as u32) << OFFSET;
488 self.w
489 }
490}
491#[doc = r" Proxy"]
492pub struct _TCIEW<'a> {
493 w: &'a mut W,
494}
495impl<'a> _TCIEW<'a> {
496 #[doc = r" Sets the field bit"]
497 pub fn set_bit(self) -> &'a mut W {
498 self.bit(true)
499 }
500 #[doc = r" Clears the field bit"]
501 pub fn clear_bit(self) -> &'a mut W {
502 self.bit(false)
503 }
504 #[doc = r" Writes raw bits to the field"]
505 #[inline]
506 pub fn bit(self, value: bool) -> &'a mut W {
507 const MASK: bool = true;
508 const OFFSET: u8 = 17;
509 self.w.bits &= !((MASK as u32) << OFFSET);
510 self.w.bits |= ((value & MASK) as u32) << OFFSET;
511 self.w
512 }
513}
514#[doc = r" Proxy"]
515pub struct _TEIEW<'a> {
516 w: &'a mut W,
517}
518impl<'a> _TEIEW<'a> {
519 #[doc = r" Sets the field bit"]
520 pub fn set_bit(self) -> &'a mut W {
521 self.bit(true)
522 }
523 #[doc = r" Clears the field bit"]
524 pub fn clear_bit(self) -> &'a mut W {
525 self.bit(false)
526 }
527 #[doc = r" Writes raw bits to the field"]
528 #[inline]
529 pub fn bit(self, value: bool) -> &'a mut W {
530 const MASK: bool = true;
531 const OFFSET: u8 = 16;
532 self.w.bits &= !((MASK as u32) << OFFSET);
533 self.w.bits |= ((value & MASK) as u32) << OFFSET;
534 self.w
535 }
536}
537#[doc = r" Proxy"]
538pub struct _FTHRESW<'a> {
539 w: &'a mut W,
540}
541impl<'a> _FTHRESW<'a> {
542 #[doc = r" Writes raw bits to the field"]
543 #[inline]
544 pub unsafe fn bits(self, value: u8) -> &'a mut W {
545 const MASK: u8 = 31;
546 const OFFSET: u8 = 8;
547 self.w.bits &= !((MASK as u32) << OFFSET);
548 self.w.bits |= ((value & MASK) as u32) << OFFSET;
549 self.w
550 }
551}
552#[doc = r" Proxy"]
553pub struct _FSELW<'a> {
554 w: &'a mut W,
555}
556impl<'a> _FSELW<'a> {
557 #[doc = r" Sets the field bit"]
558 pub fn set_bit(self) -> &'a mut W {
559 self.bit(true)
560 }
561 #[doc = r" Clears the field bit"]
562 pub fn clear_bit(self) -> &'a mut W {
563 self.bit(false)
564 }
565 #[doc = r" Writes raw bits to the field"]
566 #[inline]
567 pub fn bit(self, value: bool) -> &'a mut W {
568 const MASK: bool = true;
569 const OFFSET: u8 = 7;
570 self.w.bits &= !((MASK as u32) << OFFSET);
571 self.w.bits |= ((value & MASK) as u32) << OFFSET;
572 self.w
573 }
574}
575#[doc = r" Proxy"]
576pub struct _DFMW<'a> {
577 w: &'a mut W,
578}
579impl<'a> _DFMW<'a> {
580 #[doc = r" Sets the field bit"]
581 pub fn set_bit(self) -> &'a mut W {
582 self.bit(true)
583 }
584 #[doc = r" Clears the field bit"]
585 pub fn clear_bit(self) -> &'a mut W {
586 self.bit(false)
587 }
588 #[doc = r" Writes raw bits to the field"]
589 #[inline]
590 pub fn bit(self, value: bool) -> &'a mut W {
591 const MASK: bool = true;
592 const OFFSET: u8 = 6;
593 self.w.bits &= !((MASK as u32) << OFFSET);
594 self.w.bits |= ((value & MASK) as u32) << OFFSET;
595 self.w
596 }
597}
598#[doc = r" Proxy"]
599pub struct _SSHIFTW<'a> {
600 w: &'a mut W,
601}
602impl<'a> _SSHIFTW<'a> {
603 #[doc = r" Sets the field bit"]
604 pub fn set_bit(self) -> &'a mut W {
605 self.bit(true)
606 }
607 #[doc = r" Clears the field bit"]
608 pub fn clear_bit(self) -> &'a mut W {
609 self.bit(false)
610 }
611 #[doc = r" Writes raw bits to the field"]
612 #[inline]
613 pub fn bit(self, value: bool) -> &'a mut W {
614 const MASK: bool = true;
615 const OFFSET: u8 = 4;
616 self.w.bits &= !((MASK as u32) << OFFSET);
617 self.w.bits |= ((value & MASK) as u32) << OFFSET;
618 self.w
619 }
620}
621#[doc = r" Proxy"]
622pub struct _TCENW<'a> {
623 w: &'a mut W,
624}
625impl<'a> _TCENW<'a> {
626 #[doc = r" Sets the field bit"]
627 pub fn set_bit(self) -> &'a mut W {
628 self.bit(true)
629 }
630 #[doc = r" Clears the field bit"]
631 pub fn clear_bit(self) -> &'a mut W {
632 self.bit(false)
633 }
634 #[doc = r" Writes raw bits to the field"]
635 #[inline]
636 pub fn bit(self, value: bool) -> &'a mut W {
637 const MASK: bool = true;
638 const OFFSET: u8 = 3;
639 self.w.bits &= !((MASK as u32) << OFFSET);
640 self.w.bits |= ((value & MASK) as u32) << OFFSET;
641 self.w
642 }
643}
644#[doc = r" Proxy"]
645pub struct _DMAENW<'a> {
646 w: &'a mut W,
647}
648impl<'a> _DMAENW<'a> {
649 #[doc = r" Sets the field bit"]
650 pub fn set_bit(self) -> &'a mut W {
651 self.bit(true)
652 }
653 #[doc = r" Clears the field bit"]
654 pub fn clear_bit(self) -> &'a mut W {
655 self.bit(false)
656 }
657 #[doc = r" Writes raw bits to the field"]
658 #[inline]
659 pub fn bit(self, value: bool) -> &'a mut W {
660 const MASK: bool = true;
661 const OFFSET: u8 = 2;
662 self.w.bits &= !((MASK as u32) << OFFSET);
663 self.w.bits |= ((value & MASK) as u32) << OFFSET;
664 self.w
665 }
666}
667#[doc = r" Proxy"]
668pub struct _ABORTW<'a> {
669 w: &'a mut W,
670}
671impl<'a> _ABORTW<'a> {
672 #[doc = r" Sets the field bit"]
673 pub fn set_bit(self) -> &'a mut W {
674 self.bit(true)
675 }
676 #[doc = r" Clears the field bit"]
677 pub fn clear_bit(self) -> &'a mut W {
678 self.bit(false)
679 }
680 #[doc = r" Writes raw bits to the field"]
681 #[inline]
682 pub fn bit(self, value: bool) -> &'a mut W {
683 const MASK: bool = true;
684 const OFFSET: u8 = 1;
685 self.w.bits &= !((MASK as u32) << OFFSET);
686 self.w.bits |= ((value & MASK) as u32) << OFFSET;
687 self.w
688 }
689}
690#[doc = r" Proxy"]
691pub struct _ENW<'a> {
692 w: &'a mut W,
693}
694impl<'a> _ENW<'a> {
695 #[doc = r" Sets the field bit"]
696 pub fn set_bit(self) -> &'a mut W {
697 self.bit(true)
698 }
699 #[doc = r" Clears the field bit"]
700 pub fn clear_bit(self) -> &'a mut W {
701 self.bit(false)
702 }
703 #[doc = r" Writes raw bits to the field"]
704 #[inline]
705 pub fn bit(self, value: bool) -> &'a mut W {
706 const MASK: bool = true;
707 const OFFSET: u8 = 0;
708 self.w.bits &= !((MASK as u32) << OFFSET);
709 self.w.bits |= ((value & MASK) as u32) << OFFSET;
710 self.w
711 }
712}
713impl R {
714 #[doc = r" Value of the register as raw bits"]
715 #[inline]
716 pub fn bits(&self) -> u32 {
717 self.bits
718 }
719 #[doc = "Bits 24:31 - Clock prescaler"]
720 #[inline]
721 pub fn prescaler(&self) -> PRESCALERR {
722 let bits = {
723 const MASK: u8 = 255;
724 const OFFSET: u8 = 24;
725 ((self.bits >> OFFSET) & MASK as u32) as u8
726 };
727 PRESCALERR { bits }
728 }
729 #[doc = "Bit 23 - Polling match mode"]
730 #[inline]
731 pub fn pmm(&self) -> PMMR {
732 let bits = {
733 const MASK: bool = true;
734 const OFFSET: u8 = 23;
735 ((self.bits >> OFFSET) & MASK as u32) != 0
736 };
737 PMMR { bits }
738 }
739 #[doc = "Bit 22 - Automatic poll mode stop"]
740 #[inline]
741 pub fn apms(&self) -> APMSR {
742 let bits = {
743 const MASK: bool = true;
744 const OFFSET: u8 = 22;
745 ((self.bits >> OFFSET) & MASK as u32) != 0
746 };
747 APMSR { bits }
748 }
749 #[doc = "Bit 20 - TimeOut interrupt enable"]
750 #[inline]
751 pub fn toie(&self) -> TOIER {
752 let bits = {
753 const MASK: bool = true;
754 const OFFSET: u8 = 20;
755 ((self.bits >> OFFSET) & MASK as u32) != 0
756 };
757 TOIER { bits }
758 }
759 #[doc = "Bit 19 - Status match interrupt enable"]
760 #[inline]
761 pub fn smie(&self) -> SMIER {
762 let bits = {
763 const MASK: bool = true;
764 const OFFSET: u8 = 19;
765 ((self.bits >> OFFSET) & MASK as u32) != 0
766 };
767 SMIER { bits }
768 }
769 #[doc = "Bit 18 - FIFO threshold interrupt enable"]
770 #[inline]
771 pub fn ftie(&self) -> FTIER {
772 let bits = {
773 const MASK: bool = true;
774 const OFFSET: u8 = 18;
775 ((self.bits >> OFFSET) & MASK as u32) != 0
776 };
777 FTIER { bits }
778 }
779 #[doc = "Bit 17 - Transfer complete interrupt enable"]
780 #[inline]
781 pub fn tcie(&self) -> TCIER {
782 let bits = {
783 const MASK: bool = true;
784 const OFFSET: u8 = 17;
785 ((self.bits >> OFFSET) & MASK as u32) != 0
786 };
787 TCIER { bits }
788 }
789 #[doc = "Bit 16 - Transfer error interrupt enable"]
790 #[inline]
791 pub fn teie(&self) -> TEIER {
792 let bits = {
793 const MASK: bool = true;
794 const OFFSET: u8 = 16;
795 ((self.bits >> OFFSET) & MASK as u32) != 0
796 };
797 TEIER { bits }
798 }
799 #[doc = "Bits 8:12 - IFO threshold level"]
800 #[inline]
801 pub fn fthres(&self) -> FTHRESR {
802 let bits = {
803 const MASK: u8 = 31;
804 const OFFSET: u8 = 8;
805 ((self.bits >> OFFSET) & MASK as u32) as u8
806 };
807 FTHRESR { bits }
808 }
809 #[doc = "Bit 7 - FLASH memory selection"]
810 #[inline]
811 pub fn fsel(&self) -> FSELR {
812 let bits = {
813 const MASK: bool = true;
814 const OFFSET: u8 = 7;
815 ((self.bits >> OFFSET) & MASK as u32) != 0
816 };
817 FSELR { bits }
818 }
819 #[doc = "Bit 6 - Dual-flash mode"]
820 #[inline]
821 pub fn dfm(&self) -> DFMR {
822 let bits = {
823 const MASK: bool = true;
824 const OFFSET: u8 = 6;
825 ((self.bits >> OFFSET) & MASK as u32) != 0
826 };
827 DFMR { bits }
828 }
829 #[doc = "Bit 4 - Sample shift"]
830 #[inline]
831 pub fn sshift(&self) -> SSHIFTR {
832 let bits = {
833 const MASK: bool = true;
834 const OFFSET: u8 = 4;
835 ((self.bits >> OFFSET) & MASK as u32) != 0
836 };
837 SSHIFTR { bits }
838 }
839 #[doc = "Bit 3 - Timeout counter enable"]
840 #[inline]
841 pub fn tcen(&self) -> TCENR {
842 let bits = {
843 const MASK: bool = true;
844 const OFFSET: u8 = 3;
845 ((self.bits >> OFFSET) & MASK as u32) != 0
846 };
847 TCENR { bits }
848 }
849 #[doc = "Bit 2 - DMA enable"]
850 #[inline]
851 pub fn dmaen(&self) -> DMAENR {
852 let bits = {
853 const MASK: bool = true;
854 const OFFSET: u8 = 2;
855 ((self.bits >> OFFSET) & MASK as u32) != 0
856 };
857 DMAENR { bits }
858 }
859 #[doc = "Bit 1 - Abort request"]
860 #[inline]
861 pub fn abort(&self) -> ABORTR {
862 let bits = {
863 const MASK: bool = true;
864 const OFFSET: u8 = 1;
865 ((self.bits >> OFFSET) & MASK as u32) != 0
866 };
867 ABORTR { bits }
868 }
869 #[doc = "Bit 0 - Enable"]
870 #[inline]
871 pub fn en(&self) -> ENR {
872 let bits = {
873 const MASK: bool = true;
874 const OFFSET: u8 = 0;
875 ((self.bits >> OFFSET) & MASK as u32) != 0
876 };
877 ENR { bits }
878 }
879}
880impl W {
881 #[doc = r" Reset value of the register"]
882 #[inline]
883 pub fn reset_value() -> W {
884 W { bits: 0 }
885 }
886 #[doc = r" Writes raw bits to the register"]
887 #[inline]
888 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
889 self.bits = bits;
890 self
891 }
892 #[doc = "Bits 24:31 - Clock prescaler"]
893 #[inline]
894 pub fn prescaler(&mut self) -> _PRESCALERW {
895 _PRESCALERW { w: self }
896 }
897 #[doc = "Bit 23 - Polling match mode"]
898 #[inline]
899 pub fn pmm(&mut self) -> _PMMW {
900 _PMMW { w: self }
901 }
902 #[doc = "Bit 22 - Automatic poll mode stop"]
903 #[inline]
904 pub fn apms(&mut self) -> _APMSW {
905 _APMSW { w: self }
906 }
907 #[doc = "Bit 20 - TimeOut interrupt enable"]
908 #[inline]
909 pub fn toie(&mut self) -> _TOIEW {
910 _TOIEW { w: self }
911 }
912 #[doc = "Bit 19 - Status match interrupt enable"]
913 #[inline]
914 pub fn smie(&mut self) -> _SMIEW {
915 _SMIEW { w: self }
916 }
917 #[doc = "Bit 18 - FIFO threshold interrupt enable"]
918 #[inline]
919 pub fn ftie(&mut self) -> _FTIEW {
920 _FTIEW { w: self }
921 }
922 #[doc = "Bit 17 - Transfer complete interrupt enable"]
923 #[inline]
924 pub fn tcie(&mut self) -> _TCIEW {
925 _TCIEW { w: self }
926 }
927 #[doc = "Bit 16 - Transfer error interrupt enable"]
928 #[inline]
929 pub fn teie(&mut self) -> _TEIEW {
930 _TEIEW { w: self }
931 }
932 #[doc = "Bits 8:12 - IFO threshold level"]
933 #[inline]
934 pub fn fthres(&mut self) -> _FTHRESW {
935 _FTHRESW { w: self }
936 }
937 #[doc = "Bit 7 - FLASH memory selection"]
938 #[inline]
939 pub fn fsel(&mut self) -> _FSELW {
940 _FSELW { w: self }
941 }
942 #[doc = "Bit 6 - Dual-flash mode"]
943 #[inline]
944 pub fn dfm(&mut self) -> _DFMW {
945 _DFMW { w: self }
946 }
947 #[doc = "Bit 4 - Sample shift"]
948 #[inline]
949 pub fn sshift(&mut self) -> _SSHIFTW {
950 _SSHIFTW { w: self }
951 }
952 #[doc = "Bit 3 - Timeout counter enable"]
953 #[inline]
954 pub fn tcen(&mut self) -> _TCENW {
955 _TCENW { w: self }
956 }
957 #[doc = "Bit 2 - DMA enable"]
958 #[inline]
959 pub fn dmaen(&mut self) -> _DMAENW {
960 _DMAENW { w: self }
961 }
962 #[doc = "Bit 1 - Abort request"]
963 #[inline]
964 pub fn abort(&mut self) -> _ABORTW {
965 _ABORTW { w: self }
966 }
967 #[doc = "Bit 0 - Enable"]
968 #[inline]
969 pub fn en(&mut self) -> _ENW {
970 _ENW { w: self }
971 }
972}