1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u8,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7 bits: u8,
8}
9impl super::C3 {
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 `PEIE`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum PEIER {
48 #[doc = "PF interrupt requests are disabled."]
49 _0,
50 #[doc = "PF interrupt requests are enabled."]
51 _1,
52}
53impl PEIER {
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 PEIER::_0 => false,
69 PEIER::_1 => true,
70 }
71 }
72 #[allow(missing_docs)]
73 #[doc(hidden)]
74 #[inline]
75 pub fn _from(value: bool) -> PEIER {
76 match value {
77 false => PEIER::_0,
78 true => PEIER::_1,
79 }
80 }
81 #[doc = "Checks if the value of the field is `_0`"]
82 #[inline]
83 pub fn is_0(&self) -> bool {
84 *self == PEIER::_0
85 }
86 #[doc = "Checks if the value of the field is `_1`"]
87 #[inline]
88 pub fn is_1(&self) -> bool {
89 *self == PEIER::_1
90 }
91}
92#[doc = "Possible values of the field `FEIE`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum FEIER {
95 #[doc = "FE interrupt requests are disabled."]
96 _0,
97 #[doc = "FE interrupt requests are enabled."]
98 _1,
99}
100impl FEIER {
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 FEIER::_0 => false,
116 FEIER::_1 => true,
117 }
118 }
119 #[allow(missing_docs)]
120 #[doc(hidden)]
121 #[inline]
122 pub fn _from(value: bool) -> FEIER {
123 match value {
124 false => FEIER::_0,
125 true => FEIER::_1,
126 }
127 }
128 #[doc = "Checks if the value of the field is `_0`"]
129 #[inline]
130 pub fn is_0(&self) -> bool {
131 *self == FEIER::_0
132 }
133 #[doc = "Checks if the value of the field is `_1`"]
134 #[inline]
135 pub fn is_1(&self) -> bool {
136 *self == FEIER::_1
137 }
138}
139#[doc = "Possible values of the field `NEIE`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum NEIER {
142 #[doc = "NF interrupt requests are disabled."]
143 _0,
144 #[doc = "NF interrupt requests are enabled."]
145 _1,
146}
147impl NEIER {
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 NEIER::_0 => false,
163 NEIER::_1 => true,
164 }
165 }
166 #[allow(missing_docs)]
167 #[doc(hidden)]
168 #[inline]
169 pub fn _from(value: bool) -> NEIER {
170 match value {
171 false => NEIER::_0,
172 true => NEIER::_1,
173 }
174 }
175 #[doc = "Checks if the value of the field is `_0`"]
176 #[inline]
177 pub fn is_0(&self) -> bool {
178 *self == NEIER::_0
179 }
180 #[doc = "Checks if the value of the field is `_1`"]
181 #[inline]
182 pub fn is_1(&self) -> bool {
183 *self == NEIER::_1
184 }
185}
186#[doc = "Possible values of the field `ORIE`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum ORIER {
189 #[doc = "OR interrupts are disabled."]
190 _0,
191 #[doc = "OR interrupt requests are enabled."]
192 _1,
193}
194impl ORIER {
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 ORIER::_0 => false,
210 ORIER::_1 => true,
211 }
212 }
213 #[allow(missing_docs)]
214 #[doc(hidden)]
215 #[inline]
216 pub fn _from(value: bool) -> ORIER {
217 match value {
218 false => ORIER::_0,
219 true => ORIER::_1,
220 }
221 }
222 #[doc = "Checks if the value of the field is `_0`"]
223 #[inline]
224 pub fn is_0(&self) -> bool {
225 *self == ORIER::_0
226 }
227 #[doc = "Checks if the value of the field is `_1`"]
228 #[inline]
229 pub fn is_1(&self) -> bool {
230 *self == ORIER::_1
231 }
232}
233#[doc = "Possible values of the field `TXINV`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum TXINVR {
236 #[doc = "Transmit data is not inverted."]
237 _0,
238 #[doc = "Transmit data is inverted."]
239 _1,
240}
241impl TXINVR {
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 TXINVR::_0 => false,
257 TXINVR::_1 => true,
258 }
259 }
260 #[allow(missing_docs)]
261 #[doc(hidden)]
262 #[inline]
263 pub fn _from(value: bool) -> TXINVR {
264 match value {
265 false => TXINVR::_0,
266 true => TXINVR::_1,
267 }
268 }
269 #[doc = "Checks if the value of the field is `_0`"]
270 #[inline]
271 pub fn is_0(&self) -> bool {
272 *self == TXINVR::_0
273 }
274 #[doc = "Checks if the value of the field is `_1`"]
275 #[inline]
276 pub fn is_1(&self) -> bool {
277 *self == TXINVR::_1
278 }
279}
280#[doc = "Possible values of the field `TXDIR`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum TXDIRR {
283 #[doc = "TXD pin is an input in single-wire mode."]
284 _0,
285 #[doc = "TXD pin is an output in single-wire mode."]
286 _1,
287}
288impl TXDIRR {
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 TXDIRR::_0 => false,
304 TXDIRR::_1 => true,
305 }
306 }
307 #[allow(missing_docs)]
308 #[doc(hidden)]
309 #[inline]
310 pub fn _from(value: bool) -> TXDIRR {
311 match value {
312 false => TXDIRR::_0,
313 true => TXDIRR::_1,
314 }
315 }
316 #[doc = "Checks if the value of the field is `_0`"]
317 #[inline]
318 pub fn is_0(&self) -> bool {
319 *self == TXDIRR::_0
320 }
321 #[doc = "Checks if the value of the field is `_1`"]
322 #[inline]
323 pub fn is_1(&self) -> bool {
324 *self == TXDIRR::_1
325 }
326}
327#[doc = r" Value of the field"]
328pub struct T8R {
329 bits: bool,
330}
331impl T8R {
332 #[doc = r" Value of the field as raw bits"]
333 #[inline]
334 pub fn bit(&self) -> bool {
335 self.bits
336 }
337 #[doc = r" Returns `true` if the bit is clear (0)"]
338 #[inline]
339 pub fn bit_is_clear(&self) -> bool {
340 !self.bit()
341 }
342 #[doc = r" Returns `true` if the bit is set (1)"]
343 #[inline]
344 pub fn bit_is_set(&self) -> bool {
345 self.bit()
346 }
347}
348#[doc = r" Value of the field"]
349pub struct R8R {
350 bits: bool,
351}
352impl R8R {
353 #[doc = r" Value of the field as raw bits"]
354 #[inline]
355 pub fn bit(&self) -> bool {
356 self.bits
357 }
358 #[doc = r" Returns `true` if the bit is clear (0)"]
359 #[inline]
360 pub fn bit_is_clear(&self) -> bool {
361 !self.bit()
362 }
363 #[doc = r" Returns `true` if the bit is set (1)"]
364 #[inline]
365 pub fn bit_is_set(&self) -> bool {
366 self.bit()
367 }
368}
369#[doc = "Values that can be written to the field `PEIE`"]
370pub enum PEIEW {
371 #[doc = "PF interrupt requests are disabled."]
372 _0,
373 #[doc = "PF interrupt requests are enabled."]
374 _1,
375}
376impl PEIEW {
377 #[allow(missing_docs)]
378 #[doc(hidden)]
379 #[inline]
380 pub fn _bits(&self) -> bool {
381 match *self {
382 PEIEW::_0 => false,
383 PEIEW::_1 => true,
384 }
385 }
386}
387#[doc = r" Proxy"]
388pub struct _PEIEW<'a> {
389 w: &'a mut W,
390}
391impl<'a> _PEIEW<'a> {
392 #[doc = r" Writes `variant` to the field"]
393 #[inline]
394 pub fn variant(self, variant: PEIEW) -> &'a mut W {
395 {
396 self.bit(variant._bits())
397 }
398 }
399 #[doc = "PF interrupt requests are disabled."]
400 #[inline]
401 pub fn _0(self) -> &'a mut W {
402 self.variant(PEIEW::_0)
403 }
404 #[doc = "PF interrupt requests are enabled."]
405 #[inline]
406 pub fn _1(self) -> &'a mut W {
407 self.variant(PEIEW::_1)
408 }
409 #[doc = r" Sets the field bit"]
410 pub fn set_bit(self) -> &'a mut W {
411 self.bit(true)
412 }
413 #[doc = r" Clears the field bit"]
414 pub fn clear_bit(self) -> &'a mut W {
415 self.bit(false)
416 }
417 #[doc = r" Writes raw bits to the field"]
418 #[inline]
419 pub fn bit(self, value: bool) -> &'a mut W {
420 const MASK: bool = true;
421 const OFFSET: u8 = 0;
422 self.w.bits &= !((MASK as u8) << OFFSET);
423 self.w.bits |= ((value & MASK) as u8) << OFFSET;
424 self.w
425 }
426}
427#[doc = "Values that can be written to the field `FEIE`"]
428pub enum FEIEW {
429 #[doc = "FE interrupt requests are disabled."]
430 _0,
431 #[doc = "FE interrupt requests are enabled."]
432 _1,
433}
434impl FEIEW {
435 #[allow(missing_docs)]
436 #[doc(hidden)]
437 #[inline]
438 pub fn _bits(&self) -> bool {
439 match *self {
440 FEIEW::_0 => false,
441 FEIEW::_1 => true,
442 }
443 }
444}
445#[doc = r" Proxy"]
446pub struct _FEIEW<'a> {
447 w: &'a mut W,
448}
449impl<'a> _FEIEW<'a> {
450 #[doc = r" Writes `variant` to the field"]
451 #[inline]
452 pub fn variant(self, variant: FEIEW) -> &'a mut W {
453 {
454 self.bit(variant._bits())
455 }
456 }
457 #[doc = "FE interrupt requests are disabled."]
458 #[inline]
459 pub fn _0(self) -> &'a mut W {
460 self.variant(FEIEW::_0)
461 }
462 #[doc = "FE interrupt requests are enabled."]
463 #[inline]
464 pub fn _1(self) -> &'a mut W {
465 self.variant(FEIEW::_1)
466 }
467 #[doc = r" Sets the field bit"]
468 pub fn set_bit(self) -> &'a mut W {
469 self.bit(true)
470 }
471 #[doc = r" Clears the field bit"]
472 pub fn clear_bit(self) -> &'a mut W {
473 self.bit(false)
474 }
475 #[doc = r" Writes raw bits to the field"]
476 #[inline]
477 pub fn bit(self, value: bool) -> &'a mut W {
478 const MASK: bool = true;
479 const OFFSET: u8 = 1;
480 self.w.bits &= !((MASK as u8) << OFFSET);
481 self.w.bits |= ((value & MASK) as u8) << OFFSET;
482 self.w
483 }
484}
485#[doc = "Values that can be written to the field `NEIE`"]
486pub enum NEIEW {
487 #[doc = "NF interrupt requests are disabled."]
488 _0,
489 #[doc = "NF interrupt requests are enabled."]
490 _1,
491}
492impl NEIEW {
493 #[allow(missing_docs)]
494 #[doc(hidden)]
495 #[inline]
496 pub fn _bits(&self) -> bool {
497 match *self {
498 NEIEW::_0 => false,
499 NEIEW::_1 => true,
500 }
501 }
502}
503#[doc = r" Proxy"]
504pub struct _NEIEW<'a> {
505 w: &'a mut W,
506}
507impl<'a> _NEIEW<'a> {
508 #[doc = r" Writes `variant` to the field"]
509 #[inline]
510 pub fn variant(self, variant: NEIEW) -> &'a mut W {
511 {
512 self.bit(variant._bits())
513 }
514 }
515 #[doc = "NF interrupt requests are disabled."]
516 #[inline]
517 pub fn _0(self) -> &'a mut W {
518 self.variant(NEIEW::_0)
519 }
520 #[doc = "NF interrupt requests are enabled."]
521 #[inline]
522 pub fn _1(self) -> &'a mut W {
523 self.variant(NEIEW::_1)
524 }
525 #[doc = r" Sets the field bit"]
526 pub fn set_bit(self) -> &'a mut W {
527 self.bit(true)
528 }
529 #[doc = r" Clears the field bit"]
530 pub fn clear_bit(self) -> &'a mut W {
531 self.bit(false)
532 }
533 #[doc = r" Writes raw bits to the field"]
534 #[inline]
535 pub fn bit(self, value: bool) -> &'a mut W {
536 const MASK: bool = true;
537 const OFFSET: u8 = 2;
538 self.w.bits &= !((MASK as u8) << OFFSET);
539 self.w.bits |= ((value & MASK) as u8) << OFFSET;
540 self.w
541 }
542}
543#[doc = "Values that can be written to the field `ORIE`"]
544pub enum ORIEW {
545 #[doc = "OR interrupts are disabled."]
546 _0,
547 #[doc = "OR interrupt requests are enabled."]
548 _1,
549}
550impl ORIEW {
551 #[allow(missing_docs)]
552 #[doc(hidden)]
553 #[inline]
554 pub fn _bits(&self) -> bool {
555 match *self {
556 ORIEW::_0 => false,
557 ORIEW::_1 => true,
558 }
559 }
560}
561#[doc = r" Proxy"]
562pub struct _ORIEW<'a> {
563 w: &'a mut W,
564}
565impl<'a> _ORIEW<'a> {
566 #[doc = r" Writes `variant` to the field"]
567 #[inline]
568 pub fn variant(self, variant: ORIEW) -> &'a mut W {
569 {
570 self.bit(variant._bits())
571 }
572 }
573 #[doc = "OR interrupts are disabled."]
574 #[inline]
575 pub fn _0(self) -> &'a mut W {
576 self.variant(ORIEW::_0)
577 }
578 #[doc = "OR interrupt requests are enabled."]
579 #[inline]
580 pub fn _1(self) -> &'a mut W {
581 self.variant(ORIEW::_1)
582 }
583 #[doc = r" Sets the field bit"]
584 pub fn set_bit(self) -> &'a mut W {
585 self.bit(true)
586 }
587 #[doc = r" Clears the field bit"]
588 pub fn clear_bit(self) -> &'a mut W {
589 self.bit(false)
590 }
591 #[doc = r" Writes raw bits to the field"]
592 #[inline]
593 pub fn bit(self, value: bool) -> &'a mut W {
594 const MASK: bool = true;
595 const OFFSET: u8 = 3;
596 self.w.bits &= !((MASK as u8) << OFFSET);
597 self.w.bits |= ((value & MASK) as u8) << OFFSET;
598 self.w
599 }
600}
601#[doc = "Values that can be written to the field `TXINV`"]
602pub enum TXINVW {
603 #[doc = "Transmit data is not inverted."]
604 _0,
605 #[doc = "Transmit data is inverted."]
606 _1,
607}
608impl TXINVW {
609 #[allow(missing_docs)]
610 #[doc(hidden)]
611 #[inline]
612 pub fn _bits(&self) -> bool {
613 match *self {
614 TXINVW::_0 => false,
615 TXINVW::_1 => true,
616 }
617 }
618}
619#[doc = r" Proxy"]
620pub struct _TXINVW<'a> {
621 w: &'a mut W,
622}
623impl<'a> _TXINVW<'a> {
624 #[doc = r" Writes `variant` to the field"]
625 #[inline]
626 pub fn variant(self, variant: TXINVW) -> &'a mut W {
627 {
628 self.bit(variant._bits())
629 }
630 }
631 #[doc = "Transmit data is not inverted."]
632 #[inline]
633 pub fn _0(self) -> &'a mut W {
634 self.variant(TXINVW::_0)
635 }
636 #[doc = "Transmit data is inverted."]
637 #[inline]
638 pub fn _1(self) -> &'a mut W {
639 self.variant(TXINVW::_1)
640 }
641 #[doc = r" Sets the field bit"]
642 pub fn set_bit(self) -> &'a mut W {
643 self.bit(true)
644 }
645 #[doc = r" Clears the field bit"]
646 pub fn clear_bit(self) -> &'a mut W {
647 self.bit(false)
648 }
649 #[doc = r" Writes raw bits to the field"]
650 #[inline]
651 pub fn bit(self, value: bool) -> &'a mut W {
652 const MASK: bool = true;
653 const OFFSET: u8 = 4;
654 self.w.bits &= !((MASK as u8) << OFFSET);
655 self.w.bits |= ((value & MASK) as u8) << OFFSET;
656 self.w
657 }
658}
659#[doc = "Values that can be written to the field `TXDIR`"]
660pub enum TXDIRW {
661 #[doc = "TXD pin is an input in single-wire mode."]
662 _0,
663 #[doc = "TXD pin is an output in single-wire mode."]
664 _1,
665}
666impl TXDIRW {
667 #[allow(missing_docs)]
668 #[doc(hidden)]
669 #[inline]
670 pub fn _bits(&self) -> bool {
671 match *self {
672 TXDIRW::_0 => false,
673 TXDIRW::_1 => true,
674 }
675 }
676}
677#[doc = r" Proxy"]
678pub struct _TXDIRW<'a> {
679 w: &'a mut W,
680}
681impl<'a> _TXDIRW<'a> {
682 #[doc = r" Writes `variant` to the field"]
683 #[inline]
684 pub fn variant(self, variant: TXDIRW) -> &'a mut W {
685 {
686 self.bit(variant._bits())
687 }
688 }
689 #[doc = "TXD pin is an input in single-wire mode."]
690 #[inline]
691 pub fn _0(self) -> &'a mut W {
692 self.variant(TXDIRW::_0)
693 }
694 #[doc = "TXD pin is an output in single-wire mode."]
695 #[inline]
696 pub fn _1(self) -> &'a mut W {
697 self.variant(TXDIRW::_1)
698 }
699 #[doc = r" Sets the field bit"]
700 pub fn set_bit(self) -> &'a mut W {
701 self.bit(true)
702 }
703 #[doc = r" Clears the field bit"]
704 pub fn clear_bit(self) -> &'a mut W {
705 self.bit(false)
706 }
707 #[doc = r" Writes raw bits to the field"]
708 #[inline]
709 pub fn bit(self, value: bool) -> &'a mut W {
710 const MASK: bool = true;
711 const OFFSET: u8 = 5;
712 self.w.bits &= !((MASK as u8) << OFFSET);
713 self.w.bits |= ((value & MASK) as u8) << OFFSET;
714 self.w
715 }
716}
717#[doc = r" Proxy"]
718pub struct _T8W<'a> {
719 w: &'a mut W,
720}
721impl<'a> _T8W<'a> {
722 #[doc = r" Sets the field bit"]
723 pub fn set_bit(self) -> &'a mut W {
724 self.bit(true)
725 }
726 #[doc = r" Clears the field bit"]
727 pub fn clear_bit(self) -> &'a mut W {
728 self.bit(false)
729 }
730 #[doc = r" Writes raw bits to the field"]
731 #[inline]
732 pub fn bit(self, value: bool) -> &'a mut W {
733 const MASK: bool = true;
734 const OFFSET: u8 = 6;
735 self.w.bits &= !((MASK as u8) << OFFSET);
736 self.w.bits |= ((value & MASK) as u8) << OFFSET;
737 self.w
738 }
739}
740impl R {
741 #[doc = r" Value of the register as raw bits"]
742 #[inline]
743 pub fn bits(&self) -> u8 {
744 self.bits
745 }
746 #[doc = "Bit 0 - Parity Error Interrupt Enable"]
747 #[inline]
748 pub fn peie(&self) -> PEIER {
749 PEIER::_from({
750 const MASK: bool = true;
751 const OFFSET: u8 = 0;
752 ((self.bits >> OFFSET) & MASK as u8) != 0
753 })
754 }
755 #[doc = "Bit 1 - Framing Error Interrupt Enable"]
756 #[inline]
757 pub fn feie(&self) -> FEIER {
758 FEIER::_from({
759 const MASK: bool = true;
760 const OFFSET: u8 = 1;
761 ((self.bits >> OFFSET) & MASK as u8) != 0
762 })
763 }
764 #[doc = "Bit 2 - Noise Error Interrupt Enable"]
765 #[inline]
766 pub fn neie(&self) -> NEIER {
767 NEIER::_from({
768 const MASK: bool = true;
769 const OFFSET: u8 = 2;
770 ((self.bits >> OFFSET) & MASK as u8) != 0
771 })
772 }
773 #[doc = "Bit 3 - Overrun Error Interrupt Enable"]
774 #[inline]
775 pub fn orie(&self) -> ORIER {
776 ORIER::_from({
777 const MASK: bool = true;
778 const OFFSET: u8 = 3;
779 ((self.bits >> OFFSET) & MASK as u8) != 0
780 })
781 }
782 #[doc = "Bit 4 - Transmit Data Inversion."]
783 #[inline]
784 pub fn txinv(&self) -> TXINVR {
785 TXINVR::_from({
786 const MASK: bool = true;
787 const OFFSET: u8 = 4;
788 ((self.bits >> OFFSET) & MASK as u8) != 0
789 })
790 }
791 #[doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode"]
792 #[inline]
793 pub fn txdir(&self) -> TXDIRR {
794 TXDIRR::_from({
795 const MASK: bool = true;
796 const OFFSET: u8 = 5;
797 ((self.bits >> OFFSET) & MASK as u8) != 0
798 })
799 }
800 #[doc = "Bit 6 - Transmit Bit 8"]
801 #[inline]
802 pub fn t8(&self) -> T8R {
803 let bits = {
804 const MASK: bool = true;
805 const OFFSET: u8 = 6;
806 ((self.bits >> OFFSET) & MASK as u8) != 0
807 };
808 T8R { bits }
809 }
810 #[doc = "Bit 7 - Received Bit 8"]
811 #[inline]
812 pub fn r8(&self) -> R8R {
813 let bits = {
814 const MASK: bool = true;
815 const OFFSET: u8 = 7;
816 ((self.bits >> OFFSET) & MASK as u8) != 0
817 };
818 R8R { bits }
819 }
820}
821impl W {
822 #[doc = r" Reset value of the register"]
823 #[inline]
824 pub fn reset_value() -> W {
825 W { bits: 0 }
826 }
827 #[doc = r" Writes raw bits to the register"]
828 #[inline]
829 pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
830 self.bits = bits;
831 self
832 }
833 #[doc = "Bit 0 - Parity Error Interrupt Enable"]
834 #[inline]
835 pub fn peie(&mut self) -> _PEIEW {
836 _PEIEW { w: self }
837 }
838 #[doc = "Bit 1 - Framing Error Interrupt Enable"]
839 #[inline]
840 pub fn feie(&mut self) -> _FEIEW {
841 _FEIEW { w: self }
842 }
843 #[doc = "Bit 2 - Noise Error Interrupt Enable"]
844 #[inline]
845 pub fn neie(&mut self) -> _NEIEW {
846 _NEIEW { w: self }
847 }
848 #[doc = "Bit 3 - Overrun Error Interrupt Enable"]
849 #[inline]
850 pub fn orie(&mut self) -> _ORIEW {
851 _ORIEW { w: self }
852 }
853 #[doc = "Bit 4 - Transmit Data Inversion."]
854 #[inline]
855 pub fn txinv(&mut self) -> _TXINVW {
856 _TXINVW { w: self }
857 }
858 #[doc = "Bit 5 - Transmitter Pin Data Direction in Single-Wire mode"]
859 #[inline]
860 pub fn txdir(&mut self) -> _TXDIRW {
861 _TXDIRW { w: self }
862 }
863 #[doc = "Bit 6 - Transmit Bit 8"]
864 #[inline]
865 pub fn t8(&mut self) -> _T8W {
866 _T8W { w: self }
867 }
868}