1#[doc = "Reader of register WORD16"]
2pub type R = crate::R<u32, super::WORD16>;
3#[doc = "Writer for register WORD16"]
4pub type W = crate::W<u32, super::WORD16>;
5#[doc = "Register WORD16 `reset()`'s with value 0"]
6impl crate::ResetValue for super::WORD16 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `DATA_BYTE_7`"]
14pub type DATA_BYTE_7_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `DATA_BYTE_7`"]
16pub struct DATA_BYTE_7_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> DATA_BYTE_7_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
24 self.w
25 }
26}
27#[doc = "Reader of field `DATA_BYTE_6`"]
28pub type DATA_BYTE_6_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `DATA_BYTE_6`"]
30pub struct DATA_BYTE_6_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> DATA_BYTE_6_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
38 self.w
39 }
40}
41#[doc = "Reader of field `DATA_BYTE_5`"]
42pub type DATA_BYTE_5_R = crate::R<u8, u8>;
43#[doc = "Write proxy for field `DATA_BYTE_5`"]
44pub struct DATA_BYTE_5_W<'a> {
45 w: &'a mut W,
46}
47impl<'a> DATA_BYTE_5_W<'a> {
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub unsafe fn bits(self, value: u8) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16);
52 self.w
53 }
54}
55#[doc = "Reader of field `DATA_BYTE_4`"]
56pub type DATA_BYTE_4_R = crate::R<u8, u8>;
57#[doc = "Write proxy for field `DATA_BYTE_4`"]
58pub struct DATA_BYTE_4_W<'a> {
59 w: &'a mut W,
60}
61impl<'a> DATA_BYTE_4_W<'a> {
62 #[doc = r"Writes raw bits to the field"]
63 #[inline(always)]
64 pub unsafe fn bits(self, value: u8) -> &'a mut W {
65 self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24);
66 self.w
67 }
68}
69impl R {
70 #[doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame."]
71 #[inline(always)]
72 pub fn data_byte_7(&self) -> DATA_BYTE_7_R {
73 DATA_BYTE_7_R::new((self.bits & 0xff) as u8)
74 }
75 #[doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame."]
76 #[inline(always)]
77 pub fn data_byte_6(&self) -> DATA_BYTE_6_R {
78 DATA_BYTE_6_R::new(((self.bits >> 8) & 0xff) as u8)
79 }
80 #[doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame."]
81 #[inline(always)]
82 pub fn data_byte_5(&self) -> DATA_BYTE_5_R {
83 DATA_BYTE_5_R::new(((self.bits >> 16) & 0xff) as u8)
84 }
85 #[doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame."]
86 #[inline(always)]
87 pub fn data_byte_4(&self) -> DATA_BYTE_4_R {
88 DATA_BYTE_4_R::new(((self.bits >> 24) & 0xff) as u8)
89 }
90}
91impl W {
92 #[doc = "Bits 0:7 - Data byte 7 of Rx/Tx frame."]
93 #[inline(always)]
94 pub fn data_byte_7(&mut self) -> DATA_BYTE_7_W {
95 DATA_BYTE_7_W { w: self }
96 }
97 #[doc = "Bits 8:15 - Data byte 6 of Rx/Tx frame."]
98 #[inline(always)]
99 pub fn data_byte_6(&mut self) -> DATA_BYTE_6_W {
100 DATA_BYTE_6_W { w: self }
101 }
102 #[doc = "Bits 16:23 - Data byte 5 of Rx/Tx frame."]
103 #[inline(always)]
104 pub fn data_byte_5(&mut self) -> DATA_BYTE_5_W {
105 DATA_BYTE_5_W { w: self }
106 }
107 #[doc = "Bits 24:31 - Data byte 4 of Rx/Tx frame."]
108 #[inline(always)]
109 pub fn data_byte_4(&mut self) -> DATA_BYTE_4_W {
110 DATA_BYTE_4_W { w: self }
111 }
112}