1#[doc = "Register `INTEN` reader"]
2pub struct R(crate::R<INTEN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INTEN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INTEN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INTEN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INTEN` writer"]
17pub struct W(crate::W<INTEN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INTEN_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<INTEN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INTEN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `READY` reader - Enable or disable interrupt for READY event"]
38pub type READY_R = crate::BitReader<READY_A>;
39#[doc = "Enable or disable interrupt for READY event\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum READY_A {
42 #[doc = "0: Disable"]
43 DISABLED = 0,
44 #[doc = "1: Enable"]
45 ENABLED = 1,
46}
47impl From<READY_A> for bool {
48 #[inline(always)]
49 fn from(variant: READY_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl READY_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> READY_A {
57 match self.bits {
58 false => READY_A::DISABLED,
59 true => READY_A::ENABLED,
60 }
61 }
62 #[doc = "Checks if the value of the field is `DISABLED`"]
63 #[inline(always)]
64 pub fn is_disabled(&self) -> bool {
65 *self == READY_A::DISABLED
66 }
67 #[doc = "Checks if the value of the field is `ENABLED`"]
68 #[inline(always)]
69 pub fn is_enabled(&self) -> bool {
70 *self == READY_A::ENABLED
71 }
72}
73#[doc = "Field `READY` writer - Enable or disable interrupt for READY event"]
74pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>;
75impl<'a, const O: u8> READY_W<'a, O> {
76 #[doc = "Disable"]
77 #[inline(always)]
78 pub fn disabled(self) -> &'a mut W {
79 self.variant(READY_A::DISABLED)
80 }
81 #[doc = "Enable"]
82 #[inline(always)]
83 pub fn enabled(self) -> &'a mut W {
84 self.variant(READY_A::ENABLED)
85 }
86}
87#[doc = "Field `FIELDDETECTED` reader - Enable or disable interrupt for FIELDDETECTED event"]
88pub type FIELDDETECTED_R = crate::BitReader<FIELDDETECTED_A>;
89#[doc = "Enable or disable interrupt for FIELDDETECTED event\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum FIELDDETECTED_A {
92 #[doc = "0: Disable"]
93 DISABLED = 0,
94 #[doc = "1: Enable"]
95 ENABLED = 1,
96}
97impl From<FIELDDETECTED_A> for bool {
98 #[inline(always)]
99 fn from(variant: FIELDDETECTED_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl FIELDDETECTED_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> FIELDDETECTED_A {
107 match self.bits {
108 false => FIELDDETECTED_A::DISABLED,
109 true => FIELDDETECTED_A::ENABLED,
110 }
111 }
112 #[doc = "Checks if the value of the field is `DISABLED`"]
113 #[inline(always)]
114 pub fn is_disabled(&self) -> bool {
115 *self == FIELDDETECTED_A::DISABLED
116 }
117 #[doc = "Checks if the value of the field is `ENABLED`"]
118 #[inline(always)]
119 pub fn is_enabled(&self) -> bool {
120 *self == FIELDDETECTED_A::ENABLED
121 }
122}
123#[doc = "Field `FIELDDETECTED` writer - Enable or disable interrupt for FIELDDETECTED event"]
124pub type FIELDDETECTED_W<'a, const O: u8> =
125 crate::BitWriter<'a, u32, INTEN_SPEC, FIELDDETECTED_A, O>;
126impl<'a, const O: u8> FIELDDETECTED_W<'a, O> {
127 #[doc = "Disable"]
128 #[inline(always)]
129 pub fn disabled(self) -> &'a mut W {
130 self.variant(FIELDDETECTED_A::DISABLED)
131 }
132 #[doc = "Enable"]
133 #[inline(always)]
134 pub fn enabled(self) -> &'a mut W {
135 self.variant(FIELDDETECTED_A::ENABLED)
136 }
137}
138#[doc = "Field `FIELDLOST` reader - Enable or disable interrupt for FIELDLOST event"]
139pub type FIELDLOST_R = crate::BitReader<FIELDLOST_A>;
140#[doc = "Enable or disable interrupt for FIELDLOST event\n\nValue on reset: 0"]
141#[derive(Clone, Copy, Debug, PartialEq)]
142pub enum FIELDLOST_A {
143 #[doc = "0: Disable"]
144 DISABLED = 0,
145 #[doc = "1: Enable"]
146 ENABLED = 1,
147}
148impl From<FIELDLOST_A> for bool {
149 #[inline(always)]
150 fn from(variant: FIELDLOST_A) -> Self {
151 variant as u8 != 0
152 }
153}
154impl FIELDLOST_R {
155 #[doc = "Get enumerated values variant"]
156 #[inline(always)]
157 pub fn variant(&self) -> FIELDLOST_A {
158 match self.bits {
159 false => FIELDLOST_A::DISABLED,
160 true => FIELDLOST_A::ENABLED,
161 }
162 }
163 #[doc = "Checks if the value of the field is `DISABLED`"]
164 #[inline(always)]
165 pub fn is_disabled(&self) -> bool {
166 *self == FIELDLOST_A::DISABLED
167 }
168 #[doc = "Checks if the value of the field is `ENABLED`"]
169 #[inline(always)]
170 pub fn is_enabled(&self) -> bool {
171 *self == FIELDLOST_A::ENABLED
172 }
173}
174#[doc = "Field `FIELDLOST` writer - Enable or disable interrupt for FIELDLOST event"]
175pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, FIELDLOST_A, O>;
176impl<'a, const O: u8> FIELDLOST_W<'a, O> {
177 #[doc = "Disable"]
178 #[inline(always)]
179 pub fn disabled(self) -> &'a mut W {
180 self.variant(FIELDLOST_A::DISABLED)
181 }
182 #[doc = "Enable"]
183 #[inline(always)]
184 pub fn enabled(self) -> &'a mut W {
185 self.variant(FIELDLOST_A::ENABLED)
186 }
187}
188#[doc = "Field `TXFRAMESTART` reader - Enable or disable interrupt for TXFRAMESTART event"]
189pub type TXFRAMESTART_R = crate::BitReader<TXFRAMESTART_A>;
190#[doc = "Enable or disable interrupt for TXFRAMESTART event\n\nValue on reset: 0"]
191#[derive(Clone, Copy, Debug, PartialEq)]
192pub enum TXFRAMESTART_A {
193 #[doc = "0: Disable"]
194 DISABLED = 0,
195 #[doc = "1: Enable"]
196 ENABLED = 1,
197}
198impl From<TXFRAMESTART_A> for bool {
199 #[inline(always)]
200 fn from(variant: TXFRAMESTART_A) -> Self {
201 variant as u8 != 0
202 }
203}
204impl TXFRAMESTART_R {
205 #[doc = "Get enumerated values variant"]
206 #[inline(always)]
207 pub fn variant(&self) -> TXFRAMESTART_A {
208 match self.bits {
209 false => TXFRAMESTART_A::DISABLED,
210 true => TXFRAMESTART_A::ENABLED,
211 }
212 }
213 #[doc = "Checks if the value of the field is `DISABLED`"]
214 #[inline(always)]
215 pub fn is_disabled(&self) -> bool {
216 *self == TXFRAMESTART_A::DISABLED
217 }
218 #[doc = "Checks if the value of the field is `ENABLED`"]
219 #[inline(always)]
220 pub fn is_enabled(&self) -> bool {
221 *self == TXFRAMESTART_A::ENABLED
222 }
223}
224#[doc = "Field `TXFRAMESTART` writer - Enable or disable interrupt for TXFRAMESTART event"]
225pub type TXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMESTART_A, O>;
226impl<'a, const O: u8> TXFRAMESTART_W<'a, O> {
227 #[doc = "Disable"]
228 #[inline(always)]
229 pub fn disabled(self) -> &'a mut W {
230 self.variant(TXFRAMESTART_A::DISABLED)
231 }
232 #[doc = "Enable"]
233 #[inline(always)]
234 pub fn enabled(self) -> &'a mut W {
235 self.variant(TXFRAMESTART_A::ENABLED)
236 }
237}
238#[doc = "Field `TXFRAMEEND` reader - Enable or disable interrupt for TXFRAMEEND event"]
239pub type TXFRAMEEND_R = crate::BitReader<TXFRAMEEND_A>;
240#[doc = "Enable or disable interrupt for TXFRAMEEND event\n\nValue on reset: 0"]
241#[derive(Clone, Copy, Debug, PartialEq)]
242pub enum TXFRAMEEND_A {
243 #[doc = "0: Disable"]
244 DISABLED = 0,
245 #[doc = "1: Enable"]
246 ENABLED = 1,
247}
248impl From<TXFRAMEEND_A> for bool {
249 #[inline(always)]
250 fn from(variant: TXFRAMEEND_A) -> Self {
251 variant as u8 != 0
252 }
253}
254impl TXFRAMEEND_R {
255 #[doc = "Get enumerated values variant"]
256 #[inline(always)]
257 pub fn variant(&self) -> TXFRAMEEND_A {
258 match self.bits {
259 false => TXFRAMEEND_A::DISABLED,
260 true => TXFRAMEEND_A::ENABLED,
261 }
262 }
263 #[doc = "Checks if the value of the field is `DISABLED`"]
264 #[inline(always)]
265 pub fn is_disabled(&self) -> bool {
266 *self == TXFRAMEEND_A::DISABLED
267 }
268 #[doc = "Checks if the value of the field is `ENABLED`"]
269 #[inline(always)]
270 pub fn is_enabled(&self) -> bool {
271 *self == TXFRAMEEND_A::ENABLED
272 }
273}
274#[doc = "Field `TXFRAMEEND` writer - Enable or disable interrupt for TXFRAMEEND event"]
275pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMEEND_A, O>;
276impl<'a, const O: u8> TXFRAMEEND_W<'a, O> {
277 #[doc = "Disable"]
278 #[inline(always)]
279 pub fn disabled(self) -> &'a mut W {
280 self.variant(TXFRAMEEND_A::DISABLED)
281 }
282 #[doc = "Enable"]
283 #[inline(always)]
284 pub fn enabled(self) -> &'a mut W {
285 self.variant(TXFRAMEEND_A::ENABLED)
286 }
287}
288#[doc = "Field `RXFRAMESTART` reader - Enable or disable interrupt for RXFRAMESTART event"]
289pub type RXFRAMESTART_R = crate::BitReader<RXFRAMESTART_A>;
290#[doc = "Enable or disable interrupt for RXFRAMESTART event\n\nValue on reset: 0"]
291#[derive(Clone, Copy, Debug, PartialEq)]
292pub enum RXFRAMESTART_A {
293 #[doc = "0: Disable"]
294 DISABLED = 0,
295 #[doc = "1: Enable"]
296 ENABLED = 1,
297}
298impl From<RXFRAMESTART_A> for bool {
299 #[inline(always)]
300 fn from(variant: RXFRAMESTART_A) -> Self {
301 variant as u8 != 0
302 }
303}
304impl RXFRAMESTART_R {
305 #[doc = "Get enumerated values variant"]
306 #[inline(always)]
307 pub fn variant(&self) -> RXFRAMESTART_A {
308 match self.bits {
309 false => RXFRAMESTART_A::DISABLED,
310 true => RXFRAMESTART_A::ENABLED,
311 }
312 }
313 #[doc = "Checks if the value of the field is `DISABLED`"]
314 #[inline(always)]
315 pub fn is_disabled(&self) -> bool {
316 *self == RXFRAMESTART_A::DISABLED
317 }
318 #[doc = "Checks if the value of the field is `ENABLED`"]
319 #[inline(always)]
320 pub fn is_enabled(&self) -> bool {
321 *self == RXFRAMESTART_A::ENABLED
322 }
323}
324#[doc = "Field `RXFRAMESTART` writer - Enable or disable interrupt for RXFRAMESTART event"]
325pub type RXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMESTART_A, O>;
326impl<'a, const O: u8> RXFRAMESTART_W<'a, O> {
327 #[doc = "Disable"]
328 #[inline(always)]
329 pub fn disabled(self) -> &'a mut W {
330 self.variant(RXFRAMESTART_A::DISABLED)
331 }
332 #[doc = "Enable"]
333 #[inline(always)]
334 pub fn enabled(self) -> &'a mut W {
335 self.variant(RXFRAMESTART_A::ENABLED)
336 }
337}
338#[doc = "Field `RXFRAMEEND` reader - Enable or disable interrupt for RXFRAMEEND event"]
339pub type RXFRAMEEND_R = crate::BitReader<RXFRAMEEND_A>;
340#[doc = "Enable or disable interrupt for RXFRAMEEND event\n\nValue on reset: 0"]
341#[derive(Clone, Copy, Debug, PartialEq)]
342pub enum RXFRAMEEND_A {
343 #[doc = "0: Disable"]
344 DISABLED = 0,
345 #[doc = "1: Enable"]
346 ENABLED = 1,
347}
348impl From<RXFRAMEEND_A> for bool {
349 #[inline(always)]
350 fn from(variant: RXFRAMEEND_A) -> Self {
351 variant as u8 != 0
352 }
353}
354impl RXFRAMEEND_R {
355 #[doc = "Get enumerated values variant"]
356 #[inline(always)]
357 pub fn variant(&self) -> RXFRAMEEND_A {
358 match self.bits {
359 false => RXFRAMEEND_A::DISABLED,
360 true => RXFRAMEEND_A::ENABLED,
361 }
362 }
363 #[doc = "Checks if the value of the field is `DISABLED`"]
364 #[inline(always)]
365 pub fn is_disabled(&self) -> bool {
366 *self == RXFRAMEEND_A::DISABLED
367 }
368 #[doc = "Checks if the value of the field is `ENABLED`"]
369 #[inline(always)]
370 pub fn is_enabled(&self) -> bool {
371 *self == RXFRAMEEND_A::ENABLED
372 }
373}
374#[doc = "Field `RXFRAMEEND` writer - Enable or disable interrupt for RXFRAMEEND event"]
375pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMEEND_A, O>;
376impl<'a, const O: u8> RXFRAMEEND_W<'a, O> {
377 #[doc = "Disable"]
378 #[inline(always)]
379 pub fn disabled(self) -> &'a mut W {
380 self.variant(RXFRAMEEND_A::DISABLED)
381 }
382 #[doc = "Enable"]
383 #[inline(always)]
384 pub fn enabled(self) -> &'a mut W {
385 self.variant(RXFRAMEEND_A::ENABLED)
386 }
387}
388#[doc = "Field `ERROR` reader - Enable or disable interrupt for ERROR event"]
389pub type ERROR_R = crate::BitReader<ERROR_A>;
390#[doc = "Enable or disable interrupt for ERROR event\n\nValue on reset: 0"]
391#[derive(Clone, Copy, Debug, PartialEq)]
392pub enum ERROR_A {
393 #[doc = "0: Disable"]
394 DISABLED = 0,
395 #[doc = "1: Enable"]
396 ENABLED = 1,
397}
398impl From<ERROR_A> for bool {
399 #[inline(always)]
400 fn from(variant: ERROR_A) -> Self {
401 variant as u8 != 0
402 }
403}
404impl ERROR_R {
405 #[doc = "Get enumerated values variant"]
406 #[inline(always)]
407 pub fn variant(&self) -> ERROR_A {
408 match self.bits {
409 false => ERROR_A::DISABLED,
410 true => ERROR_A::ENABLED,
411 }
412 }
413 #[doc = "Checks if the value of the field is `DISABLED`"]
414 #[inline(always)]
415 pub fn is_disabled(&self) -> bool {
416 *self == ERROR_A::DISABLED
417 }
418 #[doc = "Checks if the value of the field is `ENABLED`"]
419 #[inline(always)]
420 pub fn is_enabled(&self) -> bool {
421 *self == ERROR_A::ENABLED
422 }
423}
424#[doc = "Field `ERROR` writer - Enable or disable interrupt for ERROR event"]
425pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>;
426impl<'a, const O: u8> ERROR_W<'a, O> {
427 #[doc = "Disable"]
428 #[inline(always)]
429 pub fn disabled(self) -> &'a mut W {
430 self.variant(ERROR_A::DISABLED)
431 }
432 #[doc = "Enable"]
433 #[inline(always)]
434 pub fn enabled(self) -> &'a mut W {
435 self.variant(ERROR_A::ENABLED)
436 }
437}
438#[doc = "Field `RXERROR` reader - Enable or disable interrupt for RXERROR event"]
439pub type RXERROR_R = crate::BitReader<RXERROR_A>;
440#[doc = "Enable or disable interrupt for RXERROR event\n\nValue on reset: 0"]
441#[derive(Clone, Copy, Debug, PartialEq)]
442pub enum RXERROR_A {
443 #[doc = "0: Disable"]
444 DISABLED = 0,
445 #[doc = "1: Enable"]
446 ENABLED = 1,
447}
448impl From<RXERROR_A> for bool {
449 #[inline(always)]
450 fn from(variant: RXERROR_A) -> Self {
451 variant as u8 != 0
452 }
453}
454impl RXERROR_R {
455 #[doc = "Get enumerated values variant"]
456 #[inline(always)]
457 pub fn variant(&self) -> RXERROR_A {
458 match self.bits {
459 false => RXERROR_A::DISABLED,
460 true => RXERROR_A::ENABLED,
461 }
462 }
463 #[doc = "Checks if the value of the field is `DISABLED`"]
464 #[inline(always)]
465 pub fn is_disabled(&self) -> bool {
466 *self == RXERROR_A::DISABLED
467 }
468 #[doc = "Checks if the value of the field is `ENABLED`"]
469 #[inline(always)]
470 pub fn is_enabled(&self) -> bool {
471 *self == RXERROR_A::ENABLED
472 }
473}
474#[doc = "Field `RXERROR` writer - Enable or disable interrupt for RXERROR event"]
475pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXERROR_A, O>;
476impl<'a, const O: u8> RXERROR_W<'a, O> {
477 #[doc = "Disable"]
478 #[inline(always)]
479 pub fn disabled(self) -> &'a mut W {
480 self.variant(RXERROR_A::DISABLED)
481 }
482 #[doc = "Enable"]
483 #[inline(always)]
484 pub fn enabled(self) -> &'a mut W {
485 self.variant(RXERROR_A::ENABLED)
486 }
487}
488#[doc = "Field `ENDRX` reader - Enable or disable interrupt for ENDRX event"]
489pub type ENDRX_R = crate::BitReader<ENDRX_A>;
490#[doc = "Enable or disable interrupt for ENDRX event\n\nValue on reset: 0"]
491#[derive(Clone, Copy, Debug, PartialEq)]
492pub enum ENDRX_A {
493 #[doc = "0: Disable"]
494 DISABLED = 0,
495 #[doc = "1: Enable"]
496 ENABLED = 1,
497}
498impl From<ENDRX_A> for bool {
499 #[inline(always)]
500 fn from(variant: ENDRX_A) -> Self {
501 variant as u8 != 0
502 }
503}
504impl ENDRX_R {
505 #[doc = "Get enumerated values variant"]
506 #[inline(always)]
507 pub fn variant(&self) -> ENDRX_A {
508 match self.bits {
509 false => ENDRX_A::DISABLED,
510 true => ENDRX_A::ENABLED,
511 }
512 }
513 #[doc = "Checks if the value of the field is `DISABLED`"]
514 #[inline(always)]
515 pub fn is_disabled(&self) -> bool {
516 *self == ENDRX_A::DISABLED
517 }
518 #[doc = "Checks if the value of the field is `ENABLED`"]
519 #[inline(always)]
520 pub fn is_enabled(&self) -> bool {
521 *self == ENDRX_A::ENABLED
522 }
523}
524#[doc = "Field `ENDRX` writer - Enable or disable interrupt for ENDRX event"]
525pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>;
526impl<'a, const O: u8> ENDRX_W<'a, O> {
527 #[doc = "Disable"]
528 #[inline(always)]
529 pub fn disabled(self) -> &'a mut W {
530 self.variant(ENDRX_A::DISABLED)
531 }
532 #[doc = "Enable"]
533 #[inline(always)]
534 pub fn enabled(self) -> &'a mut W {
535 self.variant(ENDRX_A::ENABLED)
536 }
537}
538#[doc = "Field `ENDTX` reader - Enable or disable interrupt for ENDTX event"]
539pub type ENDTX_R = crate::BitReader<ENDTX_A>;
540#[doc = "Enable or disable interrupt for ENDTX event\n\nValue on reset: 0"]
541#[derive(Clone, Copy, Debug, PartialEq)]
542pub enum ENDTX_A {
543 #[doc = "0: Disable"]
544 DISABLED = 0,
545 #[doc = "1: Enable"]
546 ENABLED = 1,
547}
548impl From<ENDTX_A> for bool {
549 #[inline(always)]
550 fn from(variant: ENDTX_A) -> Self {
551 variant as u8 != 0
552 }
553}
554impl ENDTX_R {
555 #[doc = "Get enumerated values variant"]
556 #[inline(always)]
557 pub fn variant(&self) -> ENDTX_A {
558 match self.bits {
559 false => ENDTX_A::DISABLED,
560 true => ENDTX_A::ENABLED,
561 }
562 }
563 #[doc = "Checks if the value of the field is `DISABLED`"]
564 #[inline(always)]
565 pub fn is_disabled(&self) -> bool {
566 *self == ENDTX_A::DISABLED
567 }
568 #[doc = "Checks if the value of the field is `ENABLED`"]
569 #[inline(always)]
570 pub fn is_enabled(&self) -> bool {
571 *self == ENDTX_A::ENABLED
572 }
573}
574#[doc = "Field `ENDTX` writer - Enable or disable interrupt for ENDTX event"]
575pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>;
576impl<'a, const O: u8> ENDTX_W<'a, O> {
577 #[doc = "Disable"]
578 #[inline(always)]
579 pub fn disabled(self) -> &'a mut W {
580 self.variant(ENDTX_A::DISABLED)
581 }
582 #[doc = "Enable"]
583 #[inline(always)]
584 pub fn enabled(self) -> &'a mut W {
585 self.variant(ENDTX_A::ENABLED)
586 }
587}
588#[doc = "Field `AUTOCOLRESSTARTED` reader - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
589pub type AUTOCOLRESSTARTED_R = crate::BitReader<AUTOCOLRESSTARTED_A>;
590#[doc = "Enable or disable interrupt for AUTOCOLRESSTARTED event\n\nValue on reset: 0"]
591#[derive(Clone, Copy, Debug, PartialEq)]
592pub enum AUTOCOLRESSTARTED_A {
593 #[doc = "0: Disable"]
594 DISABLED = 0,
595 #[doc = "1: Enable"]
596 ENABLED = 1,
597}
598impl From<AUTOCOLRESSTARTED_A> for bool {
599 #[inline(always)]
600 fn from(variant: AUTOCOLRESSTARTED_A) -> Self {
601 variant as u8 != 0
602 }
603}
604impl AUTOCOLRESSTARTED_R {
605 #[doc = "Get enumerated values variant"]
606 #[inline(always)]
607 pub fn variant(&self) -> AUTOCOLRESSTARTED_A {
608 match self.bits {
609 false => AUTOCOLRESSTARTED_A::DISABLED,
610 true => AUTOCOLRESSTARTED_A::ENABLED,
611 }
612 }
613 #[doc = "Checks if the value of the field is `DISABLED`"]
614 #[inline(always)]
615 pub fn is_disabled(&self) -> bool {
616 *self == AUTOCOLRESSTARTED_A::DISABLED
617 }
618 #[doc = "Checks if the value of the field is `ENABLED`"]
619 #[inline(always)]
620 pub fn is_enabled(&self) -> bool {
621 *self == AUTOCOLRESSTARTED_A::ENABLED
622 }
623}
624#[doc = "Field `AUTOCOLRESSTARTED` writer - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
625pub type AUTOCOLRESSTARTED_W<'a, const O: u8> =
626 crate::BitWriter<'a, u32, INTEN_SPEC, AUTOCOLRESSTARTED_A, O>;
627impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> {
628 #[doc = "Disable"]
629 #[inline(always)]
630 pub fn disabled(self) -> &'a mut W {
631 self.variant(AUTOCOLRESSTARTED_A::DISABLED)
632 }
633 #[doc = "Enable"]
634 #[inline(always)]
635 pub fn enabled(self) -> &'a mut W {
636 self.variant(AUTOCOLRESSTARTED_A::ENABLED)
637 }
638}
639#[doc = "Field `COLLISION` reader - Enable or disable interrupt for COLLISION event"]
640pub type COLLISION_R = crate::BitReader<COLLISION_A>;
641#[doc = "Enable or disable interrupt for COLLISION event\n\nValue on reset: 0"]
642#[derive(Clone, Copy, Debug, PartialEq)]
643pub enum COLLISION_A {
644 #[doc = "0: Disable"]
645 DISABLED = 0,
646 #[doc = "1: Enable"]
647 ENABLED = 1,
648}
649impl From<COLLISION_A> for bool {
650 #[inline(always)]
651 fn from(variant: COLLISION_A) -> Self {
652 variant as u8 != 0
653 }
654}
655impl COLLISION_R {
656 #[doc = "Get enumerated values variant"]
657 #[inline(always)]
658 pub fn variant(&self) -> COLLISION_A {
659 match self.bits {
660 false => COLLISION_A::DISABLED,
661 true => COLLISION_A::ENABLED,
662 }
663 }
664 #[doc = "Checks if the value of the field is `DISABLED`"]
665 #[inline(always)]
666 pub fn is_disabled(&self) -> bool {
667 *self == COLLISION_A::DISABLED
668 }
669 #[doc = "Checks if the value of the field is `ENABLED`"]
670 #[inline(always)]
671 pub fn is_enabled(&self) -> bool {
672 *self == COLLISION_A::ENABLED
673 }
674}
675#[doc = "Field `COLLISION` writer - Enable or disable interrupt for COLLISION event"]
676pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, COLLISION_A, O>;
677impl<'a, const O: u8> COLLISION_W<'a, O> {
678 #[doc = "Disable"]
679 #[inline(always)]
680 pub fn disabled(self) -> &'a mut W {
681 self.variant(COLLISION_A::DISABLED)
682 }
683 #[doc = "Enable"]
684 #[inline(always)]
685 pub fn enabled(self) -> &'a mut W {
686 self.variant(COLLISION_A::ENABLED)
687 }
688}
689#[doc = "Field `SELECTED` reader - Enable or disable interrupt for SELECTED event"]
690pub type SELECTED_R = crate::BitReader<SELECTED_A>;
691#[doc = "Enable or disable interrupt for SELECTED event\n\nValue on reset: 0"]
692#[derive(Clone, Copy, Debug, PartialEq)]
693pub enum SELECTED_A {
694 #[doc = "0: Disable"]
695 DISABLED = 0,
696 #[doc = "1: Enable"]
697 ENABLED = 1,
698}
699impl From<SELECTED_A> for bool {
700 #[inline(always)]
701 fn from(variant: SELECTED_A) -> Self {
702 variant as u8 != 0
703 }
704}
705impl SELECTED_R {
706 #[doc = "Get enumerated values variant"]
707 #[inline(always)]
708 pub fn variant(&self) -> SELECTED_A {
709 match self.bits {
710 false => SELECTED_A::DISABLED,
711 true => SELECTED_A::ENABLED,
712 }
713 }
714 #[doc = "Checks if the value of the field is `DISABLED`"]
715 #[inline(always)]
716 pub fn is_disabled(&self) -> bool {
717 *self == SELECTED_A::DISABLED
718 }
719 #[doc = "Checks if the value of the field is `ENABLED`"]
720 #[inline(always)]
721 pub fn is_enabled(&self) -> bool {
722 *self == SELECTED_A::ENABLED
723 }
724}
725#[doc = "Field `SELECTED` writer - Enable or disable interrupt for SELECTED event"]
726pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SELECTED_A, O>;
727impl<'a, const O: u8> SELECTED_W<'a, O> {
728 #[doc = "Disable"]
729 #[inline(always)]
730 pub fn disabled(self) -> &'a mut W {
731 self.variant(SELECTED_A::DISABLED)
732 }
733 #[doc = "Enable"]
734 #[inline(always)]
735 pub fn enabled(self) -> &'a mut W {
736 self.variant(SELECTED_A::ENABLED)
737 }
738}
739#[doc = "Field `STARTED` reader - Enable or disable interrupt for STARTED event"]
740pub type STARTED_R = crate::BitReader<STARTED_A>;
741#[doc = "Enable or disable interrupt for STARTED event\n\nValue on reset: 0"]
742#[derive(Clone, Copy, Debug, PartialEq)]
743pub enum STARTED_A {
744 #[doc = "0: Disable"]
745 DISABLED = 0,
746 #[doc = "1: Enable"]
747 ENABLED = 1,
748}
749impl From<STARTED_A> for bool {
750 #[inline(always)]
751 fn from(variant: STARTED_A) -> Self {
752 variant as u8 != 0
753 }
754}
755impl STARTED_R {
756 #[doc = "Get enumerated values variant"]
757 #[inline(always)]
758 pub fn variant(&self) -> STARTED_A {
759 match self.bits {
760 false => STARTED_A::DISABLED,
761 true => STARTED_A::ENABLED,
762 }
763 }
764 #[doc = "Checks if the value of the field is `DISABLED`"]
765 #[inline(always)]
766 pub fn is_disabled(&self) -> bool {
767 *self == STARTED_A::DISABLED
768 }
769 #[doc = "Checks if the value of the field is `ENABLED`"]
770 #[inline(always)]
771 pub fn is_enabled(&self) -> bool {
772 *self == STARTED_A::ENABLED
773 }
774}
775#[doc = "Field `STARTED` writer - Enable or disable interrupt for STARTED event"]
776pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>;
777impl<'a, const O: u8> STARTED_W<'a, O> {
778 #[doc = "Disable"]
779 #[inline(always)]
780 pub fn disabled(self) -> &'a mut W {
781 self.variant(STARTED_A::DISABLED)
782 }
783 #[doc = "Enable"]
784 #[inline(always)]
785 pub fn enabled(self) -> &'a mut W {
786 self.variant(STARTED_A::ENABLED)
787 }
788}
789impl R {
790 #[doc = "Bit 0 - Enable or disable interrupt for READY event"]
791 #[inline(always)]
792 pub fn ready(&self) -> READY_R {
793 READY_R::new((self.bits & 1) != 0)
794 }
795 #[doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event"]
796 #[inline(always)]
797 pub fn fielddetected(&self) -> FIELDDETECTED_R {
798 FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0)
799 }
800 #[doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event"]
801 #[inline(always)]
802 pub fn fieldlost(&self) -> FIELDLOST_R {
803 FIELDLOST_R::new(((self.bits >> 2) & 1) != 0)
804 }
805 #[doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event"]
806 #[inline(always)]
807 pub fn txframestart(&self) -> TXFRAMESTART_R {
808 TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0)
809 }
810 #[doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event"]
811 #[inline(always)]
812 pub fn txframeend(&self) -> TXFRAMEEND_R {
813 TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0)
814 }
815 #[doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event"]
816 #[inline(always)]
817 pub fn rxframestart(&self) -> RXFRAMESTART_R {
818 RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0)
819 }
820 #[doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event"]
821 #[inline(always)]
822 pub fn rxframeend(&self) -> RXFRAMEEND_R {
823 RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0)
824 }
825 #[doc = "Bit 7 - Enable or disable interrupt for ERROR event"]
826 #[inline(always)]
827 pub fn error(&self) -> ERROR_R {
828 ERROR_R::new(((self.bits >> 7) & 1) != 0)
829 }
830 #[doc = "Bit 10 - Enable or disable interrupt for RXERROR event"]
831 #[inline(always)]
832 pub fn rxerror(&self) -> RXERROR_R {
833 RXERROR_R::new(((self.bits >> 10) & 1) != 0)
834 }
835 #[doc = "Bit 11 - Enable or disable interrupt for ENDRX event"]
836 #[inline(always)]
837 pub fn endrx(&self) -> ENDRX_R {
838 ENDRX_R::new(((self.bits >> 11) & 1) != 0)
839 }
840 #[doc = "Bit 12 - Enable or disable interrupt for ENDTX event"]
841 #[inline(always)]
842 pub fn endtx(&self) -> ENDTX_R {
843 ENDTX_R::new(((self.bits >> 12) & 1) != 0)
844 }
845 #[doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
846 #[inline(always)]
847 pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R {
848 AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0)
849 }
850 #[doc = "Bit 18 - Enable or disable interrupt for COLLISION event"]
851 #[inline(always)]
852 pub fn collision(&self) -> COLLISION_R {
853 COLLISION_R::new(((self.bits >> 18) & 1) != 0)
854 }
855 #[doc = "Bit 19 - Enable or disable interrupt for SELECTED event"]
856 #[inline(always)]
857 pub fn selected(&self) -> SELECTED_R {
858 SELECTED_R::new(((self.bits >> 19) & 1) != 0)
859 }
860 #[doc = "Bit 20 - Enable or disable interrupt for STARTED event"]
861 #[inline(always)]
862 pub fn started(&self) -> STARTED_R {
863 STARTED_R::new(((self.bits >> 20) & 1) != 0)
864 }
865}
866impl W {
867 #[doc = "Bit 0 - Enable or disable interrupt for READY event"]
868 #[inline(always)]
869 pub fn ready(&mut self) -> READY_W<0> {
870 READY_W::new(self)
871 }
872 #[doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event"]
873 #[inline(always)]
874 pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> {
875 FIELDDETECTED_W::new(self)
876 }
877 #[doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event"]
878 #[inline(always)]
879 pub fn fieldlost(&mut self) -> FIELDLOST_W<2> {
880 FIELDLOST_W::new(self)
881 }
882 #[doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event"]
883 #[inline(always)]
884 pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> {
885 TXFRAMESTART_W::new(self)
886 }
887 #[doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event"]
888 #[inline(always)]
889 pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> {
890 TXFRAMEEND_W::new(self)
891 }
892 #[doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event"]
893 #[inline(always)]
894 pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> {
895 RXFRAMESTART_W::new(self)
896 }
897 #[doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event"]
898 #[inline(always)]
899 pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> {
900 RXFRAMEEND_W::new(self)
901 }
902 #[doc = "Bit 7 - Enable or disable interrupt for ERROR event"]
903 #[inline(always)]
904 pub fn error(&mut self) -> ERROR_W<7> {
905 ERROR_W::new(self)
906 }
907 #[doc = "Bit 10 - Enable or disable interrupt for RXERROR event"]
908 #[inline(always)]
909 pub fn rxerror(&mut self) -> RXERROR_W<10> {
910 RXERROR_W::new(self)
911 }
912 #[doc = "Bit 11 - Enable or disable interrupt for ENDRX event"]
913 #[inline(always)]
914 pub fn endrx(&mut self) -> ENDRX_W<11> {
915 ENDRX_W::new(self)
916 }
917 #[doc = "Bit 12 - Enable or disable interrupt for ENDTX event"]
918 #[inline(always)]
919 pub fn endtx(&mut self) -> ENDTX_W<12> {
920 ENDTX_W::new(self)
921 }
922 #[doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
923 #[inline(always)]
924 pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> {
925 AUTOCOLRESSTARTED_W::new(self)
926 }
927 #[doc = "Bit 18 - Enable or disable interrupt for COLLISION event"]
928 #[inline(always)]
929 pub fn collision(&mut self) -> COLLISION_W<18> {
930 COLLISION_W::new(self)
931 }
932 #[doc = "Bit 19 - Enable or disable interrupt for SELECTED event"]
933 #[inline(always)]
934 pub fn selected(&mut self) -> SELECTED_W<19> {
935 SELECTED_W::new(self)
936 }
937 #[doc = "Bit 20 - Enable or disable interrupt for STARTED event"]
938 #[inline(always)]
939 pub fn started(&mut self) -> STARTED_W<20> {
940 STARTED_W::new(self)
941 }
942 #[doc = "Writes raw bits to the register."]
943 #[inline(always)]
944 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
945 self.0.bits(bits);
946 self
947 }
948}
949#[doc = "Enable or disable interrupt\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 [inten](index.html) module"]
950pub struct INTEN_SPEC;
951impl crate::RegisterSpec for INTEN_SPEC {
952 type Ux = u32;
953}
954#[doc = "`read()` method returns [inten::R](R) reader structure"]
955impl crate::Readable for INTEN_SPEC {
956 type Reader = R;
957}
958#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
959impl crate::Writable for INTEN_SPEC {
960 type Writer = W;
961}
962#[doc = "`reset()` method sets INTEN to value 0"]
963impl crate::Resettable for INTEN_SPEC {
964 #[inline(always)]
965 fn reset_value() -> Self::Ux {
966 0
967 }
968}