1#[doc = "Register `ECMR` reader"]
2pub struct R(crate::R<ECMR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ECMR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ECMR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ECMR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ECMR` writer"]
17pub struct W(crate::W<ECMR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<ECMR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<ECMR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<ECMR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `PRM` reader - Promiscuous Mode"]
38pub type PRM_R = crate::BitReader<PRM_A>;
39#[doc = "Promiscuous Mode\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum PRM_A {
42 #[doc = "0: Promiscuous mode is disabled."]
43 _0 = 0,
44 #[doc = "1: Promiscuous mode is enabled."]
45 _1 = 1,
46}
47impl From<PRM_A> for bool {
48 #[inline(always)]
49 fn from(variant: PRM_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl PRM_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> PRM_A {
57 match self.bits {
58 false => PRM_A::_0,
59 true => PRM_A::_1,
60 }
61 }
62 #[doc = "Checks if the value of the field is `_0`"]
63 #[inline(always)]
64 pub fn is_0(&self) -> bool {
65 *self == PRM_A::_0
66 }
67 #[doc = "Checks if the value of the field is `_1`"]
68 #[inline(always)]
69 pub fn is_1(&self) -> bool {
70 *self == PRM_A::_1
71 }
72}
73#[doc = "Field `PRM` writer - Promiscuous Mode"]
74pub type PRM_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, PRM_A, O>;
75impl<'a, const O: u8> PRM_W<'a, O> {
76 #[doc = "Promiscuous mode is disabled."]
77 #[inline(always)]
78 pub fn _0(self) -> &'a mut W {
79 self.variant(PRM_A::_0)
80 }
81 #[doc = "Promiscuous mode is enabled."]
82 #[inline(always)]
83 pub fn _1(self) -> &'a mut W {
84 self.variant(PRM_A::_1)
85 }
86}
87#[doc = "Field `DM` reader - Duplex Mode"]
88pub type DM_R = crate::BitReader<DM_A>;
89#[doc = "Duplex Mode\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum DM_A {
92 #[doc = "0: Half-duplex mode"]
93 _0 = 0,
94 #[doc = "1: Full-duplex mode"]
95 _1 = 1,
96}
97impl From<DM_A> for bool {
98 #[inline(always)]
99 fn from(variant: DM_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl DM_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> DM_A {
107 match self.bits {
108 false => DM_A::_0,
109 true => DM_A::_1,
110 }
111 }
112 #[doc = "Checks if the value of the field is `_0`"]
113 #[inline(always)]
114 pub fn is_0(&self) -> bool {
115 *self == DM_A::_0
116 }
117 #[doc = "Checks if the value of the field is `_1`"]
118 #[inline(always)]
119 pub fn is_1(&self) -> bool {
120 *self == DM_A::_1
121 }
122}
123#[doc = "Field `DM` writer - Duplex Mode"]
124pub type DM_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, DM_A, O>;
125impl<'a, const O: u8> DM_W<'a, O> {
126 #[doc = "Half-duplex mode"]
127 #[inline(always)]
128 pub fn _0(self) -> &'a mut W {
129 self.variant(DM_A::_0)
130 }
131 #[doc = "Full-duplex mode"]
132 #[inline(always)]
133 pub fn _1(self) -> &'a mut W {
134 self.variant(DM_A::_1)
135 }
136}
137#[doc = "Field `RTM` reader - Bit Rate"]
138pub type RTM_R = crate::BitReader<RTM_A>;
139#[doc = "Bit Rate\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum RTM_A {
142 #[doc = "0: 10 Mbps"]
143 _0 = 0,
144 #[doc = "1: 100 Mbps"]
145 _1 = 1,
146}
147impl From<RTM_A> for bool {
148 #[inline(always)]
149 fn from(variant: RTM_A) -> Self {
150 variant as u8 != 0
151 }
152}
153impl RTM_R {
154 #[doc = "Get enumerated values variant"]
155 #[inline(always)]
156 pub fn variant(&self) -> RTM_A {
157 match self.bits {
158 false => RTM_A::_0,
159 true => RTM_A::_1,
160 }
161 }
162 #[doc = "Checks if the value of the field is `_0`"]
163 #[inline(always)]
164 pub fn is_0(&self) -> bool {
165 *self == RTM_A::_0
166 }
167 #[doc = "Checks if the value of the field is `_1`"]
168 #[inline(always)]
169 pub fn is_1(&self) -> bool {
170 *self == RTM_A::_1
171 }
172}
173#[doc = "Field `RTM` writer - Bit Rate"]
174pub type RTM_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, RTM_A, O>;
175impl<'a, const O: u8> RTM_W<'a, O> {
176 #[doc = "10 Mbps"]
177 #[inline(always)]
178 pub fn _0(self) -> &'a mut W {
179 self.variant(RTM_A::_0)
180 }
181 #[doc = "100 Mbps"]
182 #[inline(always)]
183 pub fn _1(self) -> &'a mut W {
184 self.variant(RTM_A::_1)
185 }
186}
187#[doc = "Field `ILB` reader - Internal Loopback Mode"]
188pub type ILB_R = crate::BitReader<ILB_A>;
189#[doc = "Internal Loopback Mode\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum ILB_A {
192 #[doc = "0: Normal data transmission or reception is performed."]
193 _0 = 0,
194 #[doc = "1: Data is looped back in the ETHERC when full-duplex mode is selected."]
195 _1 = 1,
196}
197impl From<ILB_A> for bool {
198 #[inline(always)]
199 fn from(variant: ILB_A) -> Self {
200 variant as u8 != 0
201 }
202}
203impl ILB_R {
204 #[doc = "Get enumerated values variant"]
205 #[inline(always)]
206 pub fn variant(&self) -> ILB_A {
207 match self.bits {
208 false => ILB_A::_0,
209 true => ILB_A::_1,
210 }
211 }
212 #[doc = "Checks if the value of the field is `_0`"]
213 #[inline(always)]
214 pub fn is_0(&self) -> bool {
215 *self == ILB_A::_0
216 }
217 #[doc = "Checks if the value of the field is `_1`"]
218 #[inline(always)]
219 pub fn is_1(&self) -> bool {
220 *self == ILB_A::_1
221 }
222}
223#[doc = "Field `ILB` writer - Internal Loopback Mode"]
224pub type ILB_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, ILB_A, O>;
225impl<'a, const O: u8> ILB_W<'a, O> {
226 #[doc = "Normal data transmission or reception is performed."]
227 #[inline(always)]
228 pub fn _0(self) -> &'a mut W {
229 self.variant(ILB_A::_0)
230 }
231 #[doc = "Data is looped back in the ETHERC when full-duplex mode is selected."]
232 #[inline(always)]
233 pub fn _1(self) -> &'a mut W {
234 self.variant(ILB_A::_1)
235 }
236}
237#[doc = "Field `TE` reader - Transmission Enable"]
238pub type TE_R = crate::BitReader<TE_A>;
239#[doc = "Transmission Enable\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241pub enum TE_A {
242 #[doc = "0: Transmit function is disabled."]
243 _0 = 0,
244 #[doc = "1: Transmit function is enabled."]
245 _1 = 1,
246}
247impl From<TE_A> for bool {
248 #[inline(always)]
249 fn from(variant: TE_A) -> Self {
250 variant as u8 != 0
251 }
252}
253impl TE_R {
254 #[doc = "Get enumerated values variant"]
255 #[inline(always)]
256 pub fn variant(&self) -> TE_A {
257 match self.bits {
258 false => TE_A::_0,
259 true => TE_A::_1,
260 }
261 }
262 #[doc = "Checks if the value of the field is `_0`"]
263 #[inline(always)]
264 pub fn is_0(&self) -> bool {
265 *self == TE_A::_0
266 }
267 #[doc = "Checks if the value of the field is `_1`"]
268 #[inline(always)]
269 pub fn is_1(&self) -> bool {
270 *self == TE_A::_1
271 }
272}
273#[doc = "Field `TE` writer - Transmission Enable"]
274pub type TE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, TE_A, O>;
275impl<'a, const O: u8> TE_W<'a, O> {
276 #[doc = "Transmit function is disabled."]
277 #[inline(always)]
278 pub fn _0(self) -> &'a mut W {
279 self.variant(TE_A::_0)
280 }
281 #[doc = "Transmit function is enabled."]
282 #[inline(always)]
283 pub fn _1(self) -> &'a mut W {
284 self.variant(TE_A::_1)
285 }
286}
287#[doc = "Field `RE` reader - Reception Enable"]
288pub type RE_R = crate::BitReader<RE_A>;
289#[doc = "Reception Enable\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291pub enum RE_A {
292 #[doc = "0: Receive function is disabled."]
293 _0 = 0,
294 #[doc = "1: Receive function is enabled."]
295 _1 = 1,
296}
297impl From<RE_A> for bool {
298 #[inline(always)]
299 fn from(variant: RE_A) -> Self {
300 variant as u8 != 0
301 }
302}
303impl RE_R {
304 #[doc = "Get enumerated values variant"]
305 #[inline(always)]
306 pub fn variant(&self) -> RE_A {
307 match self.bits {
308 false => RE_A::_0,
309 true => RE_A::_1,
310 }
311 }
312 #[doc = "Checks if the value of the field is `_0`"]
313 #[inline(always)]
314 pub fn is_0(&self) -> bool {
315 *self == RE_A::_0
316 }
317 #[doc = "Checks if the value of the field is `_1`"]
318 #[inline(always)]
319 pub fn is_1(&self) -> bool {
320 *self == RE_A::_1
321 }
322}
323#[doc = "Field `RE` writer - Reception Enable"]
324pub type RE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, RE_A, O>;
325impl<'a, const O: u8> RE_W<'a, O> {
326 #[doc = "Receive function is disabled."]
327 #[inline(always)]
328 pub fn _0(self) -> &'a mut W {
329 self.variant(RE_A::_0)
330 }
331 #[doc = "Receive function is enabled."]
332 #[inline(always)]
333 pub fn _1(self) -> &'a mut W {
334 self.variant(RE_A::_1)
335 }
336}
337#[doc = "Field `MPDE` reader - Magic Packet Detection Enable"]
338pub type MPDE_R = crate::BitReader<MPDE_A>;
339#[doc = "Magic Packet Detection Enable\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq, Eq)]
341pub enum MPDE_A {
342 #[doc = "0: Magic Packet detection is disabled."]
343 _0 = 0,
344 #[doc = "1: Magic Packet detection is enabled."]
345 _1 = 1,
346}
347impl From<MPDE_A> for bool {
348 #[inline(always)]
349 fn from(variant: MPDE_A) -> Self {
350 variant as u8 != 0
351 }
352}
353impl MPDE_R {
354 #[doc = "Get enumerated values variant"]
355 #[inline(always)]
356 pub fn variant(&self) -> MPDE_A {
357 match self.bits {
358 false => MPDE_A::_0,
359 true => MPDE_A::_1,
360 }
361 }
362 #[doc = "Checks if the value of the field is `_0`"]
363 #[inline(always)]
364 pub fn is_0(&self) -> bool {
365 *self == MPDE_A::_0
366 }
367 #[doc = "Checks if the value of the field is `_1`"]
368 #[inline(always)]
369 pub fn is_1(&self) -> bool {
370 *self == MPDE_A::_1
371 }
372}
373#[doc = "Field `MPDE` writer - Magic Packet Detection Enable"]
374pub type MPDE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, MPDE_A, O>;
375impl<'a, const O: u8> MPDE_W<'a, O> {
376 #[doc = "Magic Packet detection is disabled."]
377 #[inline(always)]
378 pub fn _0(self) -> &'a mut W {
379 self.variant(MPDE_A::_0)
380 }
381 #[doc = "Magic Packet detection is enabled."]
382 #[inline(always)]
383 pub fn _1(self) -> &'a mut W {
384 self.variant(MPDE_A::_1)
385 }
386}
387#[doc = "Field `PRCEF` reader - CRC Error Frame Receive Mode"]
388pub type PRCEF_R = crate::BitReader<PRCEF_A>;
389#[doc = "CRC Error Frame Receive Mode\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq, Eq)]
391pub enum PRCEF_A {
392 #[doc = "0: EDMAC is notified of a CRC error."]
393 _0 = 0,
394 #[doc = "1: EDMAC is not notified of a CRC error."]
395 _1 = 1,
396}
397impl From<PRCEF_A> for bool {
398 #[inline(always)]
399 fn from(variant: PRCEF_A) -> Self {
400 variant as u8 != 0
401 }
402}
403impl PRCEF_R {
404 #[doc = "Get enumerated values variant"]
405 #[inline(always)]
406 pub fn variant(&self) -> PRCEF_A {
407 match self.bits {
408 false => PRCEF_A::_0,
409 true => PRCEF_A::_1,
410 }
411 }
412 #[doc = "Checks if the value of the field is `_0`"]
413 #[inline(always)]
414 pub fn is_0(&self) -> bool {
415 *self == PRCEF_A::_0
416 }
417 #[doc = "Checks if the value of the field is `_1`"]
418 #[inline(always)]
419 pub fn is_1(&self) -> bool {
420 *self == PRCEF_A::_1
421 }
422}
423#[doc = "Field `PRCEF` writer - CRC Error Frame Receive Mode"]
424pub type PRCEF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, PRCEF_A, O>;
425impl<'a, const O: u8> PRCEF_W<'a, O> {
426 #[doc = "EDMAC is notified of a CRC error."]
427 #[inline(always)]
428 pub fn _0(self) -> &'a mut W {
429 self.variant(PRCEF_A::_0)
430 }
431 #[doc = "EDMAC is not notified of a CRC error."]
432 #[inline(always)]
433 pub fn _1(self) -> &'a mut W {
434 self.variant(PRCEF_A::_1)
435 }
436}
437#[doc = "Field `TXF` reader - Transmit Flow Control Operating Mode"]
438pub type TXF_R = crate::BitReader<TXF_A>;
439#[doc = "Transmit Flow Control Operating Mode\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq, Eq)]
441pub enum TXF_A {
442 #[doc = "0: Automatic PAUSE frame transmission is disabled.(PAUSE frame is not automatically transmitted.)"]
443 _0 = 0,
444 #[doc = "1: Automatic PAUSE frame transmission is enabled.(PAUSE frame is automatically transmitted as required.)"]
445 _1 = 1,
446}
447impl From<TXF_A> for bool {
448 #[inline(always)]
449 fn from(variant: TXF_A) -> Self {
450 variant as u8 != 0
451 }
452}
453impl TXF_R {
454 #[doc = "Get enumerated values variant"]
455 #[inline(always)]
456 pub fn variant(&self) -> TXF_A {
457 match self.bits {
458 false => TXF_A::_0,
459 true => TXF_A::_1,
460 }
461 }
462 #[doc = "Checks if the value of the field is `_0`"]
463 #[inline(always)]
464 pub fn is_0(&self) -> bool {
465 *self == TXF_A::_0
466 }
467 #[doc = "Checks if the value of the field is `_1`"]
468 #[inline(always)]
469 pub fn is_1(&self) -> bool {
470 *self == TXF_A::_1
471 }
472}
473#[doc = "Field `TXF` writer - Transmit Flow Control Operating Mode"]
474pub type TXF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, TXF_A, O>;
475impl<'a, const O: u8> TXF_W<'a, O> {
476 #[doc = "Automatic PAUSE frame transmission is disabled.(PAUSE frame is not automatically transmitted.)"]
477 #[inline(always)]
478 pub fn _0(self) -> &'a mut W {
479 self.variant(TXF_A::_0)
480 }
481 #[doc = "Automatic PAUSE frame transmission is enabled.(PAUSE frame is automatically transmitted as required.)"]
482 #[inline(always)]
483 pub fn _1(self) -> &'a mut W {
484 self.variant(TXF_A::_1)
485 }
486}
487#[doc = "Field `RXF` reader - Receive Flow Control Operating Mode"]
488pub type RXF_R = crate::BitReader<RXF_A>;
489#[doc = "Receive Flow Control Operating Mode\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq, Eq)]
491pub enum RXF_A {
492 #[doc = "0: PAUSE frame detection is disabled."]
493 _0 = 0,
494 #[doc = "1: PAUSE frame detection is enabled."]
495 _1 = 1,
496}
497impl From<RXF_A> for bool {
498 #[inline(always)]
499 fn from(variant: RXF_A) -> Self {
500 variant as u8 != 0
501 }
502}
503impl RXF_R {
504 #[doc = "Get enumerated values variant"]
505 #[inline(always)]
506 pub fn variant(&self) -> RXF_A {
507 match self.bits {
508 false => RXF_A::_0,
509 true => RXF_A::_1,
510 }
511 }
512 #[doc = "Checks if the value of the field is `_0`"]
513 #[inline(always)]
514 pub fn is_0(&self) -> bool {
515 *self == RXF_A::_0
516 }
517 #[doc = "Checks if the value of the field is `_1`"]
518 #[inline(always)]
519 pub fn is_1(&self) -> bool {
520 *self == RXF_A::_1
521 }
522}
523#[doc = "Field `RXF` writer - Receive Flow Control Operating Mode"]
524pub type RXF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, RXF_A, O>;
525impl<'a, const O: u8> RXF_W<'a, O> {
526 #[doc = "PAUSE frame detection is disabled."]
527 #[inline(always)]
528 pub fn _0(self) -> &'a mut W {
529 self.variant(RXF_A::_0)
530 }
531 #[doc = "PAUSE frame detection is enabled."]
532 #[inline(always)]
533 pub fn _1(self) -> &'a mut W {
534 self.variant(RXF_A::_1)
535 }
536}
537#[doc = "Field `PFR` reader - PAUSE Frame Receive Mode"]
538pub type PFR_R = crate::BitReader<PFR_A>;
539#[doc = "PAUSE Frame Receive Mode\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq, Eq)]
541pub enum PFR_A {
542 #[doc = "0: PAUSE frame is not transferred to the EDMAC."]
543 _0 = 0,
544 #[doc = "1: PAUSE frame is transferred to the EDMAC."]
545 _1 = 1,
546}
547impl From<PFR_A> for bool {
548 #[inline(always)]
549 fn from(variant: PFR_A) -> Self {
550 variant as u8 != 0
551 }
552}
553impl PFR_R {
554 #[doc = "Get enumerated values variant"]
555 #[inline(always)]
556 pub fn variant(&self) -> PFR_A {
557 match self.bits {
558 false => PFR_A::_0,
559 true => PFR_A::_1,
560 }
561 }
562 #[doc = "Checks if the value of the field is `_0`"]
563 #[inline(always)]
564 pub fn is_0(&self) -> bool {
565 *self == PFR_A::_0
566 }
567 #[doc = "Checks if the value of the field is `_1`"]
568 #[inline(always)]
569 pub fn is_1(&self) -> bool {
570 *self == PFR_A::_1
571 }
572}
573#[doc = "Field `PFR` writer - PAUSE Frame Receive Mode"]
574pub type PFR_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, PFR_A, O>;
575impl<'a, const O: u8> PFR_W<'a, O> {
576 #[doc = "PAUSE frame is not transferred to the EDMAC."]
577 #[inline(always)]
578 pub fn _0(self) -> &'a mut W {
579 self.variant(PFR_A::_0)
580 }
581 #[doc = "PAUSE frame is transferred to the EDMAC."]
582 #[inline(always)]
583 pub fn _1(self) -> &'a mut W {
584 self.variant(PFR_A::_1)
585 }
586}
587#[doc = "Field `ZPF` reader - 0 Time PAUSE Frame Enable"]
588pub type ZPF_R = crate::BitReader<ZPF_A>;
589#[doc = "0 Time PAUSE Frame Enable\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq, Eq)]
591pub enum ZPF_A {
592 #[doc = "0: PAUSE frame that contains the pause_time parameter of 0 is not used."]
593 _0 = 0,
594 #[doc = "1: PAUSE frame that contains the pause_time parameter of 0 is used."]
595 _1 = 1,
596}
597impl From<ZPF_A> for bool {
598 #[inline(always)]
599 fn from(variant: ZPF_A) -> Self {
600 variant as u8 != 0
601 }
602}
603impl ZPF_R {
604 #[doc = "Get enumerated values variant"]
605 #[inline(always)]
606 pub fn variant(&self) -> ZPF_A {
607 match self.bits {
608 false => ZPF_A::_0,
609 true => ZPF_A::_1,
610 }
611 }
612 #[doc = "Checks if the value of the field is `_0`"]
613 #[inline(always)]
614 pub fn is_0(&self) -> bool {
615 *self == ZPF_A::_0
616 }
617 #[doc = "Checks if the value of the field is `_1`"]
618 #[inline(always)]
619 pub fn is_1(&self) -> bool {
620 *self == ZPF_A::_1
621 }
622}
623#[doc = "Field `ZPF` writer - 0 Time PAUSE Frame Enable"]
624pub type ZPF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, ZPF_A, O>;
625impl<'a, const O: u8> ZPF_W<'a, O> {
626 #[doc = "PAUSE frame that contains the pause_time parameter of 0 is not used."]
627 #[inline(always)]
628 pub fn _0(self) -> &'a mut W {
629 self.variant(ZPF_A::_0)
630 }
631 #[doc = "PAUSE frame that contains the pause_time parameter of 0 is used."]
632 #[inline(always)]
633 pub fn _1(self) -> &'a mut W {
634 self.variant(ZPF_A::_1)
635 }
636}
637#[doc = "Field `TPC` reader - PAUSE Frame Transmit"]
638pub type TPC_R = crate::BitReader<TPC_A>;
639#[doc = "PAUSE Frame Transmit\n\nValue on reset: 0"]
640#[derive(Clone, Copy, Debug, PartialEq, Eq)]
641pub enum TPC_A {
642 #[doc = "0: PAUSE frame is transmitted even during a PAUSE period."]
643 _0 = 0,
644 #[doc = "1: PAUSE frame is not transmitted during a PAUSE period."]
645 _1 = 1,
646}
647impl From<TPC_A> for bool {
648 #[inline(always)]
649 fn from(variant: TPC_A) -> Self {
650 variant as u8 != 0
651 }
652}
653impl TPC_R {
654 #[doc = "Get enumerated values variant"]
655 #[inline(always)]
656 pub fn variant(&self) -> TPC_A {
657 match self.bits {
658 false => TPC_A::_0,
659 true => TPC_A::_1,
660 }
661 }
662 #[doc = "Checks if the value of the field is `_0`"]
663 #[inline(always)]
664 pub fn is_0(&self) -> bool {
665 *self == TPC_A::_0
666 }
667 #[doc = "Checks if the value of the field is `_1`"]
668 #[inline(always)]
669 pub fn is_1(&self) -> bool {
670 *self == TPC_A::_1
671 }
672}
673#[doc = "Field `TPC` writer - PAUSE Frame Transmit"]
674pub type TPC_W<'a, const O: u8> = crate::BitWriter<'a, u32, ECMR_SPEC, TPC_A, O>;
675impl<'a, const O: u8> TPC_W<'a, O> {
676 #[doc = "PAUSE frame is transmitted even during a PAUSE period."]
677 #[inline(always)]
678 pub fn _0(self) -> &'a mut W {
679 self.variant(TPC_A::_0)
680 }
681 #[doc = "PAUSE frame is not transmitted during a PAUSE period."]
682 #[inline(always)]
683 pub fn _1(self) -> &'a mut W {
684 self.variant(TPC_A::_1)
685 }
686}
687impl R {
688 #[doc = "Bit 0 - Promiscuous Mode"]
689 #[inline(always)]
690 pub fn prm(&self) -> PRM_R {
691 PRM_R::new((self.bits & 1) != 0)
692 }
693 #[doc = "Bit 1 - Duplex Mode"]
694 #[inline(always)]
695 pub fn dm(&self) -> DM_R {
696 DM_R::new(((self.bits >> 1) & 1) != 0)
697 }
698 #[doc = "Bit 2 - Bit Rate"]
699 #[inline(always)]
700 pub fn rtm(&self) -> RTM_R {
701 RTM_R::new(((self.bits >> 2) & 1) != 0)
702 }
703 #[doc = "Bit 3 - Internal Loopback Mode"]
704 #[inline(always)]
705 pub fn ilb(&self) -> ILB_R {
706 ILB_R::new(((self.bits >> 3) & 1) != 0)
707 }
708 #[doc = "Bit 5 - Transmission Enable"]
709 #[inline(always)]
710 pub fn te(&self) -> TE_R {
711 TE_R::new(((self.bits >> 5) & 1) != 0)
712 }
713 #[doc = "Bit 6 - Reception Enable"]
714 #[inline(always)]
715 pub fn re(&self) -> RE_R {
716 RE_R::new(((self.bits >> 6) & 1) != 0)
717 }
718 #[doc = "Bit 9 - Magic Packet Detection Enable"]
719 #[inline(always)]
720 pub fn mpde(&self) -> MPDE_R {
721 MPDE_R::new(((self.bits >> 9) & 1) != 0)
722 }
723 #[doc = "Bit 12 - CRC Error Frame Receive Mode"]
724 #[inline(always)]
725 pub fn prcef(&self) -> PRCEF_R {
726 PRCEF_R::new(((self.bits >> 12) & 1) != 0)
727 }
728 #[doc = "Bit 16 - Transmit Flow Control Operating Mode"]
729 #[inline(always)]
730 pub fn txf(&self) -> TXF_R {
731 TXF_R::new(((self.bits >> 16) & 1) != 0)
732 }
733 #[doc = "Bit 17 - Receive Flow Control Operating Mode"]
734 #[inline(always)]
735 pub fn rxf(&self) -> RXF_R {
736 RXF_R::new(((self.bits >> 17) & 1) != 0)
737 }
738 #[doc = "Bit 18 - PAUSE Frame Receive Mode"]
739 #[inline(always)]
740 pub fn pfr(&self) -> PFR_R {
741 PFR_R::new(((self.bits >> 18) & 1) != 0)
742 }
743 #[doc = "Bit 19 - 0 Time PAUSE Frame Enable"]
744 #[inline(always)]
745 pub fn zpf(&self) -> ZPF_R {
746 ZPF_R::new(((self.bits >> 19) & 1) != 0)
747 }
748 #[doc = "Bit 20 - PAUSE Frame Transmit"]
749 #[inline(always)]
750 pub fn tpc(&self) -> TPC_R {
751 TPC_R::new(((self.bits >> 20) & 1) != 0)
752 }
753}
754impl W {
755 #[doc = "Bit 0 - Promiscuous Mode"]
756 #[inline(always)]
757 #[must_use]
758 pub fn prm(&mut self) -> PRM_W<0> {
759 PRM_W::new(self)
760 }
761 #[doc = "Bit 1 - Duplex Mode"]
762 #[inline(always)]
763 #[must_use]
764 pub fn dm(&mut self) -> DM_W<1> {
765 DM_W::new(self)
766 }
767 #[doc = "Bit 2 - Bit Rate"]
768 #[inline(always)]
769 #[must_use]
770 pub fn rtm(&mut self) -> RTM_W<2> {
771 RTM_W::new(self)
772 }
773 #[doc = "Bit 3 - Internal Loopback Mode"]
774 #[inline(always)]
775 #[must_use]
776 pub fn ilb(&mut self) -> ILB_W<3> {
777 ILB_W::new(self)
778 }
779 #[doc = "Bit 5 - Transmission Enable"]
780 #[inline(always)]
781 #[must_use]
782 pub fn te(&mut self) -> TE_W<5> {
783 TE_W::new(self)
784 }
785 #[doc = "Bit 6 - Reception Enable"]
786 #[inline(always)]
787 #[must_use]
788 pub fn re(&mut self) -> RE_W<6> {
789 RE_W::new(self)
790 }
791 #[doc = "Bit 9 - Magic Packet Detection Enable"]
792 #[inline(always)]
793 #[must_use]
794 pub fn mpde(&mut self) -> MPDE_W<9> {
795 MPDE_W::new(self)
796 }
797 #[doc = "Bit 12 - CRC Error Frame Receive Mode"]
798 #[inline(always)]
799 #[must_use]
800 pub fn prcef(&mut self) -> PRCEF_W<12> {
801 PRCEF_W::new(self)
802 }
803 #[doc = "Bit 16 - Transmit Flow Control Operating Mode"]
804 #[inline(always)]
805 #[must_use]
806 pub fn txf(&mut self) -> TXF_W<16> {
807 TXF_W::new(self)
808 }
809 #[doc = "Bit 17 - Receive Flow Control Operating Mode"]
810 #[inline(always)]
811 #[must_use]
812 pub fn rxf(&mut self) -> RXF_W<17> {
813 RXF_W::new(self)
814 }
815 #[doc = "Bit 18 - PAUSE Frame Receive Mode"]
816 #[inline(always)]
817 #[must_use]
818 pub fn pfr(&mut self) -> PFR_W<18> {
819 PFR_W::new(self)
820 }
821 #[doc = "Bit 19 - 0 Time PAUSE Frame Enable"]
822 #[inline(always)]
823 #[must_use]
824 pub fn zpf(&mut self) -> ZPF_W<19> {
825 ZPF_W::new(self)
826 }
827 #[doc = "Bit 20 - PAUSE Frame Transmit"]
828 #[inline(always)]
829 #[must_use]
830 pub fn tpc(&mut self) -> TPC_W<20> {
831 TPC_W::new(self)
832 }
833 #[doc = "Writes raw bits to the register."]
834 #[inline(always)]
835 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
836 self.0.bits(bits);
837 self
838 }
839}
840#[doc = "ETHERC Mode Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ecmr](index.html) module"]
841pub struct ECMR_SPEC;
842impl crate::RegisterSpec for ECMR_SPEC {
843 type Ux = u32;
844}
845#[doc = "`read()` method returns [ecmr::R](R) reader structure"]
846impl crate::Readable for ECMR_SPEC {
847 type Reader = R;
848}
849#[doc = "`write(|w| ..)` method takes [ecmr::W](W) writer structure"]
850impl crate::Writable for ECMR_SPEC {
851 type Writer = W;
852 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
853 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
854}
855#[doc = "`reset()` method sets ECMR to value 0"]
856impl crate::Resettable for ECMR_SPEC {
857 const RESET_VALUE: Self::Ux = 0;
858}