1#[doc = "Writer for register CMD"]
2pub type W = crate::W<u32, super::CMD>;
3#[doc = "Register CMD `reset()`'s with value 0"]
4impl crate::ResetValue for super::CMD {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type { 0 }
8}
9#[doc = "Write proxy for field `RXEN`"]
10pub struct RXEN_W<'a> {
11 w: &'a mut W,
12}
13impl<'a> RXEN_W<'a> {
14 #[doc = r"Sets the field bit"]
15 #[inline(always)]
16 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
17 #[doc = r"Clears the field bit"]
18 #[inline(always)]
19 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub fn bit(self, value: bool) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
24 self.w
25 }
26}
27#[doc = "Write proxy for field `RXDIS`"]
28pub struct RXDIS_W<'a> {
29 w: &'a mut W,
30}
31impl<'a> RXDIS_W<'a> {
32 #[doc = r"Sets the field bit"]
33 #[inline(always)]
34 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
35 #[doc = r"Clears the field bit"]
36 #[inline(always)]
37 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
38 #[doc = r"Writes raw bits to the field"]
39 #[inline(always)]
40 pub fn bit(self, value: bool) -> &'a mut W {
41 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
42 self.w
43 }
44}
45#[doc = "Write proxy for field `TXEN`"]
46pub struct TXEN_W<'a> {
47 w: &'a mut W,
48}
49impl<'a> TXEN_W<'a> {
50 #[doc = r"Sets the field bit"]
51 #[inline(always)]
52 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
53 #[doc = r"Clears the field bit"]
54 #[inline(always)]
55 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
56 #[doc = r"Writes raw bits to the field"]
57 #[inline(always)]
58 pub fn bit(self, value: bool) -> &'a mut W {
59 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
60 self.w
61 }
62}
63#[doc = "Write proxy for field `TXDIS`"]
64pub struct TXDIS_W<'a> {
65 w: &'a mut W,
66}
67impl<'a> TXDIS_W<'a> {
68 #[doc = r"Sets the field bit"]
69 #[inline(always)]
70 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
71 #[doc = r"Clears the field bit"]
72 #[inline(always)]
73 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
74 #[doc = r"Writes raw bits to the field"]
75 #[inline(always)]
76 pub fn bit(self, value: bool) -> &'a mut W {
77 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
78 self.w
79 }
80}
81#[doc = "Write proxy for field `MASTEREN`"]
82pub struct MASTEREN_W<'a> {
83 w: &'a mut W,
84}
85impl<'a> MASTEREN_W<'a> {
86 #[doc = r"Sets the field bit"]
87 #[inline(always)]
88 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
89 #[doc = r"Clears the field bit"]
90 #[inline(always)]
91 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
96 self.w
97 }
98}
99#[doc = "Write proxy for field `MASTERDIS`"]
100pub struct MASTERDIS_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> MASTERDIS_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
107 #[doc = r"Clears the field bit"]
108 #[inline(always)]
109 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
110 #[doc = r"Writes raw bits to the field"]
111 #[inline(always)]
112 pub fn bit(self, value: bool) -> &'a mut W {
113 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
114 self.w
115 }
116}
117#[doc = "Write proxy for field `RXBLOCKEN`"]
118pub struct RXBLOCKEN_W<'a> {
119 w: &'a mut W,
120}
121impl<'a> RXBLOCKEN_W<'a> {
122 #[doc = r"Sets the field bit"]
123 #[inline(always)]
124 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
125 #[doc = r"Clears the field bit"]
126 #[inline(always)]
127 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
128 #[doc = r"Writes raw bits to the field"]
129 #[inline(always)]
130 pub fn bit(self, value: bool) -> &'a mut W {
131 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
132 self.w
133 }
134}
135#[doc = "Write proxy for field `RXBLOCKDIS`"]
136pub struct RXBLOCKDIS_W<'a> {
137 w: &'a mut W,
138}
139impl<'a> RXBLOCKDIS_W<'a> {
140 #[doc = r"Sets the field bit"]
141 #[inline(always)]
142 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
143 #[doc = r"Clears the field bit"]
144 #[inline(always)]
145 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
146 #[doc = r"Writes raw bits to the field"]
147 #[inline(always)]
148 pub fn bit(self, value: bool) -> &'a mut W {
149 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
150 self.w
151 }
152}
153#[doc = "Write proxy for field `TXTRIEN`"]
154pub struct TXTRIEN_W<'a> {
155 w: &'a mut W,
156}
157impl<'a> TXTRIEN_W<'a> {
158 #[doc = r"Sets the field bit"]
159 #[inline(always)]
160 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
161 #[doc = r"Clears the field bit"]
162 #[inline(always)]
163 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
164 #[doc = r"Writes raw bits to the field"]
165 #[inline(always)]
166 pub fn bit(self, value: bool) -> &'a mut W {
167 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
168 self.w
169 }
170}
171#[doc = "Write proxy for field `TXTRIDIS`"]
172pub struct TXTRIDIS_W<'a> {
173 w: &'a mut W,
174}
175impl<'a> TXTRIDIS_W<'a> {
176 #[doc = r"Sets the field bit"]
177 #[inline(always)]
178 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
179 #[doc = r"Clears the field bit"]
180 #[inline(always)]
181 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
182 #[doc = r"Writes raw bits to the field"]
183 #[inline(always)]
184 pub fn bit(self, value: bool) -> &'a mut W {
185 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
186 self.w
187 }
188}
189#[doc = "Write proxy for field `CLEARTX`"]
190pub struct CLEARTX_W<'a> {
191 w: &'a mut W,
192}
193impl<'a> CLEARTX_W<'a> {
194 #[doc = r"Sets the field bit"]
195 #[inline(always)]
196 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
197 #[doc = r"Clears the field bit"]
198 #[inline(always)]
199 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
200 #[doc = r"Writes raw bits to the field"]
201 #[inline(always)]
202 pub fn bit(self, value: bool) -> &'a mut W {
203 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
204 self.w
205 }
206}
207#[doc = "Write proxy for field `CLEARRX`"]
208pub struct CLEARRX_W<'a> {
209 w: &'a mut W,
210}
211impl<'a> CLEARRX_W<'a> {
212 #[doc = r"Sets the field bit"]
213 #[inline(always)]
214 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
215 #[doc = r"Clears the field bit"]
216 #[inline(always)]
217 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
218 #[doc = r"Writes raw bits to the field"]
219 #[inline(always)]
220 pub fn bit(self, value: bool) -> &'a mut W {
221 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
222 self.w
223 }
224}
225impl W {
226 #[doc = "Bit 0 - Receiver Enable"]
227 #[inline(always)]
228 pub fn rxen(&mut self) -> RXEN_W { RXEN_W { w: self } }
229 #[doc = "Bit 1 - Receiver Disable"]
230 #[inline(always)]
231 pub fn rxdis(&mut self) -> RXDIS_W { RXDIS_W { w: self } }
232 #[doc = "Bit 2 - Transmitter Enable"]
233 #[inline(always)]
234 pub fn txen(&mut self) -> TXEN_W { TXEN_W { w: self } }
235 #[doc = "Bit 3 - Transmitter Disable"]
236 #[inline(always)]
237 pub fn txdis(&mut self) -> TXDIS_W { TXDIS_W { w: self } }
238 #[doc = "Bit 4 - Master Enable"]
239 #[inline(always)]
240 pub fn masteren(&mut self) -> MASTEREN_W { MASTEREN_W { w: self } }
241 #[doc = "Bit 5 - Master Disable"]
242 #[inline(always)]
243 pub fn masterdis(&mut self) -> MASTERDIS_W { MASTERDIS_W { w: self } }
244 #[doc = "Bit 6 - Receiver Block Enable"]
245 #[inline(always)]
246 pub fn rxblocken(&mut self) -> RXBLOCKEN_W { RXBLOCKEN_W { w: self } }
247 #[doc = "Bit 7 - Receiver Block Disable"]
248 #[inline(always)]
249 pub fn rxblockdis(&mut self) -> RXBLOCKDIS_W { RXBLOCKDIS_W { w: self } }
250 #[doc = "Bit 8 - Transmitter Tristate Enable"]
251 #[inline(always)]
252 pub fn txtrien(&mut self) -> TXTRIEN_W { TXTRIEN_W { w: self } }
253 #[doc = "Bit 9 - Transmitter Tristate Disable"]
254 #[inline(always)]
255 pub fn txtridis(&mut self) -> TXTRIDIS_W { TXTRIDIS_W { w: self } }
256 #[doc = "Bit 10 - Clear TX"]
257 #[inline(always)]
258 pub fn cleartx(&mut self) -> CLEARTX_W { CLEARTX_W { w: self } }
259 #[doc = "Bit 11 - Clear RX"]
260 #[inline(always)]
261 pub fn clearrx(&mut self) -> CLEARRX_W { CLEARRX_W { w: self } }
262}