1#[doc = "Reader of register CFG"]
2pub type R = crate::R<u32, super::CFG>;
3#[doc = "Writer for register CFG"]
4pub type W = crate::W<u32, super::CFG>;
5#[doc = "Register CFG `reset()`'s with value 0"]
6impl crate::ResetValue for super::CFG {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Preamble Length for Transmit Frames\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum PRELEN_A {
17 #[doc = "0: 7 bytes of preamble"]
18 _7 = 0,
19 #[doc = "1: 5 bytes of preamble"]
20 _5 = 1,
21 #[doc = "2: 3 bytes of preamble"]
22 _3 = 2,
23}
24impl From<PRELEN_A> for u8 {
25 #[inline(always)]
26 fn from(variant: PRELEN_A) -> Self {
27 variant as _
28 }
29}
30#[doc = "Reader of field `PRELEN`"]
31pub type PRELEN_R = crate::R<u8, PRELEN_A>;
32impl PRELEN_R {
33 #[doc = r"Get enumerated values variant"]
34 #[inline(always)]
35 pub fn variant(&self) -> crate::Variant<u8, PRELEN_A> {
36 use crate::Variant::*;
37 match self.bits {
38 0 => Val(PRELEN_A::_7),
39 1 => Val(PRELEN_A::_5),
40 2 => Val(PRELEN_A::_3),
41 i => Res(i),
42 }
43 }
44 #[doc = "Checks if the value of the field is `_7`"]
45 #[inline(always)]
46 pub fn is_7(&self) -> bool {
47 *self == PRELEN_A::_7
48 }
49 #[doc = "Checks if the value of the field is `_5`"]
50 #[inline(always)]
51 pub fn is_5(&self) -> bool {
52 *self == PRELEN_A::_5
53 }
54 #[doc = "Checks if the value of the field is `_3`"]
55 #[inline(always)]
56 pub fn is_3(&self) -> bool {
57 *self == PRELEN_A::_3
58 }
59}
60#[doc = "Write proxy for field `PRELEN`"]
61pub struct PRELEN_W<'a> {
62 w: &'a mut W,
63}
64impl<'a> PRELEN_W<'a> {
65 #[doc = r"Writes `variant` to the field"]
66 #[inline(always)]
67 pub fn variant(self, variant: PRELEN_A) -> &'a mut W {
68 unsafe { self.bits(variant.into()) }
69 }
70 #[doc = "7 bytes of preamble"]
71 #[inline(always)]
72 pub fn _7(self) -> &'a mut W {
73 self.variant(PRELEN_A::_7)
74 }
75 #[doc = "5 bytes of preamble"]
76 #[inline(always)]
77 pub fn _5(self) -> &'a mut W {
78 self.variant(PRELEN_A::_5)
79 }
80 #[doc = "3 bytes of preamble"]
81 #[inline(always)]
82 pub fn _3(self) -> &'a mut W {
83 self.variant(PRELEN_A::_3)
84 }
85 #[doc = r"Writes raw bits to the field"]
86 #[inline(always)]
87 pub unsafe fn bits(self, value: u8) -> &'a mut W {
88 self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03);
89 self.w
90 }
91}
92#[doc = "Reader of field `RE`"]
93pub type RE_R = crate::R<bool, bool>;
94#[doc = "Write proxy for field `RE`"]
95pub struct RE_W<'a> {
96 w: &'a mut W,
97}
98impl<'a> RE_W<'a> {
99 #[doc = r"Sets the field bit"]
100 #[inline(always)]
101 pub fn set_bit(self) -> &'a mut W {
102 self.bit(true)
103 }
104 #[doc = r"Clears the field bit"]
105 #[inline(always)]
106 pub fn clear_bit(self) -> &'a mut W {
107 self.bit(false)
108 }
109 #[doc = r"Writes raw bits to the field"]
110 #[inline(always)]
111 pub fn bit(self, value: bool) -> &'a mut W {
112 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
113 self.w
114 }
115}
116#[doc = "Reader of field `TE`"]
117pub type TE_R = crate::R<bool, bool>;
118#[doc = "Write proxy for field `TE`"]
119pub struct TE_W<'a> {
120 w: &'a mut W,
121}
122impl<'a> TE_W<'a> {
123 #[doc = r"Sets the field bit"]
124 #[inline(always)]
125 pub fn set_bit(self) -> &'a mut W {
126 self.bit(true)
127 }
128 #[doc = r"Clears the field bit"]
129 #[inline(always)]
130 pub fn clear_bit(self) -> &'a mut W {
131 self.bit(false)
132 }
133 #[doc = r"Writes raw bits to the field"]
134 #[inline(always)]
135 pub fn bit(self, value: bool) -> &'a mut W {
136 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
137 self.w
138 }
139}
140#[doc = "Reader of field `DC`"]
141pub type DC_R = crate::R<bool, bool>;
142#[doc = "Write proxy for field `DC`"]
143pub struct DC_W<'a> {
144 w: &'a mut W,
145}
146impl<'a> DC_W<'a> {
147 #[doc = r"Sets the field bit"]
148 #[inline(always)]
149 pub fn set_bit(self) -> &'a mut W {
150 self.bit(true)
151 }
152 #[doc = r"Clears the field bit"]
153 #[inline(always)]
154 pub fn clear_bit(self) -> &'a mut W {
155 self.bit(false)
156 }
157 #[doc = r"Writes raw bits to the field"]
158 #[inline(always)]
159 pub fn bit(self, value: bool) -> &'a mut W {
160 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
161 self.w
162 }
163}
164#[doc = "Back-Off Limit\n\nValue on reset: 0"]
165#[derive(Clone, Copy, Debug, PartialEq)]
166#[repr(u8)]
167pub enum BL_A {
168 #[doc = "0: k = min (n,10)"]
169 _1024 = 0,
170 #[doc = "1: k = min (n,8)"]
171 _256 = 1,
172 #[doc = "2: k = min (n,4)"]
173 _8 = 2,
174 #[doc = "3: k = min (n,1)"]
175 _2 = 3,
176}
177impl From<BL_A> for u8 {
178 #[inline(always)]
179 fn from(variant: BL_A) -> Self {
180 variant as _
181 }
182}
183#[doc = "Reader of field `BL`"]
184pub type BL_R = crate::R<u8, BL_A>;
185impl BL_R {
186 #[doc = r"Get enumerated values variant"]
187 #[inline(always)]
188 pub fn variant(&self) -> BL_A {
189 match self.bits {
190 0 => BL_A::_1024,
191 1 => BL_A::_256,
192 2 => BL_A::_8,
193 3 => BL_A::_2,
194 _ => unreachable!(),
195 }
196 }
197 #[doc = "Checks if the value of the field is `_1024`"]
198 #[inline(always)]
199 pub fn is_1024(&self) -> bool {
200 *self == BL_A::_1024
201 }
202 #[doc = "Checks if the value of the field is `_256`"]
203 #[inline(always)]
204 pub fn is_256(&self) -> bool {
205 *self == BL_A::_256
206 }
207 #[doc = "Checks if the value of the field is `_8`"]
208 #[inline(always)]
209 pub fn is_8(&self) -> bool {
210 *self == BL_A::_8
211 }
212 #[doc = "Checks if the value of the field is `_2`"]
213 #[inline(always)]
214 pub fn is_2(&self) -> bool {
215 *self == BL_A::_2
216 }
217}
218#[doc = "Write proxy for field `BL`"]
219pub struct BL_W<'a> {
220 w: &'a mut W,
221}
222impl<'a> BL_W<'a> {
223 #[doc = r"Writes `variant` to the field"]
224 #[inline(always)]
225 pub fn variant(self, variant: BL_A) -> &'a mut W {
226 {
227 self.bits(variant.into())
228 }
229 }
230 #[doc = "k = min (n,10)"]
231 #[inline(always)]
232 pub fn _1024(self) -> &'a mut W {
233 self.variant(BL_A::_1024)
234 }
235 #[doc = "k = min (n,8)"]
236 #[inline(always)]
237 pub fn _256(self) -> &'a mut W {
238 self.variant(BL_A::_256)
239 }
240 #[doc = "k = min (n,4)"]
241 #[inline(always)]
242 pub fn _8(self) -> &'a mut W {
243 self.variant(BL_A::_8)
244 }
245 #[doc = "k = min (n,1)"]
246 #[inline(always)]
247 pub fn _2(self) -> &'a mut W {
248 self.variant(BL_A::_2)
249 }
250 #[doc = r"Writes raw bits to the field"]
251 #[inline(always)]
252 pub fn bits(self, value: u8) -> &'a mut W {
253 self.w.bits = (self.w.bits & !(0x03 << 5)) | (((value as u32) & 0x03) << 5);
254 self.w
255 }
256}
257#[doc = "Reader of field `ACS`"]
258pub type ACS_R = crate::R<bool, bool>;
259#[doc = "Write proxy for field `ACS`"]
260pub struct ACS_W<'a> {
261 w: &'a mut W,
262}
263impl<'a> ACS_W<'a> {
264 #[doc = r"Sets the field bit"]
265 #[inline(always)]
266 pub fn set_bit(self) -> &'a mut W {
267 self.bit(true)
268 }
269 #[doc = r"Clears the field bit"]
270 #[inline(always)]
271 pub fn clear_bit(self) -> &'a mut W {
272 self.bit(false)
273 }
274 #[doc = r"Writes raw bits to the field"]
275 #[inline(always)]
276 pub fn bit(self, value: bool) -> &'a mut W {
277 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
278 self.w
279 }
280}
281#[doc = "Reader of field `DR`"]
282pub type DR_R = crate::R<bool, bool>;
283#[doc = "Write proxy for field `DR`"]
284pub struct DR_W<'a> {
285 w: &'a mut W,
286}
287impl<'a> DR_W<'a> {
288 #[doc = r"Sets the field bit"]
289 #[inline(always)]
290 pub fn set_bit(self) -> &'a mut W {
291 self.bit(true)
292 }
293 #[doc = r"Clears the field bit"]
294 #[inline(always)]
295 pub fn clear_bit(self) -> &'a mut W {
296 self.bit(false)
297 }
298 #[doc = r"Writes raw bits to the field"]
299 #[inline(always)]
300 pub fn bit(self, value: bool) -> &'a mut W {
301 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
302 self.w
303 }
304}
305#[doc = "Reader of field `IPC`"]
306pub type IPC_R = crate::R<bool, bool>;
307#[doc = "Write proxy for field `IPC`"]
308pub struct IPC_W<'a> {
309 w: &'a mut W,
310}
311impl<'a> IPC_W<'a> {
312 #[doc = r"Sets the field bit"]
313 #[inline(always)]
314 pub fn set_bit(self) -> &'a mut W {
315 self.bit(true)
316 }
317 #[doc = r"Clears the field bit"]
318 #[inline(always)]
319 pub fn clear_bit(self) -> &'a mut W {
320 self.bit(false)
321 }
322 #[doc = r"Writes raw bits to the field"]
323 #[inline(always)]
324 pub fn bit(self, value: bool) -> &'a mut W {
325 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
326 self.w
327 }
328}
329#[doc = "Reader of field `DUPM`"]
330pub type DUPM_R = crate::R<bool, bool>;
331#[doc = "Write proxy for field `DUPM`"]
332pub struct DUPM_W<'a> {
333 w: &'a mut W,
334}
335impl<'a> DUPM_W<'a> {
336 #[doc = r"Sets the field bit"]
337 #[inline(always)]
338 pub fn set_bit(self) -> &'a mut W {
339 self.bit(true)
340 }
341 #[doc = r"Clears the field bit"]
342 #[inline(always)]
343 pub fn clear_bit(self) -> &'a mut W {
344 self.bit(false)
345 }
346 #[doc = r"Writes raw bits to the field"]
347 #[inline(always)]
348 pub fn bit(self, value: bool) -> &'a mut W {
349 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
350 self.w
351 }
352}
353#[doc = "Reader of field `LOOPBM`"]
354pub type LOOPBM_R = crate::R<bool, bool>;
355#[doc = "Write proxy for field `LOOPBM`"]
356pub struct LOOPBM_W<'a> {
357 w: &'a mut W,
358}
359impl<'a> LOOPBM_W<'a> {
360 #[doc = r"Sets the field bit"]
361 #[inline(always)]
362 pub fn set_bit(self) -> &'a mut W {
363 self.bit(true)
364 }
365 #[doc = r"Clears the field bit"]
366 #[inline(always)]
367 pub fn clear_bit(self) -> &'a mut W {
368 self.bit(false)
369 }
370 #[doc = r"Writes raw bits to the field"]
371 #[inline(always)]
372 pub fn bit(self, value: bool) -> &'a mut W {
373 self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
374 self.w
375 }
376}
377#[doc = "Reader of field `DRO`"]
378pub type DRO_R = crate::R<bool, bool>;
379#[doc = "Write proxy for field `DRO`"]
380pub struct DRO_W<'a> {
381 w: &'a mut W,
382}
383impl<'a> DRO_W<'a> {
384 #[doc = r"Sets the field bit"]
385 #[inline(always)]
386 pub fn set_bit(self) -> &'a mut W {
387 self.bit(true)
388 }
389 #[doc = r"Clears the field bit"]
390 #[inline(always)]
391 pub fn clear_bit(self) -> &'a mut W {
392 self.bit(false)
393 }
394 #[doc = r"Writes raw bits to the field"]
395 #[inline(always)]
396 pub fn bit(self, value: bool) -> &'a mut W {
397 self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
398 self.w
399 }
400}
401#[doc = "Reader of field `FES`"]
402pub type FES_R = crate::R<bool, bool>;
403#[doc = "Write proxy for field `FES`"]
404pub struct FES_W<'a> {
405 w: &'a mut W,
406}
407impl<'a> FES_W<'a> {
408 #[doc = r"Sets the field bit"]
409 #[inline(always)]
410 pub fn set_bit(self) -> &'a mut W {
411 self.bit(true)
412 }
413 #[doc = r"Clears the field bit"]
414 #[inline(always)]
415 pub fn clear_bit(self) -> &'a mut W {
416 self.bit(false)
417 }
418 #[doc = r"Writes raw bits to the field"]
419 #[inline(always)]
420 pub fn bit(self, value: bool) -> &'a mut W {
421 self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
422 self.w
423 }
424}
425#[doc = "Reader of field `PS`"]
426pub type PS_R = crate::R<bool, bool>;
427#[doc = "Write proxy for field `PS`"]
428pub struct PS_W<'a> {
429 w: &'a mut W,
430}
431impl<'a> PS_W<'a> {
432 #[doc = r"Sets the field bit"]
433 #[inline(always)]
434 pub fn set_bit(self) -> &'a mut W {
435 self.bit(true)
436 }
437 #[doc = r"Clears the field bit"]
438 #[inline(always)]
439 pub fn clear_bit(self) -> &'a mut W {
440 self.bit(false)
441 }
442 #[doc = r"Writes raw bits to the field"]
443 #[inline(always)]
444 pub fn bit(self, value: bool) -> &'a mut W {
445 self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
446 self.w
447 }
448}
449#[doc = "Reader of field `DISCRS`"]
450pub type DISCRS_R = crate::R<bool, bool>;
451#[doc = "Write proxy for field `DISCRS`"]
452pub struct DISCRS_W<'a> {
453 w: &'a mut W,
454}
455impl<'a> DISCRS_W<'a> {
456 #[doc = r"Sets the field bit"]
457 #[inline(always)]
458 pub fn set_bit(self) -> &'a mut W {
459 self.bit(true)
460 }
461 #[doc = r"Clears the field bit"]
462 #[inline(always)]
463 pub fn clear_bit(self) -> &'a mut W {
464 self.bit(false)
465 }
466 #[doc = r"Writes raw bits to the field"]
467 #[inline(always)]
468 pub fn bit(self, value: bool) -> &'a mut W {
469 self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
470 self.w
471 }
472}
473#[doc = "Inter-Frame Gap (IFG)\n\nValue on reset: 0"]
474#[derive(Clone, Copy, Debug, PartialEq)]
475#[repr(u8)]
476pub enum IFG_A {
477 #[doc = "0: 96 bit times"]
478 _96 = 0,
479 #[doc = "1: 88 bit times"]
480 _88 = 1,
481 #[doc = "2: 80 bit times"]
482 _80 = 2,
483 #[doc = "3: 72 bit times"]
484 _72 = 3,
485 #[doc = "4: 64 bit times"]
486 _64 = 4,
487 #[doc = "5: 56 bit times"]
488 _56 = 5,
489 #[doc = "6: 48 bit times"]
490 _48 = 6,
491 #[doc = "7: 40 bit times"]
492 _40 = 7,
493}
494impl From<IFG_A> for u8 {
495 #[inline(always)]
496 fn from(variant: IFG_A) -> Self {
497 variant as _
498 }
499}
500#[doc = "Reader of field `IFG`"]
501pub type IFG_R = crate::R<u8, IFG_A>;
502impl IFG_R {
503 #[doc = r"Get enumerated values variant"]
504 #[inline(always)]
505 pub fn variant(&self) -> IFG_A {
506 match self.bits {
507 0 => IFG_A::_96,
508 1 => IFG_A::_88,
509 2 => IFG_A::_80,
510 3 => IFG_A::_72,
511 4 => IFG_A::_64,
512 5 => IFG_A::_56,
513 6 => IFG_A::_48,
514 7 => IFG_A::_40,
515 _ => unreachable!(),
516 }
517 }
518 #[doc = "Checks if the value of the field is `_96`"]
519 #[inline(always)]
520 pub fn is_96(&self) -> bool {
521 *self == IFG_A::_96
522 }
523 #[doc = "Checks if the value of the field is `_88`"]
524 #[inline(always)]
525 pub fn is_88(&self) -> bool {
526 *self == IFG_A::_88
527 }
528 #[doc = "Checks if the value of the field is `_80`"]
529 #[inline(always)]
530 pub fn is_80(&self) -> bool {
531 *self == IFG_A::_80
532 }
533 #[doc = "Checks if the value of the field is `_72`"]
534 #[inline(always)]
535 pub fn is_72(&self) -> bool {
536 *self == IFG_A::_72
537 }
538 #[doc = "Checks if the value of the field is `_64`"]
539 #[inline(always)]
540 pub fn is_64(&self) -> bool {
541 *self == IFG_A::_64
542 }
543 #[doc = "Checks if the value of the field is `_56`"]
544 #[inline(always)]
545 pub fn is_56(&self) -> bool {
546 *self == IFG_A::_56
547 }
548 #[doc = "Checks if the value of the field is `_48`"]
549 #[inline(always)]
550 pub fn is_48(&self) -> bool {
551 *self == IFG_A::_48
552 }
553 #[doc = "Checks if the value of the field is `_40`"]
554 #[inline(always)]
555 pub fn is_40(&self) -> bool {
556 *self == IFG_A::_40
557 }
558}
559#[doc = "Write proxy for field `IFG`"]
560pub struct IFG_W<'a> {
561 w: &'a mut W,
562}
563impl<'a> IFG_W<'a> {
564 #[doc = r"Writes `variant` to the field"]
565 #[inline(always)]
566 pub fn variant(self, variant: IFG_A) -> &'a mut W {
567 {
568 self.bits(variant.into())
569 }
570 }
571 #[doc = "96 bit times"]
572 #[inline(always)]
573 pub fn _96(self) -> &'a mut W {
574 self.variant(IFG_A::_96)
575 }
576 #[doc = "88 bit times"]
577 #[inline(always)]
578 pub fn _88(self) -> &'a mut W {
579 self.variant(IFG_A::_88)
580 }
581 #[doc = "80 bit times"]
582 #[inline(always)]
583 pub fn _80(self) -> &'a mut W {
584 self.variant(IFG_A::_80)
585 }
586 #[doc = "72 bit times"]
587 #[inline(always)]
588 pub fn _72(self) -> &'a mut W {
589 self.variant(IFG_A::_72)
590 }
591 #[doc = "64 bit times"]
592 #[inline(always)]
593 pub fn _64(self) -> &'a mut W {
594 self.variant(IFG_A::_64)
595 }
596 #[doc = "56 bit times"]
597 #[inline(always)]
598 pub fn _56(self) -> &'a mut W {
599 self.variant(IFG_A::_56)
600 }
601 #[doc = "48 bit times"]
602 #[inline(always)]
603 pub fn _48(self) -> &'a mut W {
604 self.variant(IFG_A::_48)
605 }
606 #[doc = "40 bit times"]
607 #[inline(always)]
608 pub fn _40(self) -> &'a mut W {
609 self.variant(IFG_A::_40)
610 }
611 #[doc = r"Writes raw bits to the field"]
612 #[inline(always)]
613 pub fn bits(self, value: u8) -> &'a mut W {
614 self.w.bits = (self.w.bits & !(0x07 << 17)) | (((value as u32) & 0x07) << 17);
615 self.w
616 }
617}
618#[doc = "Reader of field `JFEN`"]
619pub type JFEN_R = crate::R<bool, bool>;
620#[doc = "Write proxy for field `JFEN`"]
621pub struct JFEN_W<'a> {
622 w: &'a mut W,
623}
624impl<'a> JFEN_W<'a> {
625 #[doc = r"Sets the field bit"]
626 #[inline(always)]
627 pub fn set_bit(self) -> &'a mut W {
628 self.bit(true)
629 }
630 #[doc = r"Clears the field bit"]
631 #[inline(always)]
632 pub fn clear_bit(self) -> &'a mut W {
633 self.bit(false)
634 }
635 #[doc = r"Writes raw bits to the field"]
636 #[inline(always)]
637 pub fn bit(self, value: bool) -> &'a mut W {
638 self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
639 self.w
640 }
641}
642#[doc = "Reader of field `JD`"]
643pub type JD_R = crate::R<bool, bool>;
644#[doc = "Write proxy for field `JD`"]
645pub struct JD_W<'a> {
646 w: &'a mut W,
647}
648impl<'a> JD_W<'a> {
649 #[doc = r"Sets the field bit"]
650 #[inline(always)]
651 pub fn set_bit(self) -> &'a mut W {
652 self.bit(true)
653 }
654 #[doc = r"Clears the field bit"]
655 #[inline(always)]
656 pub fn clear_bit(self) -> &'a mut W {
657 self.bit(false)
658 }
659 #[doc = r"Writes raw bits to the field"]
660 #[inline(always)]
661 pub fn bit(self, value: bool) -> &'a mut W {
662 self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
663 self.w
664 }
665}
666#[doc = "Reader of field `WDDIS`"]
667pub type WDDIS_R = crate::R<bool, bool>;
668#[doc = "Write proxy for field `WDDIS`"]
669pub struct WDDIS_W<'a> {
670 w: &'a mut W,
671}
672impl<'a> WDDIS_W<'a> {
673 #[doc = r"Sets the field bit"]
674 #[inline(always)]
675 pub fn set_bit(self) -> &'a mut W {
676 self.bit(true)
677 }
678 #[doc = r"Clears the field bit"]
679 #[inline(always)]
680 pub fn clear_bit(self) -> &'a mut W {
681 self.bit(false)
682 }
683 #[doc = r"Writes raw bits to the field"]
684 #[inline(always)]
685 pub fn bit(self, value: bool) -> &'a mut W {
686 self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
687 self.w
688 }
689}
690#[doc = "Reader of field `CST`"]
691pub type CST_R = crate::R<bool, bool>;
692#[doc = "Write proxy for field `CST`"]
693pub struct CST_W<'a> {
694 w: &'a mut W,
695}
696impl<'a> CST_W<'a> {
697 #[doc = r"Sets the field bit"]
698 #[inline(always)]
699 pub fn set_bit(self) -> &'a mut W {
700 self.bit(true)
701 }
702 #[doc = r"Clears the field bit"]
703 #[inline(always)]
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(always)]
709 pub fn bit(self, value: bool) -> &'a mut W {
710 self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
711 self.w
712 }
713}
714#[doc = "Reader of field `TWOKPEN`"]
715pub type TWOKPEN_R = crate::R<bool, bool>;
716#[doc = "Write proxy for field `TWOKPEN`"]
717pub struct TWOKPEN_W<'a> {
718 w: &'a mut W,
719}
720impl<'a> TWOKPEN_W<'a> {
721 #[doc = r"Sets the field bit"]
722 #[inline(always)]
723 pub fn set_bit(self) -> &'a mut W {
724 self.bit(true)
725 }
726 #[doc = r"Clears the field bit"]
727 #[inline(always)]
728 pub fn clear_bit(self) -> &'a mut W {
729 self.bit(false)
730 }
731 #[doc = r"Writes raw bits to the field"]
732 #[inline(always)]
733 pub fn bit(self, value: bool) -> &'a mut W {
734 self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
735 self.w
736 }
737}
738impl R {
739 #[doc = "Bits 0:1 - Preamble Length for Transmit Frames"]
740 #[inline(always)]
741 pub fn prelen(&self) -> PRELEN_R {
742 PRELEN_R::new((self.bits & 0x03) as u8)
743 }
744 #[doc = "Bit 2 - Receiver Enable"]
745 #[inline(always)]
746 pub fn re(&self) -> RE_R {
747 RE_R::new(((self.bits >> 2) & 0x01) != 0)
748 }
749 #[doc = "Bit 3 - Transmitter Enable"]
750 #[inline(always)]
751 pub fn te(&self) -> TE_R {
752 TE_R::new(((self.bits >> 3) & 0x01) != 0)
753 }
754 #[doc = "Bit 4 - Deferral Check"]
755 #[inline(always)]
756 pub fn dc(&self) -> DC_R {
757 DC_R::new(((self.bits >> 4) & 0x01) != 0)
758 }
759 #[doc = "Bits 5:6 - Back-Off Limit"]
760 #[inline(always)]
761 pub fn bl(&self) -> BL_R {
762 BL_R::new(((self.bits >> 5) & 0x03) as u8)
763 }
764 #[doc = "Bit 7 - Automatic Pad or CRC Stripping"]
765 #[inline(always)]
766 pub fn acs(&self) -> ACS_R {
767 ACS_R::new(((self.bits >> 7) & 0x01) != 0)
768 }
769 #[doc = "Bit 9 - Disable Retry"]
770 #[inline(always)]
771 pub fn dr(&self) -> DR_R {
772 DR_R::new(((self.bits >> 9) & 0x01) != 0)
773 }
774 #[doc = "Bit 10 - Checksum Offload"]
775 #[inline(always)]
776 pub fn ipc(&self) -> IPC_R {
777 IPC_R::new(((self.bits >> 10) & 0x01) != 0)
778 }
779 #[doc = "Bit 11 - Duplex Mode"]
780 #[inline(always)]
781 pub fn dupm(&self) -> DUPM_R {
782 DUPM_R::new(((self.bits >> 11) & 0x01) != 0)
783 }
784 #[doc = "Bit 12 - Loopback Mode"]
785 #[inline(always)]
786 pub fn loopbm(&self) -> LOOPBM_R {
787 LOOPBM_R::new(((self.bits >> 12) & 0x01) != 0)
788 }
789 #[doc = "Bit 13 - Disable Receive Own"]
790 #[inline(always)]
791 pub fn dro(&self) -> DRO_R {
792 DRO_R::new(((self.bits >> 13) & 0x01) != 0)
793 }
794 #[doc = "Bit 14 - Speed"]
795 #[inline(always)]
796 pub fn fes(&self) -> FES_R {
797 FES_R::new(((self.bits >> 14) & 0x01) != 0)
798 }
799 #[doc = "Bit 15 - Port Select"]
800 #[inline(always)]
801 pub fn ps(&self) -> PS_R {
802 PS_R::new(((self.bits >> 15) & 0x01) != 0)
803 }
804 #[doc = "Bit 16 - Disable Carrier Sense During Transmission"]
805 #[inline(always)]
806 pub fn discrs(&self) -> DISCRS_R {
807 DISCRS_R::new(((self.bits >> 16) & 0x01) != 0)
808 }
809 #[doc = "Bits 17:19 - Inter-Frame Gap (IFG)"]
810 #[inline(always)]
811 pub fn ifg(&self) -> IFG_R {
812 IFG_R::new(((self.bits >> 17) & 0x07) as u8)
813 }
814 #[doc = "Bit 20 - Jumbo Frame Enable"]
815 #[inline(always)]
816 pub fn jfen(&self) -> JFEN_R {
817 JFEN_R::new(((self.bits >> 20) & 0x01) != 0)
818 }
819 #[doc = "Bit 22 - Jabber Disable"]
820 #[inline(always)]
821 pub fn jd(&self) -> JD_R {
822 JD_R::new(((self.bits >> 22) & 0x01) != 0)
823 }
824 #[doc = "Bit 23 - Watchdog Disable"]
825 #[inline(always)]
826 pub fn wddis(&self) -> WDDIS_R {
827 WDDIS_R::new(((self.bits >> 23) & 0x01) != 0)
828 }
829 #[doc = "Bit 25 - CRC Stripping for Type Frames"]
830 #[inline(always)]
831 pub fn cst(&self) -> CST_R {
832 CST_R::new(((self.bits >> 25) & 0x01) != 0)
833 }
834 #[doc = "Bit 27 - IEEE 802"]
835 #[inline(always)]
836 pub fn twokpen(&self) -> TWOKPEN_R {
837 TWOKPEN_R::new(((self.bits >> 27) & 0x01) != 0)
838 }
839}
840impl W {
841 #[doc = "Bits 0:1 - Preamble Length for Transmit Frames"]
842 #[inline(always)]
843 pub fn prelen(&mut self) -> PRELEN_W {
844 PRELEN_W { w: self }
845 }
846 #[doc = "Bit 2 - Receiver Enable"]
847 #[inline(always)]
848 pub fn re(&mut self) -> RE_W {
849 RE_W { w: self }
850 }
851 #[doc = "Bit 3 - Transmitter Enable"]
852 #[inline(always)]
853 pub fn te(&mut self) -> TE_W {
854 TE_W { w: self }
855 }
856 #[doc = "Bit 4 - Deferral Check"]
857 #[inline(always)]
858 pub fn dc(&mut self) -> DC_W {
859 DC_W { w: self }
860 }
861 #[doc = "Bits 5:6 - Back-Off Limit"]
862 #[inline(always)]
863 pub fn bl(&mut self) -> BL_W {
864 BL_W { w: self }
865 }
866 #[doc = "Bit 7 - Automatic Pad or CRC Stripping"]
867 #[inline(always)]
868 pub fn acs(&mut self) -> ACS_W {
869 ACS_W { w: self }
870 }
871 #[doc = "Bit 9 - Disable Retry"]
872 #[inline(always)]
873 pub fn dr(&mut self) -> DR_W {
874 DR_W { w: self }
875 }
876 #[doc = "Bit 10 - Checksum Offload"]
877 #[inline(always)]
878 pub fn ipc(&mut self) -> IPC_W {
879 IPC_W { w: self }
880 }
881 #[doc = "Bit 11 - Duplex Mode"]
882 #[inline(always)]
883 pub fn dupm(&mut self) -> DUPM_W {
884 DUPM_W { w: self }
885 }
886 #[doc = "Bit 12 - Loopback Mode"]
887 #[inline(always)]
888 pub fn loopbm(&mut self) -> LOOPBM_W {
889 LOOPBM_W { w: self }
890 }
891 #[doc = "Bit 13 - Disable Receive Own"]
892 #[inline(always)]
893 pub fn dro(&mut self) -> DRO_W {
894 DRO_W { w: self }
895 }
896 #[doc = "Bit 14 - Speed"]
897 #[inline(always)]
898 pub fn fes(&mut self) -> FES_W {
899 FES_W { w: self }
900 }
901 #[doc = "Bit 15 - Port Select"]
902 #[inline(always)]
903 pub fn ps(&mut self) -> PS_W {
904 PS_W { w: self }
905 }
906 #[doc = "Bit 16 - Disable Carrier Sense During Transmission"]
907 #[inline(always)]
908 pub fn discrs(&mut self) -> DISCRS_W {
909 DISCRS_W { w: self }
910 }
911 #[doc = "Bits 17:19 - Inter-Frame Gap (IFG)"]
912 #[inline(always)]
913 pub fn ifg(&mut self) -> IFG_W {
914 IFG_W { w: self }
915 }
916 #[doc = "Bit 20 - Jumbo Frame Enable"]
917 #[inline(always)]
918 pub fn jfen(&mut self) -> JFEN_W {
919 JFEN_W { w: self }
920 }
921 #[doc = "Bit 22 - Jabber Disable"]
922 #[inline(always)]
923 pub fn jd(&mut self) -> JD_W {
924 JD_W { w: self }
925 }
926 #[doc = "Bit 23 - Watchdog Disable"]
927 #[inline(always)]
928 pub fn wddis(&mut self) -> WDDIS_W {
929 WDDIS_W { w: self }
930 }
931 #[doc = "Bit 25 - CRC Stripping for Type Frames"]
932 #[inline(always)]
933 pub fn cst(&mut self) -> CST_W {
934 CST_W { w: self }
935 }
936 #[doc = "Bit 27 - IEEE 802"]
937 #[inline(always)]
938 pub fn twokpen(&mut self) -> TWOKPEN_W {
939 TWOKPEN_W { w: self }
940 }
941}