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::PSR_ASCMODE {
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 = "Possible values of the field `TXIDLE`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum TXIDLER {
48 #[doc = "The transmitter line has not yet been idle."]
49 VALUE1,
50 #[doc = "The transmitter line has been idle and frame transmission is possible."]
51 VALUE2,
52}
53impl TXIDLER {
54 #[doc = r" Returns `true` if the bit is clear (0)"]
55 #[inline]
56 pub fn bit_is_clear(&self) -> bool {
57 !self.bit()
58 }
59 #[doc = r" Returns `true` if the bit is set (1)"]
60 #[inline]
61 pub fn bit_is_set(&self) -> bool {
62 self.bit()
63 }
64 #[doc = r" Value of the field as raw bits"]
65 #[inline]
66 pub fn bit(&self) -> bool {
67 match *self {
68 TXIDLER::VALUE1 => false,
69 TXIDLER::VALUE2 => true,
70 }
71 }
72 #[allow(missing_docs)]
73 #[doc(hidden)]
74 #[inline]
75 pub fn _from(value: bool) -> TXIDLER {
76 match value {
77 false => TXIDLER::VALUE1,
78 true => TXIDLER::VALUE2,
79 }
80 }
81 #[doc = "Checks if the value of the field is `VALUE1`"]
82 #[inline]
83 pub fn is_value1(&self) -> bool {
84 *self == TXIDLER::VALUE1
85 }
86 #[doc = "Checks if the value of the field is `VALUE2`"]
87 #[inline]
88 pub fn is_value2(&self) -> bool {
89 *self == TXIDLER::VALUE2
90 }
91}
92#[doc = "Possible values of the field `RXIDLE`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum RXIDLER {
95 #[doc = "The receiver line has not yet been idle."]
96 VALUE1,
97 #[doc = "The receiver line has been idle and frame reception is possible."]
98 VALUE2,
99}
100impl RXIDLER {
101 #[doc = r" Returns `true` if the bit is clear (0)"]
102 #[inline]
103 pub fn bit_is_clear(&self) -> bool {
104 !self.bit()
105 }
106 #[doc = r" Returns `true` if the bit is set (1)"]
107 #[inline]
108 pub fn bit_is_set(&self) -> bool {
109 self.bit()
110 }
111 #[doc = r" Value of the field as raw bits"]
112 #[inline]
113 pub fn bit(&self) -> bool {
114 match *self {
115 RXIDLER::VALUE1 => false,
116 RXIDLER::VALUE2 => true,
117 }
118 }
119 #[allow(missing_docs)]
120 #[doc(hidden)]
121 #[inline]
122 pub fn _from(value: bool) -> RXIDLER {
123 match value {
124 false => RXIDLER::VALUE1,
125 true => RXIDLER::VALUE2,
126 }
127 }
128 #[doc = "Checks if the value of the field is `VALUE1`"]
129 #[inline]
130 pub fn is_value1(&self) -> bool {
131 *self == RXIDLER::VALUE1
132 }
133 #[doc = "Checks if the value of the field is `VALUE2`"]
134 #[inline]
135 pub fn is_value2(&self) -> bool {
136 *self == RXIDLER::VALUE2
137 }
138}
139#[doc = "Possible values of the field `SBD`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum SBDR {
142 #[doc = "A synchronization break has not yet been detected."]
143 VALUE1,
144 #[doc = "A synchronization break has been detected."]
145 VALUE2,
146}
147impl SBDR {
148 #[doc = r" Returns `true` if the bit is clear (0)"]
149 #[inline]
150 pub fn bit_is_clear(&self) -> bool {
151 !self.bit()
152 }
153 #[doc = r" Returns `true` if the bit is set (1)"]
154 #[inline]
155 pub fn bit_is_set(&self) -> bool {
156 self.bit()
157 }
158 #[doc = r" Value of the field as raw bits"]
159 #[inline]
160 pub fn bit(&self) -> bool {
161 match *self {
162 SBDR::VALUE1 => false,
163 SBDR::VALUE2 => true,
164 }
165 }
166 #[allow(missing_docs)]
167 #[doc(hidden)]
168 #[inline]
169 pub fn _from(value: bool) -> SBDR {
170 match value {
171 false => SBDR::VALUE1,
172 true => SBDR::VALUE2,
173 }
174 }
175 #[doc = "Checks if the value of the field is `VALUE1`"]
176 #[inline]
177 pub fn is_value1(&self) -> bool {
178 *self == SBDR::VALUE1
179 }
180 #[doc = "Checks if the value of the field is `VALUE2`"]
181 #[inline]
182 pub fn is_value2(&self) -> bool {
183 *self == SBDR::VALUE2
184 }
185}
186#[doc = "Possible values of the field `COL`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum COLR {
189 #[doc = "A collision has not yet been detected and frame transmission is possible."]
190 VALUE1,
191 #[doc = "A collision has been detected and frame transmission is not possible."]
192 VALUE2,
193}
194impl COLR {
195 #[doc = r" Returns `true` if the bit is clear (0)"]
196 #[inline]
197 pub fn bit_is_clear(&self) -> bool {
198 !self.bit()
199 }
200 #[doc = r" Returns `true` if the bit is set (1)"]
201 #[inline]
202 pub fn bit_is_set(&self) -> bool {
203 self.bit()
204 }
205 #[doc = r" Value of the field as raw bits"]
206 #[inline]
207 pub fn bit(&self) -> bool {
208 match *self {
209 COLR::VALUE1 => false,
210 COLR::VALUE2 => true,
211 }
212 }
213 #[allow(missing_docs)]
214 #[doc(hidden)]
215 #[inline]
216 pub fn _from(value: bool) -> COLR {
217 match value {
218 false => COLR::VALUE1,
219 true => COLR::VALUE2,
220 }
221 }
222 #[doc = "Checks if the value of the field is `VALUE1`"]
223 #[inline]
224 pub fn is_value1(&self) -> bool {
225 *self == COLR::VALUE1
226 }
227 #[doc = "Checks if the value of the field is `VALUE2`"]
228 #[inline]
229 pub fn is_value2(&self) -> bool {
230 *self == COLR::VALUE2
231 }
232}
233#[doc = "Possible values of the field `RNS`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum RNSR {
236 #[doc = "Receiver noise has not been detected."]
237 VALUE1,
238 #[doc = "Receiver noise has been detected."]
239 VALUE2,
240}
241impl RNSR {
242 #[doc = r" Returns `true` if the bit is clear (0)"]
243 #[inline]
244 pub fn bit_is_clear(&self) -> bool {
245 !self.bit()
246 }
247 #[doc = r" Returns `true` if the bit is set (1)"]
248 #[inline]
249 pub fn bit_is_set(&self) -> bool {
250 self.bit()
251 }
252 #[doc = r" Value of the field as raw bits"]
253 #[inline]
254 pub fn bit(&self) -> bool {
255 match *self {
256 RNSR::VALUE1 => false,
257 RNSR::VALUE2 => true,
258 }
259 }
260 #[allow(missing_docs)]
261 #[doc(hidden)]
262 #[inline]
263 pub fn _from(value: bool) -> RNSR {
264 match value {
265 false => RNSR::VALUE1,
266 true => RNSR::VALUE2,
267 }
268 }
269 #[doc = "Checks if the value of the field is `VALUE1`"]
270 #[inline]
271 pub fn is_value1(&self) -> bool {
272 *self == RNSR::VALUE1
273 }
274 #[doc = "Checks if the value of the field is `VALUE2`"]
275 #[inline]
276 pub fn is_value2(&self) -> bool {
277 *self == RNSR::VALUE2
278 }
279}
280#[doc = "Possible values of the field `FER0`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum FER0R {
283 #[doc = "A format error 0 has not been detected."]
284 VALUE1,
285 #[doc = "A format error 0 has been detected."]
286 VALUE2,
287}
288impl FER0R {
289 #[doc = r" Returns `true` if the bit is clear (0)"]
290 #[inline]
291 pub fn bit_is_clear(&self) -> bool {
292 !self.bit()
293 }
294 #[doc = r" Returns `true` if the bit is set (1)"]
295 #[inline]
296 pub fn bit_is_set(&self) -> bool {
297 self.bit()
298 }
299 #[doc = r" Value of the field as raw bits"]
300 #[inline]
301 pub fn bit(&self) -> bool {
302 match *self {
303 FER0R::VALUE1 => false,
304 FER0R::VALUE2 => true,
305 }
306 }
307 #[allow(missing_docs)]
308 #[doc(hidden)]
309 #[inline]
310 pub fn _from(value: bool) -> FER0R {
311 match value {
312 false => FER0R::VALUE1,
313 true => FER0R::VALUE2,
314 }
315 }
316 #[doc = "Checks if the value of the field is `VALUE1`"]
317 #[inline]
318 pub fn is_value1(&self) -> bool {
319 *self == FER0R::VALUE1
320 }
321 #[doc = "Checks if the value of the field is `VALUE2`"]
322 #[inline]
323 pub fn is_value2(&self) -> bool {
324 *self == FER0R::VALUE2
325 }
326}
327#[doc = "Possible values of the field `FER1`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum FER1R {
330 #[doc = "A format error 1 has not been detected."]
331 VALUE1,
332 #[doc = "A format error 1 has been detected."]
333 VALUE2,
334}
335impl FER1R {
336 #[doc = r" Returns `true` if the bit is clear (0)"]
337 #[inline]
338 pub fn bit_is_clear(&self) -> bool {
339 !self.bit()
340 }
341 #[doc = r" Returns `true` if the bit is set (1)"]
342 #[inline]
343 pub fn bit_is_set(&self) -> bool {
344 self.bit()
345 }
346 #[doc = r" Value of the field as raw bits"]
347 #[inline]
348 pub fn bit(&self) -> bool {
349 match *self {
350 FER1R::VALUE1 => false,
351 FER1R::VALUE2 => true,
352 }
353 }
354 #[allow(missing_docs)]
355 #[doc(hidden)]
356 #[inline]
357 pub fn _from(value: bool) -> FER1R {
358 match value {
359 false => FER1R::VALUE1,
360 true => FER1R::VALUE2,
361 }
362 }
363 #[doc = "Checks if the value of the field is `VALUE1`"]
364 #[inline]
365 pub fn is_value1(&self) -> bool {
366 *self == FER1R::VALUE1
367 }
368 #[doc = "Checks if the value of the field is `VALUE2`"]
369 #[inline]
370 pub fn is_value2(&self) -> bool {
371 *self == FER1R::VALUE2
372 }
373}
374#[doc = "Possible values of the field `RFF`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum RFFR {
377 #[doc = "The received frame is not yet finished."]
378 VALUE1,
379 #[doc = "The received frame is finished."]
380 VALUE2,
381}
382impl RFFR {
383 #[doc = r" Returns `true` if the bit is clear (0)"]
384 #[inline]
385 pub fn bit_is_clear(&self) -> bool {
386 !self.bit()
387 }
388 #[doc = r" Returns `true` if the bit is set (1)"]
389 #[inline]
390 pub fn bit_is_set(&self) -> bool {
391 self.bit()
392 }
393 #[doc = r" Value of the field as raw bits"]
394 #[inline]
395 pub fn bit(&self) -> bool {
396 match *self {
397 RFFR::VALUE1 => false,
398 RFFR::VALUE2 => true,
399 }
400 }
401 #[allow(missing_docs)]
402 #[doc(hidden)]
403 #[inline]
404 pub fn _from(value: bool) -> RFFR {
405 match value {
406 false => RFFR::VALUE1,
407 true => RFFR::VALUE2,
408 }
409 }
410 #[doc = "Checks if the value of the field is `VALUE1`"]
411 #[inline]
412 pub fn is_value1(&self) -> bool {
413 *self == RFFR::VALUE1
414 }
415 #[doc = "Checks if the value of the field is `VALUE2`"]
416 #[inline]
417 pub fn is_value2(&self) -> bool {
418 *self == RFFR::VALUE2
419 }
420}
421#[doc = "Possible values of the field `TFF`"]
422#[derive(Clone, Copy, Debug, PartialEq)]
423pub enum TFFR {
424 #[doc = "The transmitter frame is not yet finished."]
425 VALUE1,
426 #[doc = "The transmitter frame is finished."]
427 VALUE2,
428}
429impl TFFR {
430 #[doc = r" Returns `true` if the bit is clear (0)"]
431 #[inline]
432 pub fn bit_is_clear(&self) -> bool {
433 !self.bit()
434 }
435 #[doc = r" Returns `true` if the bit is set (1)"]
436 #[inline]
437 pub fn bit_is_set(&self) -> bool {
438 self.bit()
439 }
440 #[doc = r" Value of the field as raw bits"]
441 #[inline]
442 pub fn bit(&self) -> bool {
443 match *self {
444 TFFR::VALUE1 => false,
445 TFFR::VALUE2 => true,
446 }
447 }
448 #[allow(missing_docs)]
449 #[doc(hidden)]
450 #[inline]
451 pub fn _from(value: bool) -> TFFR {
452 match value {
453 false => TFFR::VALUE1,
454 true => TFFR::VALUE2,
455 }
456 }
457 #[doc = "Checks if the value of the field is `VALUE1`"]
458 #[inline]
459 pub fn is_value1(&self) -> bool {
460 *self == TFFR::VALUE1
461 }
462 #[doc = "Checks if the value of the field is `VALUE2`"]
463 #[inline]
464 pub fn is_value2(&self) -> bool {
465 *self == TFFR::VALUE2
466 }
467}
468#[doc = "Possible values of the field `BUSY`"]
469#[derive(Clone, Copy, Debug, PartialEq)]
470pub enum BUSYR {
471 #[doc = "A data transfer does not take place."]
472 VALUE1,
473 #[doc = "A data transfer currently takes place."]
474 VALUE2,
475}
476impl BUSYR {
477 #[doc = r" Returns `true` if the bit is clear (0)"]
478 #[inline]
479 pub fn bit_is_clear(&self) -> bool {
480 !self.bit()
481 }
482 #[doc = r" Returns `true` if the bit is set (1)"]
483 #[inline]
484 pub fn bit_is_set(&self) -> bool {
485 self.bit()
486 }
487 #[doc = r" Value of the field as raw bits"]
488 #[inline]
489 pub fn bit(&self) -> bool {
490 match *self {
491 BUSYR::VALUE1 => false,
492 BUSYR::VALUE2 => true,
493 }
494 }
495 #[allow(missing_docs)]
496 #[doc(hidden)]
497 #[inline]
498 pub fn _from(value: bool) -> BUSYR {
499 match value {
500 false => BUSYR::VALUE1,
501 true => BUSYR::VALUE2,
502 }
503 }
504 #[doc = "Checks if the value of the field is `VALUE1`"]
505 #[inline]
506 pub fn is_value1(&self) -> bool {
507 *self == BUSYR::VALUE1
508 }
509 #[doc = "Checks if the value of the field is `VALUE2`"]
510 #[inline]
511 pub fn is_value2(&self) -> bool {
512 *self == BUSYR::VALUE2
513 }
514}
515#[doc = "Possible values of the field `RSIF`"]
516#[derive(Clone, Copy, Debug, PartialEq)]
517pub enum RSIFR {
518 #[doc = "A receiver start event has not occurred."]
519 VALUE1,
520 #[doc = "A receiver start event has occurred."]
521 VALUE2,
522}
523impl RSIFR {
524 #[doc = r" Returns `true` if the bit is clear (0)"]
525 #[inline]
526 pub fn bit_is_clear(&self) -> bool {
527 !self.bit()
528 }
529 #[doc = r" Returns `true` if the bit is set (1)"]
530 #[inline]
531 pub fn bit_is_set(&self) -> bool {
532 self.bit()
533 }
534 #[doc = r" Value of the field as raw bits"]
535 #[inline]
536 pub fn bit(&self) -> bool {
537 match *self {
538 RSIFR::VALUE1 => false,
539 RSIFR::VALUE2 => true,
540 }
541 }
542 #[allow(missing_docs)]
543 #[doc(hidden)]
544 #[inline]
545 pub fn _from(value: bool) -> RSIFR {
546 match value {
547 false => RSIFR::VALUE1,
548 true => RSIFR::VALUE2,
549 }
550 }
551 #[doc = "Checks if the value of the field is `VALUE1`"]
552 #[inline]
553 pub fn is_value1(&self) -> bool {
554 *self == RSIFR::VALUE1
555 }
556 #[doc = "Checks if the value of the field is `VALUE2`"]
557 #[inline]
558 pub fn is_value2(&self) -> bool {
559 *self == RSIFR::VALUE2
560 }
561}
562#[doc = "Possible values of the field `DLIF`"]
563#[derive(Clone, Copy, Debug, PartialEq)]
564pub enum DLIFR {
565 #[doc = "A data lost event has not occurred."]
566 VALUE1,
567 #[doc = "A data lost event has occurred."]
568 VALUE2,
569}
570impl DLIFR {
571 #[doc = r" Returns `true` if the bit is clear (0)"]
572 #[inline]
573 pub fn bit_is_clear(&self) -> bool {
574 !self.bit()
575 }
576 #[doc = r" Returns `true` if the bit is set (1)"]
577 #[inline]
578 pub fn bit_is_set(&self) -> bool {
579 self.bit()
580 }
581 #[doc = r" Value of the field as raw bits"]
582 #[inline]
583 pub fn bit(&self) -> bool {
584 match *self {
585 DLIFR::VALUE1 => false,
586 DLIFR::VALUE2 => true,
587 }
588 }
589 #[allow(missing_docs)]
590 #[doc(hidden)]
591 #[inline]
592 pub fn _from(value: bool) -> DLIFR {
593 match value {
594 false => DLIFR::VALUE1,
595 true => DLIFR::VALUE2,
596 }
597 }
598 #[doc = "Checks if the value of the field is `VALUE1`"]
599 #[inline]
600 pub fn is_value1(&self) -> bool {
601 *self == DLIFR::VALUE1
602 }
603 #[doc = "Checks if the value of the field is `VALUE2`"]
604 #[inline]
605 pub fn is_value2(&self) -> bool {
606 *self == DLIFR::VALUE2
607 }
608}
609#[doc = "Possible values of the field `TSIF`"]
610#[derive(Clone, Copy, Debug, PartialEq)]
611pub enum TSIFR {
612 #[doc = "A transmit shift event has not occurred."]
613 VALUE1,
614 #[doc = "A transmit shift event has occurred."]
615 VALUE2,
616}
617impl TSIFR {
618 #[doc = r" Returns `true` if the bit is clear (0)"]
619 #[inline]
620 pub fn bit_is_clear(&self) -> bool {
621 !self.bit()
622 }
623 #[doc = r" Returns `true` if the bit is set (1)"]
624 #[inline]
625 pub fn bit_is_set(&self) -> bool {
626 self.bit()
627 }
628 #[doc = r" Value of the field as raw bits"]
629 #[inline]
630 pub fn bit(&self) -> bool {
631 match *self {
632 TSIFR::VALUE1 => false,
633 TSIFR::VALUE2 => true,
634 }
635 }
636 #[allow(missing_docs)]
637 #[doc(hidden)]
638 #[inline]
639 pub fn _from(value: bool) -> TSIFR {
640 match value {
641 false => TSIFR::VALUE1,
642 true => TSIFR::VALUE2,
643 }
644 }
645 #[doc = "Checks if the value of the field is `VALUE1`"]
646 #[inline]
647 pub fn is_value1(&self) -> bool {
648 *self == TSIFR::VALUE1
649 }
650 #[doc = "Checks if the value of the field is `VALUE2`"]
651 #[inline]
652 pub fn is_value2(&self) -> bool {
653 *self == TSIFR::VALUE2
654 }
655}
656#[doc = "Possible values of the field `TBIF`"]
657#[derive(Clone, Copy, Debug, PartialEq)]
658pub enum TBIFR {
659 #[doc = "A transmit buffer event has not occurred."]
660 VALUE1,
661 #[doc = "A transmit buffer event has occurred."]
662 VALUE2,
663}
664impl TBIFR {
665 #[doc = r" Returns `true` if the bit is clear (0)"]
666 #[inline]
667 pub fn bit_is_clear(&self) -> bool {
668 !self.bit()
669 }
670 #[doc = r" Returns `true` if the bit is set (1)"]
671 #[inline]
672 pub fn bit_is_set(&self) -> bool {
673 self.bit()
674 }
675 #[doc = r" Value of the field as raw bits"]
676 #[inline]
677 pub fn bit(&self) -> bool {
678 match *self {
679 TBIFR::VALUE1 => false,
680 TBIFR::VALUE2 => true,
681 }
682 }
683 #[allow(missing_docs)]
684 #[doc(hidden)]
685 #[inline]
686 pub fn _from(value: bool) -> TBIFR {
687 match value {
688 false => TBIFR::VALUE1,
689 true => TBIFR::VALUE2,
690 }
691 }
692 #[doc = "Checks if the value of the field is `VALUE1`"]
693 #[inline]
694 pub fn is_value1(&self) -> bool {
695 *self == TBIFR::VALUE1
696 }
697 #[doc = "Checks if the value of the field is `VALUE2`"]
698 #[inline]
699 pub fn is_value2(&self) -> bool {
700 *self == TBIFR::VALUE2
701 }
702}
703#[doc = "Possible values of the field `RIF`"]
704#[derive(Clone, Copy, Debug, PartialEq)]
705pub enum RIFR {
706 #[doc = "A receive event has not occurred."]
707 VALUE1,
708 #[doc = "A receive event has occurred."]
709 VALUE2,
710}
711impl RIFR {
712 #[doc = r" Returns `true` if the bit is clear (0)"]
713 #[inline]
714 pub fn bit_is_clear(&self) -> bool {
715 !self.bit()
716 }
717 #[doc = r" Returns `true` if the bit is set (1)"]
718 #[inline]
719 pub fn bit_is_set(&self) -> bool {
720 self.bit()
721 }
722 #[doc = r" Value of the field as raw bits"]
723 #[inline]
724 pub fn bit(&self) -> bool {
725 match *self {
726 RIFR::VALUE1 => false,
727 RIFR::VALUE2 => true,
728 }
729 }
730 #[allow(missing_docs)]
731 #[doc(hidden)]
732 #[inline]
733 pub fn _from(value: bool) -> RIFR {
734 match value {
735 false => RIFR::VALUE1,
736 true => RIFR::VALUE2,
737 }
738 }
739 #[doc = "Checks if the value of the field is `VALUE1`"]
740 #[inline]
741 pub fn is_value1(&self) -> bool {
742 *self == RIFR::VALUE1
743 }
744 #[doc = "Checks if the value of the field is `VALUE2`"]
745 #[inline]
746 pub fn is_value2(&self) -> bool {
747 *self == RIFR::VALUE2
748 }
749}
750#[doc = "Possible values of the field `AIF`"]
751#[derive(Clone, Copy, Debug, PartialEq)]
752pub enum AIFR {
753 #[doc = "An alternative receive event has not occurred."]
754 VALUE1,
755 #[doc = "An alternative receive event has occurred."]
756 VALUE2,
757}
758impl AIFR {
759 #[doc = r" Returns `true` if the bit is clear (0)"]
760 #[inline]
761 pub fn bit_is_clear(&self) -> bool {
762 !self.bit()
763 }
764 #[doc = r" Returns `true` if the bit is set (1)"]
765 #[inline]
766 pub fn bit_is_set(&self) -> bool {
767 self.bit()
768 }
769 #[doc = r" Value of the field as raw bits"]
770 #[inline]
771 pub fn bit(&self) -> bool {
772 match *self {
773 AIFR::VALUE1 => false,
774 AIFR::VALUE2 => true,
775 }
776 }
777 #[allow(missing_docs)]
778 #[doc(hidden)]
779 #[inline]
780 pub fn _from(value: bool) -> AIFR {
781 match value {
782 false => AIFR::VALUE1,
783 true => AIFR::VALUE2,
784 }
785 }
786 #[doc = "Checks if the value of the field is `VALUE1`"]
787 #[inline]
788 pub fn is_value1(&self) -> bool {
789 *self == AIFR::VALUE1
790 }
791 #[doc = "Checks if the value of the field is `VALUE2`"]
792 #[inline]
793 pub fn is_value2(&self) -> bool {
794 *self == AIFR::VALUE2
795 }
796}
797#[doc = "Possible values of the field `BRGIF`"]
798#[derive(Clone, Copy, Debug, PartialEq)]
799pub enum BRGIFR {
800 #[doc = "A baud rate generator event has not occurred."]
801 VALUE1,
802 #[doc = "A baud rate generator event has occurred."]
803 VALUE2,
804}
805impl BRGIFR {
806 #[doc = r" Returns `true` if the bit is clear (0)"]
807 #[inline]
808 pub fn bit_is_clear(&self) -> bool {
809 !self.bit()
810 }
811 #[doc = r" Returns `true` if the bit is set (1)"]
812 #[inline]
813 pub fn bit_is_set(&self) -> bool {
814 self.bit()
815 }
816 #[doc = r" Value of the field as raw bits"]
817 #[inline]
818 pub fn bit(&self) -> bool {
819 match *self {
820 BRGIFR::VALUE1 => false,
821 BRGIFR::VALUE2 => true,
822 }
823 }
824 #[allow(missing_docs)]
825 #[doc(hidden)]
826 #[inline]
827 pub fn _from(value: bool) -> BRGIFR {
828 match value {
829 false => BRGIFR::VALUE1,
830 true => BRGIFR::VALUE2,
831 }
832 }
833 #[doc = "Checks if the value of the field is `VALUE1`"]
834 #[inline]
835 pub fn is_value1(&self) -> bool {
836 *self == BRGIFR::VALUE1
837 }
838 #[doc = "Checks if the value of the field is `VALUE2`"]
839 #[inline]
840 pub fn is_value2(&self) -> bool {
841 *self == BRGIFR::VALUE2
842 }
843}
844#[doc = "Values that can be written to the field `TXIDLE`"]
845pub enum TXIDLEW {
846 #[doc = "The transmitter line has not yet been idle."]
847 VALUE1,
848 #[doc = "The transmitter line has been idle and frame transmission is possible."]
849 VALUE2,
850}
851impl TXIDLEW {
852 #[allow(missing_docs)]
853 #[doc(hidden)]
854 #[inline]
855 pub fn _bits(&self) -> bool {
856 match *self {
857 TXIDLEW::VALUE1 => false,
858 TXIDLEW::VALUE2 => true,
859 }
860 }
861}
862#[doc = r" Proxy"]
863pub struct _TXIDLEW<'a> {
864 w: &'a mut W,
865}
866impl<'a> _TXIDLEW<'a> {
867 #[doc = r" Writes `variant` to the field"]
868 #[inline]
869 pub fn variant(self, variant: TXIDLEW) -> &'a mut W {
870 {
871 self.bit(variant._bits())
872 }
873 }
874 #[doc = "The transmitter line has not yet been idle."]
875 #[inline]
876 pub fn value1(self) -> &'a mut W {
877 self.variant(TXIDLEW::VALUE1)
878 }
879 #[doc = "The transmitter line has been idle and frame transmission is possible."]
880 #[inline]
881 pub fn value2(self) -> &'a mut W {
882 self.variant(TXIDLEW::VALUE2)
883 }
884 #[doc = r" Sets the field bit"]
885 pub fn set_bit(self) -> &'a mut W {
886 self.bit(true)
887 }
888 #[doc = r" Clears the field bit"]
889 pub fn clear_bit(self) -> &'a mut W {
890 self.bit(false)
891 }
892 #[doc = r" Writes raw bits to the field"]
893 #[inline]
894 pub fn bit(self, value: bool) -> &'a mut W {
895 const MASK: bool = true;
896 const OFFSET: u8 = 0;
897 self.w.bits &= !((MASK as u32) << OFFSET);
898 self.w.bits |= ((value & MASK) as u32) << OFFSET;
899 self.w
900 }
901}
902#[doc = "Values that can be written to the field `RXIDLE`"]
903pub enum RXIDLEW {
904 #[doc = "The receiver line has not yet been idle."]
905 VALUE1,
906 #[doc = "The receiver line has been idle and frame reception is possible."]
907 VALUE2,
908}
909impl RXIDLEW {
910 #[allow(missing_docs)]
911 #[doc(hidden)]
912 #[inline]
913 pub fn _bits(&self) -> bool {
914 match *self {
915 RXIDLEW::VALUE1 => false,
916 RXIDLEW::VALUE2 => true,
917 }
918 }
919}
920#[doc = r" Proxy"]
921pub struct _RXIDLEW<'a> {
922 w: &'a mut W,
923}
924impl<'a> _RXIDLEW<'a> {
925 #[doc = r" Writes `variant` to the field"]
926 #[inline]
927 pub fn variant(self, variant: RXIDLEW) -> &'a mut W {
928 {
929 self.bit(variant._bits())
930 }
931 }
932 #[doc = "The receiver line has not yet been idle."]
933 #[inline]
934 pub fn value1(self) -> &'a mut W {
935 self.variant(RXIDLEW::VALUE1)
936 }
937 #[doc = "The receiver line has been idle and frame reception is possible."]
938 #[inline]
939 pub fn value2(self) -> &'a mut W {
940 self.variant(RXIDLEW::VALUE2)
941 }
942 #[doc = r" Sets the field bit"]
943 pub fn set_bit(self) -> &'a mut W {
944 self.bit(true)
945 }
946 #[doc = r" Clears the field bit"]
947 pub fn clear_bit(self) -> &'a mut W {
948 self.bit(false)
949 }
950 #[doc = r" Writes raw bits to the field"]
951 #[inline]
952 pub fn bit(self, value: bool) -> &'a mut W {
953 const MASK: bool = true;
954 const OFFSET: u8 = 1;
955 self.w.bits &= !((MASK as u32) << OFFSET);
956 self.w.bits |= ((value & MASK) as u32) << OFFSET;
957 self.w
958 }
959}
960#[doc = "Values that can be written to the field `SBD`"]
961pub enum SBDW {
962 #[doc = "A synchronization break has not yet been detected."]
963 VALUE1,
964 #[doc = "A synchronization break has been detected."]
965 VALUE2,
966}
967impl SBDW {
968 #[allow(missing_docs)]
969 #[doc(hidden)]
970 #[inline]
971 pub fn _bits(&self) -> bool {
972 match *self {
973 SBDW::VALUE1 => false,
974 SBDW::VALUE2 => true,
975 }
976 }
977}
978#[doc = r" Proxy"]
979pub struct _SBDW<'a> {
980 w: &'a mut W,
981}
982impl<'a> _SBDW<'a> {
983 #[doc = r" Writes `variant` to the field"]
984 #[inline]
985 pub fn variant(self, variant: SBDW) -> &'a mut W {
986 {
987 self.bit(variant._bits())
988 }
989 }
990 #[doc = "A synchronization break has not yet been detected."]
991 #[inline]
992 pub fn value1(self) -> &'a mut W {
993 self.variant(SBDW::VALUE1)
994 }
995 #[doc = "A synchronization break has been detected."]
996 #[inline]
997 pub fn value2(self) -> &'a mut W {
998 self.variant(SBDW::VALUE2)
999 }
1000 #[doc = r" Sets the field bit"]
1001 pub fn set_bit(self) -> &'a mut W {
1002 self.bit(true)
1003 }
1004 #[doc = r" Clears the field bit"]
1005 pub fn clear_bit(self) -> &'a mut W {
1006 self.bit(false)
1007 }
1008 #[doc = r" Writes raw bits to the field"]
1009 #[inline]
1010 pub fn bit(self, value: bool) -> &'a mut W {
1011 const MASK: bool = true;
1012 const OFFSET: u8 = 2;
1013 self.w.bits &= !((MASK as u32) << OFFSET);
1014 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1015 self.w
1016 }
1017}
1018#[doc = "Values that can be written to the field `COL`"]
1019pub enum COLW {
1020 #[doc = "A collision has not yet been detected and frame transmission is possible."]
1021 VALUE1,
1022 #[doc = "A collision has been detected and frame transmission is not possible."]
1023 VALUE2,
1024}
1025impl COLW {
1026 #[allow(missing_docs)]
1027 #[doc(hidden)]
1028 #[inline]
1029 pub fn _bits(&self) -> bool {
1030 match *self {
1031 COLW::VALUE1 => false,
1032 COLW::VALUE2 => true,
1033 }
1034 }
1035}
1036#[doc = r" Proxy"]
1037pub struct _COLW<'a> {
1038 w: &'a mut W,
1039}
1040impl<'a> _COLW<'a> {
1041 #[doc = r" Writes `variant` to the field"]
1042 #[inline]
1043 pub fn variant(self, variant: COLW) -> &'a mut W {
1044 {
1045 self.bit(variant._bits())
1046 }
1047 }
1048 #[doc = "A collision has not yet been detected and frame transmission is possible."]
1049 #[inline]
1050 pub fn value1(self) -> &'a mut W {
1051 self.variant(COLW::VALUE1)
1052 }
1053 #[doc = "A collision has been detected and frame transmission is not possible."]
1054 #[inline]
1055 pub fn value2(self) -> &'a mut W {
1056 self.variant(COLW::VALUE2)
1057 }
1058 #[doc = r" Sets the field bit"]
1059 pub fn set_bit(self) -> &'a mut W {
1060 self.bit(true)
1061 }
1062 #[doc = r" Clears the field bit"]
1063 pub fn clear_bit(self) -> &'a mut W {
1064 self.bit(false)
1065 }
1066 #[doc = r" Writes raw bits to the field"]
1067 #[inline]
1068 pub fn bit(self, value: bool) -> &'a mut W {
1069 const MASK: bool = true;
1070 const OFFSET: u8 = 3;
1071 self.w.bits &= !((MASK as u32) << OFFSET);
1072 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1073 self.w
1074 }
1075}
1076#[doc = "Values that can be written to the field `RNS`"]
1077pub enum RNSW {
1078 #[doc = "Receiver noise has not been detected."]
1079 VALUE1,
1080 #[doc = "Receiver noise has been detected."]
1081 VALUE2,
1082}
1083impl RNSW {
1084 #[allow(missing_docs)]
1085 #[doc(hidden)]
1086 #[inline]
1087 pub fn _bits(&self) -> bool {
1088 match *self {
1089 RNSW::VALUE1 => false,
1090 RNSW::VALUE2 => true,
1091 }
1092 }
1093}
1094#[doc = r" Proxy"]
1095pub struct _RNSW<'a> {
1096 w: &'a mut W,
1097}
1098impl<'a> _RNSW<'a> {
1099 #[doc = r" Writes `variant` to the field"]
1100 #[inline]
1101 pub fn variant(self, variant: RNSW) -> &'a mut W {
1102 {
1103 self.bit(variant._bits())
1104 }
1105 }
1106 #[doc = "Receiver noise has not been detected."]
1107 #[inline]
1108 pub fn value1(self) -> &'a mut W {
1109 self.variant(RNSW::VALUE1)
1110 }
1111 #[doc = "Receiver noise has been detected."]
1112 #[inline]
1113 pub fn value2(self) -> &'a mut W {
1114 self.variant(RNSW::VALUE2)
1115 }
1116 #[doc = r" Sets the field bit"]
1117 pub fn set_bit(self) -> &'a mut W {
1118 self.bit(true)
1119 }
1120 #[doc = r" Clears the field bit"]
1121 pub fn clear_bit(self) -> &'a mut W {
1122 self.bit(false)
1123 }
1124 #[doc = r" Writes raw bits to the field"]
1125 #[inline]
1126 pub fn bit(self, value: bool) -> &'a mut W {
1127 const MASK: bool = true;
1128 const OFFSET: u8 = 4;
1129 self.w.bits &= !((MASK as u32) << OFFSET);
1130 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1131 self.w
1132 }
1133}
1134#[doc = "Values that can be written to the field `FER0`"]
1135pub enum FER0W {
1136 #[doc = "A format error 0 has not been detected."]
1137 VALUE1,
1138 #[doc = "A format error 0 has been detected."]
1139 VALUE2,
1140}
1141impl FER0W {
1142 #[allow(missing_docs)]
1143 #[doc(hidden)]
1144 #[inline]
1145 pub fn _bits(&self) -> bool {
1146 match *self {
1147 FER0W::VALUE1 => false,
1148 FER0W::VALUE2 => true,
1149 }
1150 }
1151}
1152#[doc = r" Proxy"]
1153pub struct _FER0W<'a> {
1154 w: &'a mut W,
1155}
1156impl<'a> _FER0W<'a> {
1157 #[doc = r" Writes `variant` to the field"]
1158 #[inline]
1159 pub fn variant(self, variant: FER0W) -> &'a mut W {
1160 {
1161 self.bit(variant._bits())
1162 }
1163 }
1164 #[doc = "A format error 0 has not been detected."]
1165 #[inline]
1166 pub fn value1(self) -> &'a mut W {
1167 self.variant(FER0W::VALUE1)
1168 }
1169 #[doc = "A format error 0 has been detected."]
1170 #[inline]
1171 pub fn value2(self) -> &'a mut W {
1172 self.variant(FER0W::VALUE2)
1173 }
1174 #[doc = r" Sets the field bit"]
1175 pub fn set_bit(self) -> &'a mut W {
1176 self.bit(true)
1177 }
1178 #[doc = r" Clears the field bit"]
1179 pub fn clear_bit(self) -> &'a mut W {
1180 self.bit(false)
1181 }
1182 #[doc = r" Writes raw bits to the field"]
1183 #[inline]
1184 pub fn bit(self, value: bool) -> &'a mut W {
1185 const MASK: bool = true;
1186 const OFFSET: u8 = 5;
1187 self.w.bits &= !((MASK as u32) << OFFSET);
1188 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1189 self.w
1190 }
1191}
1192#[doc = "Values that can be written to the field `FER1`"]
1193pub enum FER1W {
1194 #[doc = "A format error 1 has not been detected."]
1195 VALUE1,
1196 #[doc = "A format error 1 has been detected."]
1197 VALUE2,
1198}
1199impl FER1W {
1200 #[allow(missing_docs)]
1201 #[doc(hidden)]
1202 #[inline]
1203 pub fn _bits(&self) -> bool {
1204 match *self {
1205 FER1W::VALUE1 => false,
1206 FER1W::VALUE2 => true,
1207 }
1208 }
1209}
1210#[doc = r" Proxy"]
1211pub struct _FER1W<'a> {
1212 w: &'a mut W,
1213}
1214impl<'a> _FER1W<'a> {
1215 #[doc = r" Writes `variant` to the field"]
1216 #[inline]
1217 pub fn variant(self, variant: FER1W) -> &'a mut W {
1218 {
1219 self.bit(variant._bits())
1220 }
1221 }
1222 #[doc = "A format error 1 has not been detected."]
1223 #[inline]
1224 pub fn value1(self) -> &'a mut W {
1225 self.variant(FER1W::VALUE1)
1226 }
1227 #[doc = "A format error 1 has been detected."]
1228 #[inline]
1229 pub fn value2(self) -> &'a mut W {
1230 self.variant(FER1W::VALUE2)
1231 }
1232 #[doc = r" Sets the field bit"]
1233 pub fn set_bit(self) -> &'a mut W {
1234 self.bit(true)
1235 }
1236 #[doc = r" Clears the field bit"]
1237 pub fn clear_bit(self) -> &'a mut W {
1238 self.bit(false)
1239 }
1240 #[doc = r" Writes raw bits to the field"]
1241 #[inline]
1242 pub fn bit(self, value: bool) -> &'a mut W {
1243 const MASK: bool = true;
1244 const OFFSET: u8 = 6;
1245 self.w.bits &= !((MASK as u32) << OFFSET);
1246 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1247 self.w
1248 }
1249}
1250#[doc = "Values that can be written to the field `RFF`"]
1251pub enum RFFW {
1252 #[doc = "The received frame is not yet finished."]
1253 VALUE1,
1254 #[doc = "The received frame is finished."]
1255 VALUE2,
1256}
1257impl RFFW {
1258 #[allow(missing_docs)]
1259 #[doc(hidden)]
1260 #[inline]
1261 pub fn _bits(&self) -> bool {
1262 match *self {
1263 RFFW::VALUE1 => false,
1264 RFFW::VALUE2 => true,
1265 }
1266 }
1267}
1268#[doc = r" Proxy"]
1269pub struct _RFFW<'a> {
1270 w: &'a mut W,
1271}
1272impl<'a> _RFFW<'a> {
1273 #[doc = r" Writes `variant` to the field"]
1274 #[inline]
1275 pub fn variant(self, variant: RFFW) -> &'a mut W {
1276 {
1277 self.bit(variant._bits())
1278 }
1279 }
1280 #[doc = "The received frame is not yet finished."]
1281 #[inline]
1282 pub fn value1(self) -> &'a mut W {
1283 self.variant(RFFW::VALUE1)
1284 }
1285 #[doc = "The received frame is finished."]
1286 #[inline]
1287 pub fn value2(self) -> &'a mut W {
1288 self.variant(RFFW::VALUE2)
1289 }
1290 #[doc = r" Sets the field bit"]
1291 pub fn set_bit(self) -> &'a mut W {
1292 self.bit(true)
1293 }
1294 #[doc = r" Clears the field bit"]
1295 pub fn clear_bit(self) -> &'a mut W {
1296 self.bit(false)
1297 }
1298 #[doc = r" Writes raw bits to the field"]
1299 #[inline]
1300 pub fn bit(self, value: bool) -> &'a mut W {
1301 const MASK: bool = true;
1302 const OFFSET: u8 = 7;
1303 self.w.bits &= !((MASK as u32) << OFFSET);
1304 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1305 self.w
1306 }
1307}
1308#[doc = "Values that can be written to the field `TFF`"]
1309pub enum TFFW {
1310 #[doc = "The transmitter frame is not yet finished."]
1311 VALUE1,
1312 #[doc = "The transmitter frame is finished."]
1313 VALUE2,
1314}
1315impl TFFW {
1316 #[allow(missing_docs)]
1317 #[doc(hidden)]
1318 #[inline]
1319 pub fn _bits(&self) -> bool {
1320 match *self {
1321 TFFW::VALUE1 => false,
1322 TFFW::VALUE2 => true,
1323 }
1324 }
1325}
1326#[doc = r" Proxy"]
1327pub struct _TFFW<'a> {
1328 w: &'a mut W,
1329}
1330impl<'a> _TFFW<'a> {
1331 #[doc = r" Writes `variant` to the field"]
1332 #[inline]
1333 pub fn variant(self, variant: TFFW) -> &'a mut W {
1334 {
1335 self.bit(variant._bits())
1336 }
1337 }
1338 #[doc = "The transmitter frame is not yet finished."]
1339 #[inline]
1340 pub fn value1(self) -> &'a mut W {
1341 self.variant(TFFW::VALUE1)
1342 }
1343 #[doc = "The transmitter frame is finished."]
1344 #[inline]
1345 pub fn value2(self) -> &'a mut W {
1346 self.variant(TFFW::VALUE2)
1347 }
1348 #[doc = r" Sets the field bit"]
1349 pub fn set_bit(self) -> &'a mut W {
1350 self.bit(true)
1351 }
1352 #[doc = r" Clears the field bit"]
1353 pub fn clear_bit(self) -> &'a mut W {
1354 self.bit(false)
1355 }
1356 #[doc = r" Writes raw bits to the field"]
1357 #[inline]
1358 pub fn bit(self, value: bool) -> &'a mut W {
1359 const MASK: bool = true;
1360 const OFFSET: u8 = 8;
1361 self.w.bits &= !((MASK as u32) << OFFSET);
1362 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1363 self.w
1364 }
1365}
1366#[doc = "Values that can be written to the field `RSIF`"]
1367pub enum RSIFW {
1368 #[doc = "A receiver start event has not occurred."]
1369 VALUE1,
1370 #[doc = "A receiver start event has occurred."]
1371 VALUE2,
1372}
1373impl RSIFW {
1374 #[allow(missing_docs)]
1375 #[doc(hidden)]
1376 #[inline]
1377 pub fn _bits(&self) -> bool {
1378 match *self {
1379 RSIFW::VALUE1 => false,
1380 RSIFW::VALUE2 => true,
1381 }
1382 }
1383}
1384#[doc = r" Proxy"]
1385pub struct _RSIFW<'a> {
1386 w: &'a mut W,
1387}
1388impl<'a> _RSIFW<'a> {
1389 #[doc = r" Writes `variant` to the field"]
1390 #[inline]
1391 pub fn variant(self, variant: RSIFW) -> &'a mut W {
1392 {
1393 self.bit(variant._bits())
1394 }
1395 }
1396 #[doc = "A receiver start event has not occurred."]
1397 #[inline]
1398 pub fn value1(self) -> &'a mut W {
1399 self.variant(RSIFW::VALUE1)
1400 }
1401 #[doc = "A receiver start event has occurred."]
1402 #[inline]
1403 pub fn value2(self) -> &'a mut W {
1404 self.variant(RSIFW::VALUE2)
1405 }
1406 #[doc = r" Sets the field bit"]
1407 pub fn set_bit(self) -> &'a mut W {
1408 self.bit(true)
1409 }
1410 #[doc = r" Clears the field bit"]
1411 pub fn clear_bit(self) -> &'a mut W {
1412 self.bit(false)
1413 }
1414 #[doc = r" Writes raw bits to the field"]
1415 #[inline]
1416 pub fn bit(self, value: bool) -> &'a mut W {
1417 const MASK: bool = true;
1418 const OFFSET: u8 = 10;
1419 self.w.bits &= !((MASK as u32) << OFFSET);
1420 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1421 self.w
1422 }
1423}
1424#[doc = "Values that can be written to the field `DLIF`"]
1425pub enum DLIFW {
1426 #[doc = "A data lost event has not occurred."]
1427 VALUE1,
1428 #[doc = "A data lost event has occurred."]
1429 VALUE2,
1430}
1431impl DLIFW {
1432 #[allow(missing_docs)]
1433 #[doc(hidden)]
1434 #[inline]
1435 pub fn _bits(&self) -> bool {
1436 match *self {
1437 DLIFW::VALUE1 => false,
1438 DLIFW::VALUE2 => true,
1439 }
1440 }
1441}
1442#[doc = r" Proxy"]
1443pub struct _DLIFW<'a> {
1444 w: &'a mut W,
1445}
1446impl<'a> _DLIFW<'a> {
1447 #[doc = r" Writes `variant` to the field"]
1448 #[inline]
1449 pub fn variant(self, variant: DLIFW) -> &'a mut W {
1450 {
1451 self.bit(variant._bits())
1452 }
1453 }
1454 #[doc = "A data lost event has not occurred."]
1455 #[inline]
1456 pub fn value1(self) -> &'a mut W {
1457 self.variant(DLIFW::VALUE1)
1458 }
1459 #[doc = "A data lost event has occurred."]
1460 #[inline]
1461 pub fn value2(self) -> &'a mut W {
1462 self.variant(DLIFW::VALUE2)
1463 }
1464 #[doc = r" Sets the field bit"]
1465 pub fn set_bit(self) -> &'a mut W {
1466 self.bit(true)
1467 }
1468 #[doc = r" Clears the field bit"]
1469 pub fn clear_bit(self) -> &'a mut W {
1470 self.bit(false)
1471 }
1472 #[doc = r" Writes raw bits to the field"]
1473 #[inline]
1474 pub fn bit(self, value: bool) -> &'a mut W {
1475 const MASK: bool = true;
1476 const OFFSET: u8 = 11;
1477 self.w.bits &= !((MASK as u32) << OFFSET);
1478 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1479 self.w
1480 }
1481}
1482#[doc = "Values that can be written to the field `TSIF`"]
1483pub enum TSIFW {
1484 #[doc = "A transmit shift event has not occurred."]
1485 VALUE1,
1486 #[doc = "A transmit shift event has occurred."]
1487 VALUE2,
1488}
1489impl TSIFW {
1490 #[allow(missing_docs)]
1491 #[doc(hidden)]
1492 #[inline]
1493 pub fn _bits(&self) -> bool {
1494 match *self {
1495 TSIFW::VALUE1 => false,
1496 TSIFW::VALUE2 => true,
1497 }
1498 }
1499}
1500#[doc = r" Proxy"]
1501pub struct _TSIFW<'a> {
1502 w: &'a mut W,
1503}
1504impl<'a> _TSIFW<'a> {
1505 #[doc = r" Writes `variant` to the field"]
1506 #[inline]
1507 pub fn variant(self, variant: TSIFW) -> &'a mut W {
1508 {
1509 self.bit(variant._bits())
1510 }
1511 }
1512 #[doc = "A transmit shift event has not occurred."]
1513 #[inline]
1514 pub fn value1(self) -> &'a mut W {
1515 self.variant(TSIFW::VALUE1)
1516 }
1517 #[doc = "A transmit shift event has occurred."]
1518 #[inline]
1519 pub fn value2(self) -> &'a mut W {
1520 self.variant(TSIFW::VALUE2)
1521 }
1522 #[doc = r" Sets the field bit"]
1523 pub fn set_bit(self) -> &'a mut W {
1524 self.bit(true)
1525 }
1526 #[doc = r" Clears the field bit"]
1527 pub fn clear_bit(self) -> &'a mut W {
1528 self.bit(false)
1529 }
1530 #[doc = r" Writes raw bits to the field"]
1531 #[inline]
1532 pub fn bit(self, value: bool) -> &'a mut W {
1533 const MASK: bool = true;
1534 const OFFSET: u8 = 12;
1535 self.w.bits &= !((MASK as u32) << OFFSET);
1536 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1537 self.w
1538 }
1539}
1540#[doc = "Values that can be written to the field `TBIF`"]
1541pub enum TBIFW {
1542 #[doc = "A transmit buffer event has not occurred."]
1543 VALUE1,
1544 #[doc = "A transmit buffer event has occurred."]
1545 VALUE2,
1546}
1547impl TBIFW {
1548 #[allow(missing_docs)]
1549 #[doc(hidden)]
1550 #[inline]
1551 pub fn _bits(&self) -> bool {
1552 match *self {
1553 TBIFW::VALUE1 => false,
1554 TBIFW::VALUE2 => true,
1555 }
1556 }
1557}
1558#[doc = r" Proxy"]
1559pub struct _TBIFW<'a> {
1560 w: &'a mut W,
1561}
1562impl<'a> _TBIFW<'a> {
1563 #[doc = r" Writes `variant` to the field"]
1564 #[inline]
1565 pub fn variant(self, variant: TBIFW) -> &'a mut W {
1566 {
1567 self.bit(variant._bits())
1568 }
1569 }
1570 #[doc = "A transmit buffer event has not occurred."]
1571 #[inline]
1572 pub fn value1(self) -> &'a mut W {
1573 self.variant(TBIFW::VALUE1)
1574 }
1575 #[doc = "A transmit buffer event has occurred."]
1576 #[inline]
1577 pub fn value2(self) -> &'a mut W {
1578 self.variant(TBIFW::VALUE2)
1579 }
1580 #[doc = r" Sets the field bit"]
1581 pub fn set_bit(self) -> &'a mut W {
1582 self.bit(true)
1583 }
1584 #[doc = r" Clears the field bit"]
1585 pub fn clear_bit(self) -> &'a mut W {
1586 self.bit(false)
1587 }
1588 #[doc = r" Writes raw bits to the field"]
1589 #[inline]
1590 pub fn bit(self, value: bool) -> &'a mut W {
1591 const MASK: bool = true;
1592 const OFFSET: u8 = 13;
1593 self.w.bits &= !((MASK as u32) << OFFSET);
1594 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1595 self.w
1596 }
1597}
1598#[doc = "Values that can be written to the field `RIF`"]
1599pub enum RIFW {
1600 #[doc = "A receive event has not occurred."]
1601 VALUE1,
1602 #[doc = "A receive event has occurred."]
1603 VALUE2,
1604}
1605impl RIFW {
1606 #[allow(missing_docs)]
1607 #[doc(hidden)]
1608 #[inline]
1609 pub fn _bits(&self) -> bool {
1610 match *self {
1611 RIFW::VALUE1 => false,
1612 RIFW::VALUE2 => true,
1613 }
1614 }
1615}
1616#[doc = r" Proxy"]
1617pub struct _RIFW<'a> {
1618 w: &'a mut W,
1619}
1620impl<'a> _RIFW<'a> {
1621 #[doc = r" Writes `variant` to the field"]
1622 #[inline]
1623 pub fn variant(self, variant: RIFW) -> &'a mut W {
1624 {
1625 self.bit(variant._bits())
1626 }
1627 }
1628 #[doc = "A receive event has not occurred."]
1629 #[inline]
1630 pub fn value1(self) -> &'a mut W {
1631 self.variant(RIFW::VALUE1)
1632 }
1633 #[doc = "A receive event has occurred."]
1634 #[inline]
1635 pub fn value2(self) -> &'a mut W {
1636 self.variant(RIFW::VALUE2)
1637 }
1638 #[doc = r" Sets the field bit"]
1639 pub fn set_bit(self) -> &'a mut W {
1640 self.bit(true)
1641 }
1642 #[doc = r" Clears the field bit"]
1643 pub fn clear_bit(self) -> &'a mut W {
1644 self.bit(false)
1645 }
1646 #[doc = r" Writes raw bits to the field"]
1647 #[inline]
1648 pub fn bit(self, value: bool) -> &'a mut W {
1649 const MASK: bool = true;
1650 const OFFSET: u8 = 14;
1651 self.w.bits &= !((MASK as u32) << OFFSET);
1652 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1653 self.w
1654 }
1655}
1656#[doc = "Values that can be written to the field `AIF`"]
1657pub enum AIFW {
1658 #[doc = "An alternative receive event has not occurred."]
1659 VALUE1,
1660 #[doc = "An alternative receive event has occurred."]
1661 VALUE2,
1662}
1663impl AIFW {
1664 #[allow(missing_docs)]
1665 #[doc(hidden)]
1666 #[inline]
1667 pub fn _bits(&self) -> bool {
1668 match *self {
1669 AIFW::VALUE1 => false,
1670 AIFW::VALUE2 => true,
1671 }
1672 }
1673}
1674#[doc = r" Proxy"]
1675pub struct _AIFW<'a> {
1676 w: &'a mut W,
1677}
1678impl<'a> _AIFW<'a> {
1679 #[doc = r" Writes `variant` to the field"]
1680 #[inline]
1681 pub fn variant(self, variant: AIFW) -> &'a mut W {
1682 {
1683 self.bit(variant._bits())
1684 }
1685 }
1686 #[doc = "An alternative receive event has not occurred."]
1687 #[inline]
1688 pub fn value1(self) -> &'a mut W {
1689 self.variant(AIFW::VALUE1)
1690 }
1691 #[doc = "An alternative receive event has occurred."]
1692 #[inline]
1693 pub fn value2(self) -> &'a mut W {
1694 self.variant(AIFW::VALUE2)
1695 }
1696 #[doc = r" Sets the field bit"]
1697 pub fn set_bit(self) -> &'a mut W {
1698 self.bit(true)
1699 }
1700 #[doc = r" Clears the field bit"]
1701 pub fn clear_bit(self) -> &'a mut W {
1702 self.bit(false)
1703 }
1704 #[doc = r" Writes raw bits to the field"]
1705 #[inline]
1706 pub fn bit(self, value: bool) -> &'a mut W {
1707 const MASK: bool = true;
1708 const OFFSET: u8 = 15;
1709 self.w.bits &= !((MASK as u32) << OFFSET);
1710 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1711 self.w
1712 }
1713}
1714#[doc = "Values that can be written to the field `BRGIF`"]
1715pub enum BRGIFW {
1716 #[doc = "A baud rate generator event has not occurred."]
1717 VALUE1,
1718 #[doc = "A baud rate generator event has occurred."]
1719 VALUE2,
1720}
1721impl BRGIFW {
1722 #[allow(missing_docs)]
1723 #[doc(hidden)]
1724 #[inline]
1725 pub fn _bits(&self) -> bool {
1726 match *self {
1727 BRGIFW::VALUE1 => false,
1728 BRGIFW::VALUE2 => true,
1729 }
1730 }
1731}
1732#[doc = r" Proxy"]
1733pub struct _BRGIFW<'a> {
1734 w: &'a mut W,
1735}
1736impl<'a> _BRGIFW<'a> {
1737 #[doc = r" Writes `variant` to the field"]
1738 #[inline]
1739 pub fn variant(self, variant: BRGIFW) -> &'a mut W {
1740 {
1741 self.bit(variant._bits())
1742 }
1743 }
1744 #[doc = "A baud rate generator event has not occurred."]
1745 #[inline]
1746 pub fn value1(self) -> &'a mut W {
1747 self.variant(BRGIFW::VALUE1)
1748 }
1749 #[doc = "A baud rate generator event has occurred."]
1750 #[inline]
1751 pub fn value2(self) -> &'a mut W {
1752 self.variant(BRGIFW::VALUE2)
1753 }
1754 #[doc = r" Sets the field bit"]
1755 pub fn set_bit(self) -> &'a mut W {
1756 self.bit(true)
1757 }
1758 #[doc = r" Clears the field bit"]
1759 pub fn clear_bit(self) -> &'a mut W {
1760 self.bit(false)
1761 }
1762 #[doc = r" Writes raw bits to the field"]
1763 #[inline]
1764 pub fn bit(self, value: bool) -> &'a mut W {
1765 const MASK: bool = true;
1766 const OFFSET: u8 = 16;
1767 self.w.bits &= !((MASK as u32) << OFFSET);
1768 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1769 self.w
1770 }
1771}
1772impl R {
1773 #[doc = r" Value of the register as raw bits"]
1774 #[inline]
1775 pub fn bits(&self) -> u32 {
1776 self.bits
1777 }
1778 #[doc = "Bit 0 - Transmission Idle"]
1779 #[inline]
1780 pub fn txidle(&self) -> TXIDLER {
1781 TXIDLER::_from({
1782 const MASK: bool = true;
1783 const OFFSET: u8 = 0;
1784 ((self.bits >> OFFSET) & MASK as u32) != 0
1785 })
1786 }
1787 #[doc = "Bit 1 - Reception Idle"]
1788 #[inline]
1789 pub fn rxidle(&self) -> RXIDLER {
1790 RXIDLER::_from({
1791 const MASK: bool = true;
1792 const OFFSET: u8 = 1;
1793 ((self.bits >> OFFSET) & MASK as u32) != 0
1794 })
1795 }
1796 #[doc = "Bit 2 - Synchronization Break Detected"]
1797 #[inline]
1798 pub fn sbd(&self) -> SBDR {
1799 SBDR::_from({
1800 const MASK: bool = true;
1801 const OFFSET: u8 = 2;
1802 ((self.bits >> OFFSET) & MASK as u32) != 0
1803 })
1804 }
1805 #[doc = "Bit 3 - Collision Detected"]
1806 #[inline]
1807 pub fn col(&self) -> COLR {
1808 COLR::_from({
1809 const MASK: bool = true;
1810 const OFFSET: u8 = 3;
1811 ((self.bits >> OFFSET) & MASK as u32) != 0
1812 })
1813 }
1814 #[doc = "Bit 4 - Receiver Noise Detected"]
1815 #[inline]
1816 pub fn rns(&self) -> RNSR {
1817 RNSR::_from({
1818 const MASK: bool = true;
1819 const OFFSET: u8 = 4;
1820 ((self.bits >> OFFSET) & MASK as u32) != 0
1821 })
1822 }
1823 #[doc = "Bit 5 - Format Error in Stop Bit 0"]
1824 #[inline]
1825 pub fn fer0(&self) -> FER0R {
1826 FER0R::_from({
1827 const MASK: bool = true;
1828 const OFFSET: u8 = 5;
1829 ((self.bits >> OFFSET) & MASK as u32) != 0
1830 })
1831 }
1832 #[doc = "Bit 6 - Format Error in Stop Bit 1"]
1833 #[inline]
1834 pub fn fer1(&self) -> FER1R {
1835 FER1R::_from({
1836 const MASK: bool = true;
1837 const OFFSET: u8 = 6;
1838 ((self.bits >> OFFSET) & MASK as u32) != 0
1839 })
1840 }
1841 #[doc = "Bit 7 - Receive Frame Finished"]
1842 #[inline]
1843 pub fn rff(&self) -> RFFR {
1844 RFFR::_from({
1845 const MASK: bool = true;
1846 const OFFSET: u8 = 7;
1847 ((self.bits >> OFFSET) & MASK as u32) != 0
1848 })
1849 }
1850 #[doc = "Bit 8 - Transmitter Frame Finished"]
1851 #[inline]
1852 pub fn tff(&self) -> TFFR {
1853 TFFR::_from({
1854 const MASK: bool = true;
1855 const OFFSET: u8 = 8;
1856 ((self.bits >> OFFSET) & MASK as u32) != 0
1857 })
1858 }
1859 #[doc = "Bit 9 - Transfer Status BUSY"]
1860 #[inline]
1861 pub fn busy(&self) -> BUSYR {
1862 BUSYR::_from({
1863 const MASK: bool = true;
1864 const OFFSET: u8 = 9;
1865 ((self.bits >> OFFSET) & MASK as u32) != 0
1866 })
1867 }
1868 #[doc = "Bit 10 - Receiver Start Indication Flag"]
1869 #[inline]
1870 pub fn rsif(&self) -> RSIFR {
1871 RSIFR::_from({
1872 const MASK: bool = true;
1873 const OFFSET: u8 = 10;
1874 ((self.bits >> OFFSET) & MASK as u32) != 0
1875 })
1876 }
1877 #[doc = "Bit 11 - Data Lost Indication Flag"]
1878 #[inline]
1879 pub fn dlif(&self) -> DLIFR {
1880 DLIFR::_from({
1881 const MASK: bool = true;
1882 const OFFSET: u8 = 11;
1883 ((self.bits >> OFFSET) & MASK as u32) != 0
1884 })
1885 }
1886 #[doc = "Bit 12 - Transmit Shift Indication Flag"]
1887 #[inline]
1888 pub fn tsif(&self) -> TSIFR {
1889 TSIFR::_from({
1890 const MASK: bool = true;
1891 const OFFSET: u8 = 12;
1892 ((self.bits >> OFFSET) & MASK as u32) != 0
1893 })
1894 }
1895 #[doc = "Bit 13 - Transmit Buffer Indication Flag"]
1896 #[inline]
1897 pub fn tbif(&self) -> TBIFR {
1898 TBIFR::_from({
1899 const MASK: bool = true;
1900 const OFFSET: u8 = 13;
1901 ((self.bits >> OFFSET) & MASK as u32) != 0
1902 })
1903 }
1904 #[doc = "Bit 14 - Receive Indication Flag"]
1905 #[inline]
1906 pub fn rif(&self) -> RIFR {
1907 RIFR::_from({
1908 const MASK: bool = true;
1909 const OFFSET: u8 = 14;
1910 ((self.bits >> OFFSET) & MASK as u32) != 0
1911 })
1912 }
1913 #[doc = "Bit 15 - Alternative Receive Indication Flag"]
1914 #[inline]
1915 pub fn aif(&self) -> AIFR {
1916 AIFR::_from({
1917 const MASK: bool = true;
1918 const OFFSET: u8 = 15;
1919 ((self.bits >> OFFSET) & MASK as u32) != 0
1920 })
1921 }
1922 #[doc = "Bit 16 - Baud Rate Generator Indication Flag"]
1923 #[inline]
1924 pub fn brgif(&self) -> BRGIFR {
1925 BRGIFR::_from({
1926 const MASK: bool = true;
1927 const OFFSET: u8 = 16;
1928 ((self.bits >> OFFSET) & MASK as u32) != 0
1929 })
1930 }
1931}
1932impl W {
1933 #[doc = r" Reset value of the register"]
1934 #[inline]
1935 pub fn reset_value() -> W {
1936 W { bits: 0 }
1937 }
1938 #[doc = r" Writes raw bits to the register"]
1939 #[inline]
1940 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1941 self.bits = bits;
1942 self
1943 }
1944 #[doc = "Bit 0 - Transmission Idle"]
1945 #[inline]
1946 pub fn txidle(&mut self) -> _TXIDLEW {
1947 _TXIDLEW { w: self }
1948 }
1949 #[doc = "Bit 1 - Reception Idle"]
1950 #[inline]
1951 pub fn rxidle(&mut self) -> _RXIDLEW {
1952 _RXIDLEW { w: self }
1953 }
1954 #[doc = "Bit 2 - Synchronization Break Detected"]
1955 #[inline]
1956 pub fn sbd(&mut self) -> _SBDW {
1957 _SBDW { w: self }
1958 }
1959 #[doc = "Bit 3 - Collision Detected"]
1960 #[inline]
1961 pub fn col(&mut self) -> _COLW {
1962 _COLW { w: self }
1963 }
1964 #[doc = "Bit 4 - Receiver Noise Detected"]
1965 #[inline]
1966 pub fn rns(&mut self) -> _RNSW {
1967 _RNSW { w: self }
1968 }
1969 #[doc = "Bit 5 - Format Error in Stop Bit 0"]
1970 #[inline]
1971 pub fn fer0(&mut self) -> _FER0W {
1972 _FER0W { w: self }
1973 }
1974 #[doc = "Bit 6 - Format Error in Stop Bit 1"]
1975 #[inline]
1976 pub fn fer1(&mut self) -> _FER1W {
1977 _FER1W { w: self }
1978 }
1979 #[doc = "Bit 7 - Receive Frame Finished"]
1980 #[inline]
1981 pub fn rff(&mut self) -> _RFFW {
1982 _RFFW { w: self }
1983 }
1984 #[doc = "Bit 8 - Transmitter Frame Finished"]
1985 #[inline]
1986 pub fn tff(&mut self) -> _TFFW {
1987 _TFFW { w: self }
1988 }
1989 #[doc = "Bit 10 - Receiver Start Indication Flag"]
1990 #[inline]
1991 pub fn rsif(&mut self) -> _RSIFW {
1992 _RSIFW { w: self }
1993 }
1994 #[doc = "Bit 11 - Data Lost Indication Flag"]
1995 #[inline]
1996 pub fn dlif(&mut self) -> _DLIFW {
1997 _DLIFW { w: self }
1998 }
1999 #[doc = "Bit 12 - Transmit Shift Indication Flag"]
2000 #[inline]
2001 pub fn tsif(&mut self) -> _TSIFW {
2002 _TSIFW { w: self }
2003 }
2004 #[doc = "Bit 13 - Transmit Buffer Indication Flag"]
2005 #[inline]
2006 pub fn tbif(&mut self) -> _TBIFW {
2007 _TBIFW { w: self }
2008 }
2009 #[doc = "Bit 14 - Receive Indication Flag"]
2010 #[inline]
2011 pub fn rif(&mut self) -> _RIFW {
2012 _RIFW { w: self }
2013 }
2014 #[doc = "Bit 15 - Alternative Receive Indication Flag"]
2015 #[inline]
2016 pub fn aif(&mut self) -> _AIFW {
2017 _AIFW { w: self }
2018 }
2019 #[doc = "Bit 16 - Baud Rate Generator Indication Flag"]
2020 #[inline]
2021 pub fn brgif(&mut self) -> _BRGIFW {
2022 _BRGIFW { w: self }
2023 }
2024}