stm32l4x2_pac/usart3/
isr.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::ISR {
6 #[doc = r" Reads the contents of the register"]
7 #[inline]
8 pub fn read(&self) -> R {
9 R {
10 bits: self.register.get(),
11 }
12 }
13}
14#[doc = r" Value of the field"]
15pub struct REACKR {
16 bits: bool,
17}
18impl REACKR {
19 #[doc = r" Value of the field as raw bits"]
20 #[inline]
21 pub fn bit(&self) -> bool {
22 self.bits
23 }
24 #[doc = r" Returns `true` if the bit is clear (0)"]
25 #[inline]
26 pub fn bit_is_clear(&self) -> bool {
27 !self.bit()
28 }
29 #[doc = r" Returns `true` if the bit is set (1)"]
30 #[inline]
31 pub fn bit_is_set(&self) -> bool {
32 self.bit()
33 }
34}
35#[doc = r" Value of the field"]
36pub struct TEACKR {
37 bits: bool,
38}
39impl TEACKR {
40 #[doc = r" Value of the field as raw bits"]
41 #[inline]
42 pub fn bit(&self) -> bool {
43 self.bits
44 }
45 #[doc = r" Returns `true` if the bit is clear (0)"]
46 #[inline]
47 pub fn bit_is_clear(&self) -> bool {
48 !self.bit()
49 }
50 #[doc = r" Returns `true` if the bit is set (1)"]
51 #[inline]
52 pub fn bit_is_set(&self) -> bool {
53 self.bit()
54 }
55}
56#[doc = r" Value of the field"]
57pub struct WUFR {
58 bits: bool,
59}
60impl WUFR {
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 RWUR {
79 bits: bool,
80}
81impl RWUR {
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 SBKFR {
100 bits: bool,
101}
102impl SBKFR {
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 CMFR {
121 bits: bool,
122}
123impl CMFR {
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 BUSYR {
142 bits: bool,
143}
144impl BUSYR {
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 ABRFR {
163 bits: bool,
164}
165impl ABRFR {
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 ABRER {
184 bits: bool,
185}
186impl ABRER {
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 EOBFR {
205 bits: bool,
206}
207impl EOBFR {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bit(&self) -> bool {
211 self.bits
212 }
213 #[doc = r" Returns `true` if the bit is clear (0)"]
214 #[inline]
215 pub fn bit_is_clear(&self) -> bool {
216 !self.bit()
217 }
218 #[doc = r" Returns `true` if the bit is set (1)"]
219 #[inline]
220 pub fn bit_is_set(&self) -> bool {
221 self.bit()
222 }
223}
224#[doc = r" Value of the field"]
225pub struct RTOFR {
226 bits: bool,
227}
228impl RTOFR {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bit(&self) -> bool {
232 self.bits
233 }
234 #[doc = r" Returns `true` if the bit is clear (0)"]
235 #[inline]
236 pub fn bit_is_clear(&self) -> bool {
237 !self.bit()
238 }
239 #[doc = r" Returns `true` if the bit is set (1)"]
240 #[inline]
241 pub fn bit_is_set(&self) -> bool {
242 self.bit()
243 }
244}
245#[doc = r" Value of the field"]
246pub struct CTSR {
247 bits: bool,
248}
249impl CTSR {
250 #[doc = r" Value of the field as raw bits"]
251 #[inline]
252 pub fn bit(&self) -> bool {
253 self.bits
254 }
255 #[doc = r" Returns `true` if the bit is clear (0)"]
256 #[inline]
257 pub fn bit_is_clear(&self) -> bool {
258 !self.bit()
259 }
260 #[doc = r" Returns `true` if the bit is set (1)"]
261 #[inline]
262 pub fn bit_is_set(&self) -> bool {
263 self.bit()
264 }
265}
266#[doc = r" Value of the field"]
267pub struct CTSIFR {
268 bits: bool,
269}
270impl CTSIFR {
271 #[doc = r" Value of the field as raw bits"]
272 #[inline]
273 pub fn bit(&self) -> bool {
274 self.bits
275 }
276 #[doc = r" Returns `true` if the bit is clear (0)"]
277 #[inline]
278 pub fn bit_is_clear(&self) -> bool {
279 !self.bit()
280 }
281 #[doc = r" Returns `true` if the bit is set (1)"]
282 #[inline]
283 pub fn bit_is_set(&self) -> bool {
284 self.bit()
285 }
286}
287#[doc = r" Value of the field"]
288pub struct LBDFR {
289 bits: bool,
290}
291impl LBDFR {
292 #[doc = r" Value of the field as raw bits"]
293 #[inline]
294 pub fn bit(&self) -> bool {
295 self.bits
296 }
297 #[doc = r" Returns `true` if the bit is clear (0)"]
298 #[inline]
299 pub fn bit_is_clear(&self) -> bool {
300 !self.bit()
301 }
302 #[doc = r" Returns `true` if the bit is set (1)"]
303 #[inline]
304 pub fn bit_is_set(&self) -> bool {
305 self.bit()
306 }
307}
308#[doc = r" Value of the field"]
309pub struct TXER {
310 bits: bool,
311}
312impl TXER {
313 #[doc = r" Value of the field as raw bits"]
314 #[inline]
315 pub fn bit(&self) -> bool {
316 self.bits
317 }
318 #[doc = r" Returns `true` if the bit is clear (0)"]
319 #[inline]
320 pub fn bit_is_clear(&self) -> bool {
321 !self.bit()
322 }
323 #[doc = r" Returns `true` if the bit is set (1)"]
324 #[inline]
325 pub fn bit_is_set(&self) -> bool {
326 self.bit()
327 }
328}
329#[doc = r" Value of the field"]
330pub struct TCR {
331 bits: bool,
332}
333impl TCR {
334 #[doc = r" Value of the field as raw bits"]
335 #[inline]
336 pub fn bit(&self) -> bool {
337 self.bits
338 }
339 #[doc = r" Returns `true` if the bit is clear (0)"]
340 #[inline]
341 pub fn bit_is_clear(&self) -> bool {
342 !self.bit()
343 }
344 #[doc = r" Returns `true` if the bit is set (1)"]
345 #[inline]
346 pub fn bit_is_set(&self) -> bool {
347 self.bit()
348 }
349}
350#[doc = r" Value of the field"]
351pub struct RXNER {
352 bits: bool,
353}
354impl RXNER {
355 #[doc = r" Value of the field as raw bits"]
356 #[inline]
357 pub fn bit(&self) -> bool {
358 self.bits
359 }
360 #[doc = r" Returns `true` if the bit is clear (0)"]
361 #[inline]
362 pub fn bit_is_clear(&self) -> bool {
363 !self.bit()
364 }
365 #[doc = r" Returns `true` if the bit is set (1)"]
366 #[inline]
367 pub fn bit_is_set(&self) -> bool {
368 self.bit()
369 }
370}
371#[doc = r" Value of the field"]
372pub struct IDLER {
373 bits: bool,
374}
375impl IDLER {
376 #[doc = r" Value of the field as raw bits"]
377 #[inline]
378 pub fn bit(&self) -> bool {
379 self.bits
380 }
381 #[doc = r" Returns `true` if the bit is clear (0)"]
382 #[inline]
383 pub fn bit_is_clear(&self) -> bool {
384 !self.bit()
385 }
386 #[doc = r" Returns `true` if the bit is set (1)"]
387 #[inline]
388 pub fn bit_is_set(&self) -> bool {
389 self.bit()
390 }
391}
392#[doc = r" Value of the field"]
393pub struct ORER {
394 bits: bool,
395}
396impl ORER {
397 #[doc = r" Value of the field as raw bits"]
398 #[inline]
399 pub fn bit(&self) -> bool {
400 self.bits
401 }
402 #[doc = r" Returns `true` if the bit is clear (0)"]
403 #[inline]
404 pub fn bit_is_clear(&self) -> bool {
405 !self.bit()
406 }
407 #[doc = r" Returns `true` if the bit is set (1)"]
408 #[inline]
409 pub fn bit_is_set(&self) -> bool {
410 self.bit()
411 }
412}
413#[doc = r" Value of the field"]
414pub struct NFR {
415 bits: bool,
416}
417impl NFR {
418 #[doc = r" Value of the field as raw bits"]
419 #[inline]
420 pub fn bit(&self) -> bool {
421 self.bits
422 }
423 #[doc = r" Returns `true` if the bit is clear (0)"]
424 #[inline]
425 pub fn bit_is_clear(&self) -> bool {
426 !self.bit()
427 }
428 #[doc = r" Returns `true` if the bit is set (1)"]
429 #[inline]
430 pub fn bit_is_set(&self) -> bool {
431 self.bit()
432 }
433}
434#[doc = r" Value of the field"]
435pub struct FER {
436 bits: bool,
437}
438impl FER {
439 #[doc = r" Value of the field as raw bits"]
440 #[inline]
441 pub fn bit(&self) -> bool {
442 self.bits
443 }
444 #[doc = r" Returns `true` if the bit is clear (0)"]
445 #[inline]
446 pub fn bit_is_clear(&self) -> bool {
447 !self.bit()
448 }
449 #[doc = r" Returns `true` if the bit is set (1)"]
450 #[inline]
451 pub fn bit_is_set(&self) -> bool {
452 self.bit()
453 }
454}
455#[doc = r" Value of the field"]
456pub struct PER {
457 bits: bool,
458}
459impl PER {
460 #[doc = r" Value of the field as raw bits"]
461 #[inline]
462 pub fn bit(&self) -> bool {
463 self.bits
464 }
465 #[doc = r" Returns `true` if the bit is clear (0)"]
466 #[inline]
467 pub fn bit_is_clear(&self) -> bool {
468 !self.bit()
469 }
470 #[doc = r" Returns `true` if the bit is set (1)"]
471 #[inline]
472 pub fn bit_is_set(&self) -> bool {
473 self.bit()
474 }
475}
476#[doc = "Possible values of the field `TCBGT`"]
477#[derive(Clone, Copy, Debug, PartialEq)]
478pub enum TCBGTR {
479 #[doc = "Transmission not completed"]
480 NOTCOMPLETED,
481 #[doc = "Transmission has completed"]
482 COMPLETED,
483}
484impl TCBGTR {
485 #[doc = r" Returns `true` if the bit is clear (0)"]
486 #[inline]
487 pub fn bit_is_clear(&self) -> bool {
488 !self.bit()
489 }
490 #[doc = r" Returns `true` if the bit is set (1)"]
491 #[inline]
492 pub fn bit_is_set(&self) -> bool {
493 self.bit()
494 }
495 #[doc = r" Value of the field as raw bits"]
496 #[inline]
497 pub fn bit(&self) -> bool {
498 match *self {
499 TCBGTR::NOTCOMPLETED => false,
500 TCBGTR::COMPLETED => true,
501 }
502 }
503 #[allow(missing_docs)]
504 #[doc(hidden)]
505 #[inline]
506 pub fn _from(value: bool) -> TCBGTR {
507 match value {
508 false => TCBGTR::NOTCOMPLETED,
509 true => TCBGTR::COMPLETED,
510 }
511 }
512 #[doc = "Checks if the value of the field is `NOTCOMPLETED`"]
513 #[inline]
514 pub fn is_not_completed(&self) -> bool {
515 *self == TCBGTR::NOTCOMPLETED
516 }
517 #[doc = "Checks if the value of the field is `COMPLETED`"]
518 #[inline]
519 pub fn is_completed(&self) -> bool {
520 *self == TCBGTR::COMPLETED
521 }
522}
523impl R {
524 #[doc = r" Value of the register as raw bits"]
525 #[inline]
526 pub fn bits(&self) -> u32 {
527 self.bits
528 }
529 #[doc = "Bit 22 - REACK"]
530 #[inline]
531 pub fn reack(&self) -> REACKR {
532 let bits = {
533 const MASK: bool = true;
534 const OFFSET: u8 = 22;
535 ((self.bits >> OFFSET) & MASK as u32) != 0
536 };
537 REACKR { bits }
538 }
539 #[doc = "Bit 21 - TEACK"]
540 #[inline]
541 pub fn teack(&self) -> TEACKR {
542 let bits = {
543 const MASK: bool = true;
544 const OFFSET: u8 = 21;
545 ((self.bits >> OFFSET) & MASK as u32) != 0
546 };
547 TEACKR { bits }
548 }
549 #[doc = "Bit 20 - WUF"]
550 #[inline]
551 pub fn wuf(&self) -> WUFR {
552 let bits = {
553 const MASK: bool = true;
554 const OFFSET: u8 = 20;
555 ((self.bits >> OFFSET) & MASK as u32) != 0
556 };
557 WUFR { bits }
558 }
559 #[doc = "Bit 19 - RWU"]
560 #[inline]
561 pub fn rwu(&self) -> RWUR {
562 let bits = {
563 const MASK: bool = true;
564 const OFFSET: u8 = 19;
565 ((self.bits >> OFFSET) & MASK as u32) != 0
566 };
567 RWUR { bits }
568 }
569 #[doc = "Bit 18 - SBKF"]
570 #[inline]
571 pub fn sbkf(&self) -> SBKFR {
572 let bits = {
573 const MASK: bool = true;
574 const OFFSET: u8 = 18;
575 ((self.bits >> OFFSET) & MASK as u32) != 0
576 };
577 SBKFR { bits }
578 }
579 #[doc = "Bit 17 - CMF"]
580 #[inline]
581 pub fn cmf(&self) -> CMFR {
582 let bits = {
583 const MASK: bool = true;
584 const OFFSET: u8 = 17;
585 ((self.bits >> OFFSET) & MASK as u32) != 0
586 };
587 CMFR { bits }
588 }
589 #[doc = "Bit 16 - BUSY"]
590 #[inline]
591 pub fn busy(&self) -> BUSYR {
592 let bits = {
593 const MASK: bool = true;
594 const OFFSET: u8 = 16;
595 ((self.bits >> OFFSET) & MASK as u32) != 0
596 };
597 BUSYR { bits }
598 }
599 #[doc = "Bit 15 - ABRF"]
600 #[inline]
601 pub fn abrf(&self) -> ABRFR {
602 let bits = {
603 const MASK: bool = true;
604 const OFFSET: u8 = 15;
605 ((self.bits >> OFFSET) & MASK as u32) != 0
606 };
607 ABRFR { bits }
608 }
609 #[doc = "Bit 14 - ABRE"]
610 #[inline]
611 pub fn abre(&self) -> ABRER {
612 let bits = {
613 const MASK: bool = true;
614 const OFFSET: u8 = 14;
615 ((self.bits >> OFFSET) & MASK as u32) != 0
616 };
617 ABRER { bits }
618 }
619 #[doc = "Bit 12 - EOBF"]
620 #[inline]
621 pub fn eobf(&self) -> EOBFR {
622 let bits = {
623 const MASK: bool = true;
624 const OFFSET: u8 = 12;
625 ((self.bits >> OFFSET) & MASK as u32) != 0
626 };
627 EOBFR { bits }
628 }
629 #[doc = "Bit 11 - RTOF"]
630 #[inline]
631 pub fn rtof(&self) -> RTOFR {
632 let bits = {
633 const MASK: bool = true;
634 const OFFSET: u8 = 11;
635 ((self.bits >> OFFSET) & MASK as u32) != 0
636 };
637 RTOFR { bits }
638 }
639 #[doc = "Bit 10 - CTS"]
640 #[inline]
641 pub fn cts(&self) -> CTSR {
642 let bits = {
643 const MASK: bool = true;
644 const OFFSET: u8 = 10;
645 ((self.bits >> OFFSET) & MASK as u32) != 0
646 };
647 CTSR { bits }
648 }
649 #[doc = "Bit 9 - CTSIF"]
650 #[inline]
651 pub fn ctsif(&self) -> CTSIFR {
652 let bits = {
653 const MASK: bool = true;
654 const OFFSET: u8 = 9;
655 ((self.bits >> OFFSET) & MASK as u32) != 0
656 };
657 CTSIFR { bits }
658 }
659 #[doc = "Bit 8 - LBDF"]
660 #[inline]
661 pub fn lbdf(&self) -> LBDFR {
662 let bits = {
663 const MASK: bool = true;
664 const OFFSET: u8 = 8;
665 ((self.bits >> OFFSET) & MASK as u32) != 0
666 };
667 LBDFR { bits }
668 }
669 #[doc = "Bit 7 - TXE"]
670 #[inline]
671 pub fn txe(&self) -> TXER {
672 let bits = {
673 const MASK: bool = true;
674 const OFFSET: u8 = 7;
675 ((self.bits >> OFFSET) & MASK as u32) != 0
676 };
677 TXER { bits }
678 }
679 #[doc = "Bit 6 - TC"]
680 #[inline]
681 pub fn tc(&self) -> TCR {
682 let bits = {
683 const MASK: bool = true;
684 const OFFSET: u8 = 6;
685 ((self.bits >> OFFSET) & MASK as u32) != 0
686 };
687 TCR { bits }
688 }
689 #[doc = "Bit 5 - RXNE"]
690 #[inline]
691 pub fn rxne(&self) -> RXNER {
692 let bits = {
693 const MASK: bool = true;
694 const OFFSET: u8 = 5;
695 ((self.bits >> OFFSET) & MASK as u32) != 0
696 };
697 RXNER { bits }
698 }
699 #[doc = "Bit 4 - IDLE"]
700 #[inline]
701 pub fn idle(&self) -> IDLER {
702 let bits = {
703 const MASK: bool = true;
704 const OFFSET: u8 = 4;
705 ((self.bits >> OFFSET) & MASK as u32) != 0
706 };
707 IDLER { bits }
708 }
709 #[doc = "Bit 3 - ORE"]
710 #[inline]
711 pub fn ore(&self) -> ORER {
712 let bits = {
713 const MASK: bool = true;
714 const OFFSET: u8 = 3;
715 ((self.bits >> OFFSET) & MASK as u32) != 0
716 };
717 ORER { bits }
718 }
719 #[doc = "Bit 2 - NF"]
720 #[inline]
721 pub fn nf(&self) -> NFR {
722 let bits = {
723 const MASK: bool = true;
724 const OFFSET: u8 = 2;
725 ((self.bits >> OFFSET) & MASK as u32) != 0
726 };
727 NFR { bits }
728 }
729 #[doc = "Bit 1 - FE"]
730 #[inline]
731 pub fn fe(&self) -> FER {
732 let bits = {
733 const MASK: bool = true;
734 const OFFSET: u8 = 1;
735 ((self.bits >> OFFSET) & MASK as u32) != 0
736 };
737 FER { bits }
738 }
739 #[doc = "Bit 0 - PE"]
740 #[inline]
741 pub fn pe(&self) -> PER {
742 let bits = {
743 const MASK: bool = true;
744 const OFFSET: u8 = 0;
745 ((self.bits >> OFFSET) & MASK as u32) != 0
746 };
747 PER { bits }
748 }
749 #[doc = "Bit 25 - Transmission complete before guard time completion"]
750 #[inline]
751 pub fn tcbgt(&self) -> TCBGTR {
752 TCBGTR::_from({
753 const MASK: bool = true;
754 const OFFSET: u8 = 25;
755 ((self.bits >> OFFSET) & MASK as u32) != 0
756 })
757 }
758}