stm32l4x2_pac/can1/
tsr.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::TSR {
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 LOW2R {
47 bits: bool,
48}
49impl LOW2R {
50 #[doc = r" Value of the field as raw bits"]
51 #[inline]
52 pub fn bit(&self) -> bool {
53 self.bits
54 }
55 #[doc = r" Returns `true` if the bit is clear (0)"]
56 #[inline]
57 pub fn bit_is_clear(&self) -> bool {
58 !self.bit()
59 }
60 #[doc = r" Returns `true` if the bit is set (1)"]
61 #[inline]
62 pub fn bit_is_set(&self) -> bool {
63 self.bit()
64 }
65}
66#[doc = r" Value of the field"]
67pub struct LOW1R {
68 bits: bool,
69}
70impl LOW1R {
71 #[doc = r" Value of the field as raw bits"]
72 #[inline]
73 pub fn bit(&self) -> bool {
74 self.bits
75 }
76 #[doc = r" Returns `true` if the bit is clear (0)"]
77 #[inline]
78 pub fn bit_is_clear(&self) -> bool {
79 !self.bit()
80 }
81 #[doc = r" Returns `true` if the bit is set (1)"]
82 #[inline]
83 pub fn bit_is_set(&self) -> bool {
84 self.bit()
85 }
86}
87#[doc = r" Value of the field"]
88pub struct LOW0R {
89 bits: bool,
90}
91impl LOW0R {
92 #[doc = r" Value of the field as raw bits"]
93 #[inline]
94 pub fn bit(&self) -> bool {
95 self.bits
96 }
97 #[doc = r" Returns `true` if the bit is clear (0)"]
98 #[inline]
99 pub fn bit_is_clear(&self) -> bool {
100 !self.bit()
101 }
102 #[doc = r" Returns `true` if the bit is set (1)"]
103 #[inline]
104 pub fn bit_is_set(&self) -> bool {
105 self.bit()
106 }
107}
108#[doc = r" Value of the field"]
109pub struct TME2R {
110 bits: bool,
111}
112impl TME2R {
113 #[doc = r" Value of the field as raw bits"]
114 #[inline]
115 pub fn bit(&self) -> bool {
116 self.bits
117 }
118 #[doc = r" Returns `true` if the bit is clear (0)"]
119 #[inline]
120 pub fn bit_is_clear(&self) -> bool {
121 !self.bit()
122 }
123 #[doc = r" Returns `true` if the bit is set (1)"]
124 #[inline]
125 pub fn bit_is_set(&self) -> bool {
126 self.bit()
127 }
128}
129#[doc = r" Value of the field"]
130pub struct TME1R {
131 bits: bool,
132}
133impl TME1R {
134 #[doc = r" Value of the field as raw bits"]
135 #[inline]
136 pub fn bit(&self) -> bool {
137 self.bits
138 }
139 #[doc = r" Returns `true` if the bit is clear (0)"]
140 #[inline]
141 pub fn bit_is_clear(&self) -> bool {
142 !self.bit()
143 }
144 #[doc = r" Returns `true` if the bit is set (1)"]
145 #[inline]
146 pub fn bit_is_set(&self) -> bool {
147 self.bit()
148 }
149}
150#[doc = r" Value of the field"]
151pub struct TME0R {
152 bits: bool,
153}
154impl TME0R {
155 #[doc = r" Value of the field as raw bits"]
156 #[inline]
157 pub fn bit(&self) -> bool {
158 self.bits
159 }
160 #[doc = r" Returns `true` if the bit is clear (0)"]
161 #[inline]
162 pub fn bit_is_clear(&self) -> bool {
163 !self.bit()
164 }
165 #[doc = r" Returns `true` if the bit is set (1)"]
166 #[inline]
167 pub fn bit_is_set(&self) -> bool {
168 self.bit()
169 }
170}
171#[doc = r" Value of the field"]
172pub struct CODER {
173 bits: u8,
174}
175impl CODER {
176 #[doc = r" Value of the field as raw bits"]
177 #[inline]
178 pub fn bits(&self) -> u8 {
179 self.bits
180 }
181}
182#[doc = r" Value of the field"]
183pub struct ABRQ2R {
184 bits: bool,
185}
186impl ABRQ2R {
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 TERR2R {
205 bits: bool,
206}
207impl TERR2R {
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 ALST2R {
226 bits: bool,
227}
228impl ALST2R {
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 TXOK2R {
247 bits: bool,
248}
249impl TXOK2R {
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 RQCP2R {
268 bits: bool,
269}
270impl RQCP2R {
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 ABRQ1R {
289 bits: bool,
290}
291impl ABRQ1R {
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 TERR1R {
310 bits: bool,
311}
312impl TERR1R {
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 ALST1R {
331 bits: bool,
332}
333impl ALST1R {
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 TXOK1R {
352 bits: bool,
353}
354impl TXOK1R {
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 RQCP1R {
373 bits: bool,
374}
375impl RQCP1R {
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 ABRQ0R {
394 bits: bool,
395}
396impl ABRQ0R {
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 TERR0R {
415 bits: bool,
416}
417impl TERR0R {
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 ALST0R {
436 bits: bool,
437}
438impl ALST0R {
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 TXOK0R {
457 bits: bool,
458}
459impl TXOK0R {
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 = r" Value of the field"]
477pub struct RQCP0R {
478 bits: bool,
479}
480impl RQCP0R {
481 #[doc = r" Value of the field as raw bits"]
482 #[inline]
483 pub fn bit(&self) -> bool {
484 self.bits
485 }
486 #[doc = r" Returns `true` if the bit is clear (0)"]
487 #[inline]
488 pub fn bit_is_clear(&self) -> bool {
489 !self.bit()
490 }
491 #[doc = r" Returns `true` if the bit is set (1)"]
492 #[inline]
493 pub fn bit_is_set(&self) -> bool {
494 self.bit()
495 }
496}
497#[doc = r" Proxy"]
498pub struct _ABRQ2W<'a> {
499 w: &'a mut W,
500}
501impl<'a> _ABRQ2W<'a> {
502 #[doc = r" Sets the field bit"]
503 pub fn set_bit(self) -> &'a mut W {
504 self.bit(true)
505 }
506 #[doc = r" Clears the field bit"]
507 pub fn clear_bit(self) -> &'a mut W {
508 self.bit(false)
509 }
510 #[doc = r" Writes raw bits to the field"]
511 #[inline]
512 pub fn bit(self, value: bool) -> &'a mut W {
513 const MASK: bool = true;
514 const OFFSET: u8 = 23;
515 self.w.bits &= !((MASK as u32) << OFFSET);
516 self.w.bits |= ((value & MASK) as u32) << OFFSET;
517 self.w
518 }
519}
520#[doc = r" Proxy"]
521pub struct _TERR2W<'a> {
522 w: &'a mut W,
523}
524impl<'a> _TERR2W<'a> {
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 = 19;
538 self.w.bits &= !((MASK as u32) << OFFSET);
539 self.w.bits |= ((value & MASK) as u32) << OFFSET;
540 self.w
541 }
542}
543#[doc = r" Proxy"]
544pub struct _ALST2W<'a> {
545 w: &'a mut W,
546}
547impl<'a> _ALST2W<'a> {
548 #[doc = r" Sets the field bit"]
549 pub fn set_bit(self) -> &'a mut W {
550 self.bit(true)
551 }
552 #[doc = r" Clears the field bit"]
553 pub fn clear_bit(self) -> &'a mut W {
554 self.bit(false)
555 }
556 #[doc = r" Writes raw bits to the field"]
557 #[inline]
558 pub fn bit(self, value: bool) -> &'a mut W {
559 const MASK: bool = true;
560 const OFFSET: u8 = 18;
561 self.w.bits &= !((MASK as u32) << OFFSET);
562 self.w.bits |= ((value & MASK) as u32) << OFFSET;
563 self.w
564 }
565}
566#[doc = r" Proxy"]
567pub struct _TXOK2W<'a> {
568 w: &'a mut W,
569}
570impl<'a> _TXOK2W<'a> {
571 #[doc = r" Sets the field bit"]
572 pub fn set_bit(self) -> &'a mut W {
573 self.bit(true)
574 }
575 #[doc = r" Clears the field bit"]
576 pub fn clear_bit(self) -> &'a mut W {
577 self.bit(false)
578 }
579 #[doc = r" Writes raw bits to the field"]
580 #[inline]
581 pub fn bit(self, value: bool) -> &'a mut W {
582 const MASK: bool = true;
583 const OFFSET: u8 = 17;
584 self.w.bits &= !((MASK as u32) << OFFSET);
585 self.w.bits |= ((value & MASK) as u32) << OFFSET;
586 self.w
587 }
588}
589#[doc = r" Proxy"]
590pub struct _RQCP2W<'a> {
591 w: &'a mut W,
592}
593impl<'a> _RQCP2W<'a> {
594 #[doc = r" Sets the field bit"]
595 pub fn set_bit(self) -> &'a mut W {
596 self.bit(true)
597 }
598 #[doc = r" Clears the field bit"]
599 pub fn clear_bit(self) -> &'a mut W {
600 self.bit(false)
601 }
602 #[doc = r" Writes raw bits to the field"]
603 #[inline]
604 pub fn bit(self, value: bool) -> &'a mut W {
605 const MASK: bool = true;
606 const OFFSET: u8 = 16;
607 self.w.bits &= !((MASK as u32) << OFFSET);
608 self.w.bits |= ((value & MASK) as u32) << OFFSET;
609 self.w
610 }
611}
612#[doc = r" Proxy"]
613pub struct _ABRQ1W<'a> {
614 w: &'a mut W,
615}
616impl<'a> _ABRQ1W<'a> {
617 #[doc = r" Sets the field bit"]
618 pub fn set_bit(self) -> &'a mut W {
619 self.bit(true)
620 }
621 #[doc = r" Clears the field bit"]
622 pub fn clear_bit(self) -> &'a mut W {
623 self.bit(false)
624 }
625 #[doc = r" Writes raw bits to the field"]
626 #[inline]
627 pub fn bit(self, value: bool) -> &'a mut W {
628 const MASK: bool = true;
629 const OFFSET: u8 = 15;
630 self.w.bits &= !((MASK as u32) << OFFSET);
631 self.w.bits |= ((value & MASK) as u32) << OFFSET;
632 self.w
633 }
634}
635#[doc = r" Proxy"]
636pub struct _TERR1W<'a> {
637 w: &'a mut W,
638}
639impl<'a> _TERR1W<'a> {
640 #[doc = r" Sets the field bit"]
641 pub fn set_bit(self) -> &'a mut W {
642 self.bit(true)
643 }
644 #[doc = r" Clears the field bit"]
645 pub fn clear_bit(self) -> &'a mut W {
646 self.bit(false)
647 }
648 #[doc = r" Writes raw bits to the field"]
649 #[inline]
650 pub fn bit(self, value: bool) -> &'a mut W {
651 const MASK: bool = true;
652 const OFFSET: u8 = 11;
653 self.w.bits &= !((MASK as u32) << OFFSET);
654 self.w.bits |= ((value & MASK) as u32) << OFFSET;
655 self.w
656 }
657}
658#[doc = r" Proxy"]
659pub struct _ALST1W<'a> {
660 w: &'a mut W,
661}
662impl<'a> _ALST1W<'a> {
663 #[doc = r" Sets the field bit"]
664 pub fn set_bit(self) -> &'a mut W {
665 self.bit(true)
666 }
667 #[doc = r" Clears the field bit"]
668 pub fn clear_bit(self) -> &'a mut W {
669 self.bit(false)
670 }
671 #[doc = r" Writes raw bits to the field"]
672 #[inline]
673 pub fn bit(self, value: bool) -> &'a mut W {
674 const MASK: bool = true;
675 const OFFSET: u8 = 10;
676 self.w.bits &= !((MASK as u32) << OFFSET);
677 self.w.bits |= ((value & MASK) as u32) << OFFSET;
678 self.w
679 }
680}
681#[doc = r" Proxy"]
682pub struct _TXOK1W<'a> {
683 w: &'a mut W,
684}
685impl<'a> _TXOK1W<'a> {
686 #[doc = r" Sets the field bit"]
687 pub fn set_bit(self) -> &'a mut W {
688 self.bit(true)
689 }
690 #[doc = r" Clears the field bit"]
691 pub fn clear_bit(self) -> &'a mut W {
692 self.bit(false)
693 }
694 #[doc = r" Writes raw bits to the field"]
695 #[inline]
696 pub fn bit(self, value: bool) -> &'a mut W {
697 const MASK: bool = true;
698 const OFFSET: u8 = 9;
699 self.w.bits &= !((MASK as u32) << OFFSET);
700 self.w.bits |= ((value & MASK) as u32) << OFFSET;
701 self.w
702 }
703}
704#[doc = r" Proxy"]
705pub struct _RQCP1W<'a> {
706 w: &'a mut W,
707}
708impl<'a> _RQCP1W<'a> {
709 #[doc = r" Sets the field bit"]
710 pub fn set_bit(self) -> &'a mut W {
711 self.bit(true)
712 }
713 #[doc = r" Clears the field bit"]
714 pub fn clear_bit(self) -> &'a mut W {
715 self.bit(false)
716 }
717 #[doc = r" Writes raw bits to the field"]
718 #[inline]
719 pub fn bit(self, value: bool) -> &'a mut W {
720 const MASK: bool = true;
721 const OFFSET: u8 = 8;
722 self.w.bits &= !((MASK as u32) << OFFSET);
723 self.w.bits |= ((value & MASK) as u32) << OFFSET;
724 self.w
725 }
726}
727#[doc = r" Proxy"]
728pub struct _ABRQ0W<'a> {
729 w: &'a mut W,
730}
731impl<'a> _ABRQ0W<'a> {
732 #[doc = r" Sets the field bit"]
733 pub fn set_bit(self) -> &'a mut W {
734 self.bit(true)
735 }
736 #[doc = r" Clears the field bit"]
737 pub fn clear_bit(self) -> &'a mut W {
738 self.bit(false)
739 }
740 #[doc = r" Writes raw bits to the field"]
741 #[inline]
742 pub fn bit(self, value: bool) -> &'a mut W {
743 const MASK: bool = true;
744 const OFFSET: u8 = 7;
745 self.w.bits &= !((MASK as u32) << OFFSET);
746 self.w.bits |= ((value & MASK) as u32) << OFFSET;
747 self.w
748 }
749}
750#[doc = r" Proxy"]
751pub struct _TERR0W<'a> {
752 w: &'a mut W,
753}
754impl<'a> _TERR0W<'a> {
755 #[doc = r" Sets the field bit"]
756 pub fn set_bit(self) -> &'a mut W {
757 self.bit(true)
758 }
759 #[doc = r" Clears the field bit"]
760 pub fn clear_bit(self) -> &'a mut W {
761 self.bit(false)
762 }
763 #[doc = r" Writes raw bits to the field"]
764 #[inline]
765 pub fn bit(self, value: bool) -> &'a mut W {
766 const MASK: bool = true;
767 const OFFSET: u8 = 3;
768 self.w.bits &= !((MASK as u32) << OFFSET);
769 self.w.bits |= ((value & MASK) as u32) << OFFSET;
770 self.w
771 }
772}
773#[doc = r" Proxy"]
774pub struct _ALST0W<'a> {
775 w: &'a mut W,
776}
777impl<'a> _ALST0W<'a> {
778 #[doc = r" Sets the field bit"]
779 pub fn set_bit(self) -> &'a mut W {
780 self.bit(true)
781 }
782 #[doc = r" Clears the field bit"]
783 pub fn clear_bit(self) -> &'a mut W {
784 self.bit(false)
785 }
786 #[doc = r" Writes raw bits to the field"]
787 #[inline]
788 pub fn bit(self, value: bool) -> &'a mut W {
789 const MASK: bool = true;
790 const OFFSET: u8 = 2;
791 self.w.bits &= !((MASK as u32) << OFFSET);
792 self.w.bits |= ((value & MASK) as u32) << OFFSET;
793 self.w
794 }
795}
796#[doc = r" Proxy"]
797pub struct _TXOK0W<'a> {
798 w: &'a mut W,
799}
800impl<'a> _TXOK0W<'a> {
801 #[doc = r" Sets the field bit"]
802 pub fn set_bit(self) -> &'a mut W {
803 self.bit(true)
804 }
805 #[doc = r" Clears the field bit"]
806 pub fn clear_bit(self) -> &'a mut W {
807 self.bit(false)
808 }
809 #[doc = r" Writes raw bits to the field"]
810 #[inline]
811 pub fn bit(self, value: bool) -> &'a mut W {
812 const MASK: bool = true;
813 const OFFSET: u8 = 1;
814 self.w.bits &= !((MASK as u32) << OFFSET);
815 self.w.bits |= ((value & MASK) as u32) << OFFSET;
816 self.w
817 }
818}
819#[doc = r" Proxy"]
820pub struct _RQCP0W<'a> {
821 w: &'a mut W,
822}
823impl<'a> _RQCP0W<'a> {
824 #[doc = r" Sets the field bit"]
825 pub fn set_bit(self) -> &'a mut W {
826 self.bit(true)
827 }
828 #[doc = r" Clears the field bit"]
829 pub fn clear_bit(self) -> &'a mut W {
830 self.bit(false)
831 }
832 #[doc = r" Writes raw bits to the field"]
833 #[inline]
834 pub fn bit(self, value: bool) -> &'a mut W {
835 const MASK: bool = true;
836 const OFFSET: u8 = 0;
837 self.w.bits &= !((MASK as u32) << OFFSET);
838 self.w.bits |= ((value & MASK) as u32) << OFFSET;
839 self.w
840 }
841}
842impl R {
843 #[doc = r" Value of the register as raw bits"]
844 #[inline]
845 pub fn bits(&self) -> u32 {
846 self.bits
847 }
848 #[doc = "Bit 31 - Lowest priority flag for mailbox 2"]
849 #[inline]
850 pub fn low2(&self) -> LOW2R {
851 let bits = {
852 const MASK: bool = true;
853 const OFFSET: u8 = 31;
854 ((self.bits >> OFFSET) & MASK as u32) != 0
855 };
856 LOW2R { bits }
857 }
858 #[doc = "Bit 30 - Lowest priority flag for mailbox 1"]
859 #[inline]
860 pub fn low1(&self) -> LOW1R {
861 let bits = {
862 const MASK: bool = true;
863 const OFFSET: u8 = 30;
864 ((self.bits >> OFFSET) & MASK as u32) != 0
865 };
866 LOW1R { bits }
867 }
868 #[doc = "Bit 29 - Lowest priority flag for mailbox 0"]
869 #[inline]
870 pub fn low0(&self) -> LOW0R {
871 let bits = {
872 const MASK: bool = true;
873 const OFFSET: u8 = 29;
874 ((self.bits >> OFFSET) & MASK as u32) != 0
875 };
876 LOW0R { bits }
877 }
878 #[doc = "Bit 28 - Lowest priority flag for mailbox 2"]
879 #[inline]
880 pub fn tme2(&self) -> TME2R {
881 let bits = {
882 const MASK: bool = true;
883 const OFFSET: u8 = 28;
884 ((self.bits >> OFFSET) & MASK as u32) != 0
885 };
886 TME2R { bits }
887 }
888 #[doc = "Bit 27 - Lowest priority flag for mailbox 1"]
889 #[inline]
890 pub fn tme1(&self) -> TME1R {
891 let bits = {
892 const MASK: bool = true;
893 const OFFSET: u8 = 27;
894 ((self.bits >> OFFSET) & MASK as u32) != 0
895 };
896 TME1R { bits }
897 }
898 #[doc = "Bit 26 - Lowest priority flag for mailbox 0"]
899 #[inline]
900 pub fn tme0(&self) -> TME0R {
901 let bits = {
902 const MASK: bool = true;
903 const OFFSET: u8 = 26;
904 ((self.bits >> OFFSET) & MASK as u32) != 0
905 };
906 TME0R { bits }
907 }
908 #[doc = "Bits 24:25 - CODE"]
909 #[inline]
910 pub fn code(&self) -> CODER {
911 let bits = {
912 const MASK: u8 = 3;
913 const OFFSET: u8 = 24;
914 ((self.bits >> OFFSET) & MASK as u32) as u8
915 };
916 CODER { bits }
917 }
918 #[doc = "Bit 23 - ABRQ2"]
919 #[inline]
920 pub fn abrq2(&self) -> ABRQ2R {
921 let bits = {
922 const MASK: bool = true;
923 const OFFSET: u8 = 23;
924 ((self.bits >> OFFSET) & MASK as u32) != 0
925 };
926 ABRQ2R { bits }
927 }
928 #[doc = "Bit 19 - TERR2"]
929 #[inline]
930 pub fn terr2(&self) -> TERR2R {
931 let bits = {
932 const MASK: bool = true;
933 const OFFSET: u8 = 19;
934 ((self.bits >> OFFSET) & MASK as u32) != 0
935 };
936 TERR2R { bits }
937 }
938 #[doc = "Bit 18 - ALST2"]
939 #[inline]
940 pub fn alst2(&self) -> ALST2R {
941 let bits = {
942 const MASK: bool = true;
943 const OFFSET: u8 = 18;
944 ((self.bits >> OFFSET) & MASK as u32) != 0
945 };
946 ALST2R { bits }
947 }
948 #[doc = "Bit 17 - TXOK2"]
949 #[inline]
950 pub fn txok2(&self) -> TXOK2R {
951 let bits = {
952 const MASK: bool = true;
953 const OFFSET: u8 = 17;
954 ((self.bits >> OFFSET) & MASK as u32) != 0
955 };
956 TXOK2R { bits }
957 }
958 #[doc = "Bit 16 - RQCP2"]
959 #[inline]
960 pub fn rqcp2(&self) -> RQCP2R {
961 let bits = {
962 const MASK: bool = true;
963 const OFFSET: u8 = 16;
964 ((self.bits >> OFFSET) & MASK as u32) != 0
965 };
966 RQCP2R { bits }
967 }
968 #[doc = "Bit 15 - ABRQ1"]
969 #[inline]
970 pub fn abrq1(&self) -> ABRQ1R {
971 let bits = {
972 const MASK: bool = true;
973 const OFFSET: u8 = 15;
974 ((self.bits >> OFFSET) & MASK as u32) != 0
975 };
976 ABRQ1R { bits }
977 }
978 #[doc = "Bit 11 - TERR1"]
979 #[inline]
980 pub fn terr1(&self) -> TERR1R {
981 let bits = {
982 const MASK: bool = true;
983 const OFFSET: u8 = 11;
984 ((self.bits >> OFFSET) & MASK as u32) != 0
985 };
986 TERR1R { bits }
987 }
988 #[doc = "Bit 10 - ALST1"]
989 #[inline]
990 pub fn alst1(&self) -> ALST1R {
991 let bits = {
992 const MASK: bool = true;
993 const OFFSET: u8 = 10;
994 ((self.bits >> OFFSET) & MASK as u32) != 0
995 };
996 ALST1R { bits }
997 }
998 #[doc = "Bit 9 - TXOK1"]
999 #[inline]
1000 pub fn txok1(&self) -> TXOK1R {
1001 let bits = {
1002 const MASK: bool = true;
1003 const OFFSET: u8 = 9;
1004 ((self.bits >> OFFSET) & MASK as u32) != 0
1005 };
1006 TXOK1R { bits }
1007 }
1008 #[doc = "Bit 8 - RQCP1"]
1009 #[inline]
1010 pub fn rqcp1(&self) -> RQCP1R {
1011 let bits = {
1012 const MASK: bool = true;
1013 const OFFSET: u8 = 8;
1014 ((self.bits >> OFFSET) & MASK as u32) != 0
1015 };
1016 RQCP1R { bits }
1017 }
1018 #[doc = "Bit 7 - ABRQ0"]
1019 #[inline]
1020 pub fn abrq0(&self) -> ABRQ0R {
1021 let bits = {
1022 const MASK: bool = true;
1023 const OFFSET: u8 = 7;
1024 ((self.bits >> OFFSET) & MASK as u32) != 0
1025 };
1026 ABRQ0R { bits }
1027 }
1028 #[doc = "Bit 3 - TERR0"]
1029 #[inline]
1030 pub fn terr0(&self) -> TERR0R {
1031 let bits = {
1032 const MASK: bool = true;
1033 const OFFSET: u8 = 3;
1034 ((self.bits >> OFFSET) & MASK as u32) != 0
1035 };
1036 TERR0R { bits }
1037 }
1038 #[doc = "Bit 2 - ALST0"]
1039 #[inline]
1040 pub fn alst0(&self) -> ALST0R {
1041 let bits = {
1042 const MASK: bool = true;
1043 const OFFSET: u8 = 2;
1044 ((self.bits >> OFFSET) & MASK as u32) != 0
1045 };
1046 ALST0R { bits }
1047 }
1048 #[doc = "Bit 1 - TXOK0"]
1049 #[inline]
1050 pub fn txok0(&self) -> TXOK0R {
1051 let bits = {
1052 const MASK: bool = true;
1053 const OFFSET: u8 = 1;
1054 ((self.bits >> OFFSET) & MASK as u32) != 0
1055 };
1056 TXOK0R { bits }
1057 }
1058 #[doc = "Bit 0 - RQCP0"]
1059 #[inline]
1060 pub fn rqcp0(&self) -> RQCP0R {
1061 let bits = {
1062 const MASK: bool = true;
1063 const OFFSET: u8 = 0;
1064 ((self.bits >> OFFSET) & MASK as u32) != 0
1065 };
1066 RQCP0R { bits }
1067 }
1068}
1069impl W {
1070 #[doc = r" Reset value of the register"]
1071 #[inline]
1072 pub fn reset_value() -> W {
1073 W { bits: 469762048 }
1074 }
1075 #[doc = r" Writes raw bits to the register"]
1076 #[inline]
1077 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1078 self.bits = bits;
1079 self
1080 }
1081 #[doc = "Bit 23 - ABRQ2"]
1082 #[inline]
1083 pub fn abrq2(&mut self) -> _ABRQ2W {
1084 _ABRQ2W { w: self }
1085 }
1086 #[doc = "Bit 19 - TERR2"]
1087 #[inline]
1088 pub fn terr2(&mut self) -> _TERR2W {
1089 _TERR2W { w: self }
1090 }
1091 #[doc = "Bit 18 - ALST2"]
1092 #[inline]
1093 pub fn alst2(&mut self) -> _ALST2W {
1094 _ALST2W { w: self }
1095 }
1096 #[doc = "Bit 17 - TXOK2"]
1097 #[inline]
1098 pub fn txok2(&mut self) -> _TXOK2W {
1099 _TXOK2W { w: self }
1100 }
1101 #[doc = "Bit 16 - RQCP2"]
1102 #[inline]
1103 pub fn rqcp2(&mut self) -> _RQCP2W {
1104 _RQCP2W { w: self }
1105 }
1106 #[doc = "Bit 15 - ABRQ1"]
1107 #[inline]
1108 pub fn abrq1(&mut self) -> _ABRQ1W {
1109 _ABRQ1W { w: self }
1110 }
1111 #[doc = "Bit 11 - TERR1"]
1112 #[inline]
1113 pub fn terr1(&mut self) -> _TERR1W {
1114 _TERR1W { w: self }
1115 }
1116 #[doc = "Bit 10 - ALST1"]
1117 #[inline]
1118 pub fn alst1(&mut self) -> _ALST1W {
1119 _ALST1W { w: self }
1120 }
1121 #[doc = "Bit 9 - TXOK1"]
1122 #[inline]
1123 pub fn txok1(&mut self) -> _TXOK1W {
1124 _TXOK1W { w: self }
1125 }
1126 #[doc = "Bit 8 - RQCP1"]
1127 #[inline]
1128 pub fn rqcp1(&mut self) -> _RQCP1W {
1129 _RQCP1W { w: self }
1130 }
1131 #[doc = "Bit 7 - ABRQ0"]
1132 #[inline]
1133 pub fn abrq0(&mut self) -> _ABRQ0W {
1134 _ABRQ0W { w: self }
1135 }
1136 #[doc = "Bit 3 - TERR0"]
1137 #[inline]
1138 pub fn terr0(&mut self) -> _TERR0W {
1139 _TERR0W { w: self }
1140 }
1141 #[doc = "Bit 2 - ALST0"]
1142 #[inline]
1143 pub fn alst0(&mut self) -> _ALST0W {
1144 _ALST0W { w: self }
1145 }
1146 #[doc = "Bit 1 - TXOK0"]
1147 #[inline]
1148 pub fn txok0(&mut self) -> _TXOK0W {
1149 _TXOK0W { w: self }
1150 }
1151 #[doc = "Bit 0 - RQCP0"]
1152 #[inline]
1153 pub fn rqcp0(&mut self) -> _RQCP0W {
1154 _RQCP0W { w: self }
1155 }
1156}