lpc550x/adc0/
swtrig.rs

1#[doc = "Register `SWTRIG` reader"]
2pub struct R(crate::R<SWTRIG_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SWTRIG_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SWTRIG_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SWTRIG_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SWTRIG` writer"]
17pub struct W(crate::W<SWTRIG_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SWTRIG_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<SWTRIG_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SWTRIG_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `SWT0` reader - Software trigger 0 event."]
38pub type SWT0_R = crate::BitReader<SWT0_A>;
39#[doc = "Software trigger 0 event.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum SWT0_A {
42    #[doc = "0: No trigger 0 event generated."]
43    SWT0_0 = 0,
44    #[doc = "1: Trigger 0 event generated."]
45    SWT0_1 = 1,
46}
47impl From<SWT0_A> for bool {
48    #[inline(always)]
49    fn from(variant: SWT0_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl SWT0_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> SWT0_A {
57        match self.bits {
58            false => SWT0_A::SWT0_0,
59            true => SWT0_A::SWT0_1,
60        }
61    }
62    #[doc = "Checks if the value of the field is `SWT0_0`"]
63    #[inline(always)]
64    pub fn is_swt0_0(&self) -> bool {
65        *self == SWT0_A::SWT0_0
66    }
67    #[doc = "Checks if the value of the field is `SWT0_1`"]
68    #[inline(always)]
69    pub fn is_swt0_1(&self) -> bool {
70        *self == SWT0_A::SWT0_1
71    }
72}
73#[doc = "Field `SWT0` writer - Software trigger 0 event."]
74pub type SWT0_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT0_A, O>;
75impl<'a, const O: u8> SWT0_W<'a, O> {
76    #[doc = "No trigger 0 event generated."]
77    #[inline(always)]
78    pub fn swt0_0(self) -> &'a mut W {
79        self.variant(SWT0_A::SWT0_0)
80    }
81    #[doc = "Trigger 0 event generated."]
82    #[inline(always)]
83    pub fn swt0_1(self) -> &'a mut W {
84        self.variant(SWT0_A::SWT0_1)
85    }
86}
87#[doc = "Field `SWT1` reader - Software trigger 1 event."]
88pub type SWT1_R = crate::BitReader<SWT1_A>;
89#[doc = "Software trigger 1 event.\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum SWT1_A {
92    #[doc = "0: No trigger 1 event generated."]
93    SWT1_0 = 0,
94    #[doc = "1: Trigger 1 event generated."]
95    SWT1_1 = 1,
96}
97impl From<SWT1_A> for bool {
98    #[inline(always)]
99    fn from(variant: SWT1_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl SWT1_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> SWT1_A {
107        match self.bits {
108            false => SWT1_A::SWT1_0,
109            true => SWT1_A::SWT1_1,
110        }
111    }
112    #[doc = "Checks if the value of the field is `SWT1_0`"]
113    #[inline(always)]
114    pub fn is_swt1_0(&self) -> bool {
115        *self == SWT1_A::SWT1_0
116    }
117    #[doc = "Checks if the value of the field is `SWT1_1`"]
118    #[inline(always)]
119    pub fn is_swt1_1(&self) -> bool {
120        *self == SWT1_A::SWT1_1
121    }
122}
123#[doc = "Field `SWT1` writer - Software trigger 1 event."]
124pub type SWT1_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT1_A, O>;
125impl<'a, const O: u8> SWT1_W<'a, O> {
126    #[doc = "No trigger 1 event generated."]
127    #[inline(always)]
128    pub fn swt1_0(self) -> &'a mut W {
129        self.variant(SWT1_A::SWT1_0)
130    }
131    #[doc = "Trigger 1 event generated."]
132    #[inline(always)]
133    pub fn swt1_1(self) -> &'a mut W {
134        self.variant(SWT1_A::SWT1_1)
135    }
136}
137#[doc = "Field `SWT2` reader - Software trigger 2 event."]
138pub type SWT2_R = crate::BitReader<SWT2_A>;
139#[doc = "Software trigger 2 event.\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum SWT2_A {
142    #[doc = "0: No trigger 2 event generated."]
143    SWT2_0 = 0,
144    #[doc = "1: Trigger 2 event generated."]
145    SWT2_1 = 1,
146}
147impl From<SWT2_A> for bool {
148    #[inline(always)]
149    fn from(variant: SWT2_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl SWT2_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> SWT2_A {
157        match self.bits {
158            false => SWT2_A::SWT2_0,
159            true => SWT2_A::SWT2_1,
160        }
161    }
162    #[doc = "Checks if the value of the field is `SWT2_0`"]
163    #[inline(always)]
164    pub fn is_swt2_0(&self) -> bool {
165        *self == SWT2_A::SWT2_0
166    }
167    #[doc = "Checks if the value of the field is `SWT2_1`"]
168    #[inline(always)]
169    pub fn is_swt2_1(&self) -> bool {
170        *self == SWT2_A::SWT2_1
171    }
172}
173#[doc = "Field `SWT2` writer - Software trigger 2 event."]
174pub type SWT2_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT2_A, O>;
175impl<'a, const O: u8> SWT2_W<'a, O> {
176    #[doc = "No trigger 2 event generated."]
177    #[inline(always)]
178    pub fn swt2_0(self) -> &'a mut W {
179        self.variant(SWT2_A::SWT2_0)
180    }
181    #[doc = "Trigger 2 event generated."]
182    #[inline(always)]
183    pub fn swt2_1(self) -> &'a mut W {
184        self.variant(SWT2_A::SWT2_1)
185    }
186}
187#[doc = "Field `SWT3` reader - Software trigger 3 event."]
188pub type SWT3_R = crate::BitReader<SWT3_A>;
189#[doc = "Software trigger 3 event.\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum SWT3_A {
192    #[doc = "0: No trigger 3 event generated."]
193    SWT3_0 = 0,
194    #[doc = "1: Trigger 3 event generated."]
195    SWT3_1 = 1,
196}
197impl From<SWT3_A> for bool {
198    #[inline(always)]
199    fn from(variant: SWT3_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl SWT3_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> SWT3_A {
207        match self.bits {
208            false => SWT3_A::SWT3_0,
209            true => SWT3_A::SWT3_1,
210        }
211    }
212    #[doc = "Checks if the value of the field is `SWT3_0`"]
213    #[inline(always)]
214    pub fn is_swt3_0(&self) -> bool {
215        *self == SWT3_A::SWT3_0
216    }
217    #[doc = "Checks if the value of the field is `SWT3_1`"]
218    #[inline(always)]
219    pub fn is_swt3_1(&self) -> bool {
220        *self == SWT3_A::SWT3_1
221    }
222}
223#[doc = "Field `SWT3` writer - Software trigger 3 event."]
224pub type SWT3_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT3_A, O>;
225impl<'a, const O: u8> SWT3_W<'a, O> {
226    #[doc = "No trigger 3 event generated."]
227    #[inline(always)]
228    pub fn swt3_0(self) -> &'a mut W {
229        self.variant(SWT3_A::SWT3_0)
230    }
231    #[doc = "Trigger 3 event generated."]
232    #[inline(always)]
233    pub fn swt3_1(self) -> &'a mut W {
234        self.variant(SWT3_A::SWT3_1)
235    }
236}
237#[doc = "Field `SWT4` reader - Software trigger 4 event."]
238pub type SWT4_R = crate::BitReader<SWT4_A>;
239#[doc = "Software trigger 4 event.\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241pub enum SWT4_A {
242    #[doc = "0: No trigger 4 event generated."]
243    SWT4_0 = 0,
244    #[doc = "1: Trigger 4 event generated."]
245    SWT4_1 = 1,
246}
247impl From<SWT4_A> for bool {
248    #[inline(always)]
249    fn from(variant: SWT4_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl SWT4_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> SWT4_A {
257        match self.bits {
258            false => SWT4_A::SWT4_0,
259            true => SWT4_A::SWT4_1,
260        }
261    }
262    #[doc = "Checks if the value of the field is `SWT4_0`"]
263    #[inline(always)]
264    pub fn is_swt4_0(&self) -> bool {
265        *self == SWT4_A::SWT4_0
266    }
267    #[doc = "Checks if the value of the field is `SWT4_1`"]
268    #[inline(always)]
269    pub fn is_swt4_1(&self) -> bool {
270        *self == SWT4_A::SWT4_1
271    }
272}
273#[doc = "Field `SWT4` writer - Software trigger 4 event."]
274pub type SWT4_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT4_A, O>;
275impl<'a, const O: u8> SWT4_W<'a, O> {
276    #[doc = "No trigger 4 event generated."]
277    #[inline(always)]
278    pub fn swt4_0(self) -> &'a mut W {
279        self.variant(SWT4_A::SWT4_0)
280    }
281    #[doc = "Trigger 4 event generated."]
282    #[inline(always)]
283    pub fn swt4_1(self) -> &'a mut W {
284        self.variant(SWT4_A::SWT4_1)
285    }
286}
287#[doc = "Field `SWT5` reader - Software trigger 5 event."]
288pub type SWT5_R = crate::BitReader<SWT5_A>;
289#[doc = "Software trigger 5 event.\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291pub enum SWT5_A {
292    #[doc = "0: No trigger 5 event generated."]
293    SWT5_0 = 0,
294    #[doc = "1: Trigger 5 event generated."]
295    SWT5_1 = 1,
296}
297impl From<SWT5_A> for bool {
298    #[inline(always)]
299    fn from(variant: SWT5_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl SWT5_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> SWT5_A {
307        match self.bits {
308            false => SWT5_A::SWT5_0,
309            true => SWT5_A::SWT5_1,
310        }
311    }
312    #[doc = "Checks if the value of the field is `SWT5_0`"]
313    #[inline(always)]
314    pub fn is_swt5_0(&self) -> bool {
315        *self == SWT5_A::SWT5_0
316    }
317    #[doc = "Checks if the value of the field is `SWT5_1`"]
318    #[inline(always)]
319    pub fn is_swt5_1(&self) -> bool {
320        *self == SWT5_A::SWT5_1
321    }
322}
323#[doc = "Field `SWT5` writer - Software trigger 5 event."]
324pub type SWT5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT5_A, O>;
325impl<'a, const O: u8> SWT5_W<'a, O> {
326    #[doc = "No trigger 5 event generated."]
327    #[inline(always)]
328    pub fn swt5_0(self) -> &'a mut W {
329        self.variant(SWT5_A::SWT5_0)
330    }
331    #[doc = "Trigger 5 event generated."]
332    #[inline(always)]
333    pub fn swt5_1(self) -> &'a mut W {
334        self.variant(SWT5_A::SWT5_1)
335    }
336}
337#[doc = "Field `SWT6` reader - Software trigger 6 event."]
338pub type SWT6_R = crate::BitReader<SWT6_A>;
339#[doc = "Software trigger 6 event.\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq, Eq)]
341pub enum SWT6_A {
342    #[doc = "0: No trigger 6 event generated."]
343    SWT6_0 = 0,
344    #[doc = "1: Trigger 6 event generated."]
345    SWT6_1 = 1,
346}
347impl From<SWT6_A> for bool {
348    #[inline(always)]
349    fn from(variant: SWT6_A) -> Self {
350        variant as u8 != 0
351    }
352}
353impl SWT6_R {
354    #[doc = "Get enumerated values variant"]
355    #[inline(always)]
356    pub fn variant(&self) -> SWT6_A {
357        match self.bits {
358            false => SWT6_A::SWT6_0,
359            true => SWT6_A::SWT6_1,
360        }
361    }
362    #[doc = "Checks if the value of the field is `SWT6_0`"]
363    #[inline(always)]
364    pub fn is_swt6_0(&self) -> bool {
365        *self == SWT6_A::SWT6_0
366    }
367    #[doc = "Checks if the value of the field is `SWT6_1`"]
368    #[inline(always)]
369    pub fn is_swt6_1(&self) -> bool {
370        *self == SWT6_A::SWT6_1
371    }
372}
373#[doc = "Field `SWT6` writer - Software trigger 6 event."]
374pub type SWT6_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT6_A, O>;
375impl<'a, const O: u8> SWT6_W<'a, O> {
376    #[doc = "No trigger 6 event generated."]
377    #[inline(always)]
378    pub fn swt6_0(self) -> &'a mut W {
379        self.variant(SWT6_A::SWT6_0)
380    }
381    #[doc = "Trigger 6 event generated."]
382    #[inline(always)]
383    pub fn swt6_1(self) -> &'a mut W {
384        self.variant(SWT6_A::SWT6_1)
385    }
386}
387#[doc = "Field `SWT7` reader - Software trigger 7 event."]
388pub type SWT7_R = crate::BitReader<SWT7_A>;
389#[doc = "Software trigger 7 event.\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq, Eq)]
391pub enum SWT7_A {
392    #[doc = "0: No trigger 7 event generated."]
393    SWT7_0 = 0,
394    #[doc = "1: Trigger 7 event generated."]
395    SWT7_1 = 1,
396}
397impl From<SWT7_A> for bool {
398    #[inline(always)]
399    fn from(variant: SWT7_A) -> Self {
400        variant as u8 != 0
401    }
402}
403impl SWT7_R {
404    #[doc = "Get enumerated values variant"]
405    #[inline(always)]
406    pub fn variant(&self) -> SWT7_A {
407        match self.bits {
408            false => SWT7_A::SWT7_0,
409            true => SWT7_A::SWT7_1,
410        }
411    }
412    #[doc = "Checks if the value of the field is `SWT7_0`"]
413    #[inline(always)]
414    pub fn is_swt7_0(&self) -> bool {
415        *self == SWT7_A::SWT7_0
416    }
417    #[doc = "Checks if the value of the field is `SWT7_1`"]
418    #[inline(always)]
419    pub fn is_swt7_1(&self) -> bool {
420        *self == SWT7_A::SWT7_1
421    }
422}
423#[doc = "Field `SWT7` writer - Software trigger 7 event."]
424pub type SWT7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT7_A, O>;
425impl<'a, const O: u8> SWT7_W<'a, O> {
426    #[doc = "No trigger 7 event generated."]
427    #[inline(always)]
428    pub fn swt7_0(self) -> &'a mut W {
429        self.variant(SWT7_A::SWT7_0)
430    }
431    #[doc = "Trigger 7 event generated."]
432    #[inline(always)]
433    pub fn swt7_1(self) -> &'a mut W {
434        self.variant(SWT7_A::SWT7_1)
435    }
436}
437#[doc = "Field `SWT8` reader - Software trigger 8 event."]
438pub type SWT8_R = crate::BitReader<SWT8_A>;
439#[doc = "Software trigger 8 event.\n\nValue on reset: 0"]
440#[derive(Clone, Copy, Debug, PartialEq, Eq)]
441pub enum SWT8_A {
442    #[doc = "0: No trigger 8 event generated."]
443    SWT8_0 = 0,
444    #[doc = "1: Trigger 8 event generated."]
445    SWT8_1 = 1,
446}
447impl From<SWT8_A> for bool {
448    #[inline(always)]
449    fn from(variant: SWT8_A) -> Self {
450        variant as u8 != 0
451    }
452}
453impl SWT8_R {
454    #[doc = "Get enumerated values variant"]
455    #[inline(always)]
456    pub fn variant(&self) -> SWT8_A {
457        match self.bits {
458            false => SWT8_A::SWT8_0,
459            true => SWT8_A::SWT8_1,
460        }
461    }
462    #[doc = "Checks if the value of the field is `SWT8_0`"]
463    #[inline(always)]
464    pub fn is_swt8_0(&self) -> bool {
465        *self == SWT8_A::SWT8_0
466    }
467    #[doc = "Checks if the value of the field is `SWT8_1`"]
468    #[inline(always)]
469    pub fn is_swt8_1(&self) -> bool {
470        *self == SWT8_A::SWT8_1
471    }
472}
473#[doc = "Field `SWT8` writer - Software trigger 8 event."]
474pub type SWT8_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT8_A, O>;
475impl<'a, const O: u8> SWT8_W<'a, O> {
476    #[doc = "No trigger 8 event generated."]
477    #[inline(always)]
478    pub fn swt8_0(self) -> &'a mut W {
479        self.variant(SWT8_A::SWT8_0)
480    }
481    #[doc = "Trigger 8 event generated."]
482    #[inline(always)]
483    pub fn swt8_1(self) -> &'a mut W {
484        self.variant(SWT8_A::SWT8_1)
485    }
486}
487#[doc = "Field `SWT9` reader - Software trigger 9 event."]
488pub type SWT9_R = crate::BitReader<SWT9_A>;
489#[doc = "Software trigger 9 event.\n\nValue on reset: 0"]
490#[derive(Clone, Copy, Debug, PartialEq, Eq)]
491pub enum SWT9_A {
492    #[doc = "0: No trigger 9 event generated."]
493    SWT9_0 = 0,
494    #[doc = "1: Trigger 9 event generated."]
495    SWT9_1 = 1,
496}
497impl From<SWT9_A> for bool {
498    #[inline(always)]
499    fn from(variant: SWT9_A) -> Self {
500        variant as u8 != 0
501    }
502}
503impl SWT9_R {
504    #[doc = "Get enumerated values variant"]
505    #[inline(always)]
506    pub fn variant(&self) -> SWT9_A {
507        match self.bits {
508            false => SWT9_A::SWT9_0,
509            true => SWT9_A::SWT9_1,
510        }
511    }
512    #[doc = "Checks if the value of the field is `SWT9_0`"]
513    #[inline(always)]
514    pub fn is_swt9_0(&self) -> bool {
515        *self == SWT9_A::SWT9_0
516    }
517    #[doc = "Checks if the value of the field is `SWT9_1`"]
518    #[inline(always)]
519    pub fn is_swt9_1(&self) -> bool {
520        *self == SWT9_A::SWT9_1
521    }
522}
523#[doc = "Field `SWT9` writer - Software trigger 9 event."]
524pub type SWT9_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT9_A, O>;
525impl<'a, const O: u8> SWT9_W<'a, O> {
526    #[doc = "No trigger 9 event generated."]
527    #[inline(always)]
528    pub fn swt9_0(self) -> &'a mut W {
529        self.variant(SWT9_A::SWT9_0)
530    }
531    #[doc = "Trigger 9 event generated."]
532    #[inline(always)]
533    pub fn swt9_1(self) -> &'a mut W {
534        self.variant(SWT9_A::SWT9_1)
535    }
536}
537#[doc = "Field `SWT10` reader - Software trigger 10 event."]
538pub type SWT10_R = crate::BitReader<SWT10_A>;
539#[doc = "Software trigger 10 event.\n\nValue on reset: 0"]
540#[derive(Clone, Copy, Debug, PartialEq, Eq)]
541pub enum SWT10_A {
542    #[doc = "0: No trigger 10 event generated."]
543    SWT10_0 = 0,
544    #[doc = "1: Trigger 10 event generated."]
545    SWT10_1 = 1,
546}
547impl From<SWT10_A> for bool {
548    #[inline(always)]
549    fn from(variant: SWT10_A) -> Self {
550        variant as u8 != 0
551    }
552}
553impl SWT10_R {
554    #[doc = "Get enumerated values variant"]
555    #[inline(always)]
556    pub fn variant(&self) -> SWT10_A {
557        match self.bits {
558            false => SWT10_A::SWT10_0,
559            true => SWT10_A::SWT10_1,
560        }
561    }
562    #[doc = "Checks if the value of the field is `SWT10_0`"]
563    #[inline(always)]
564    pub fn is_swt10_0(&self) -> bool {
565        *self == SWT10_A::SWT10_0
566    }
567    #[doc = "Checks if the value of the field is `SWT10_1`"]
568    #[inline(always)]
569    pub fn is_swt10_1(&self) -> bool {
570        *self == SWT10_A::SWT10_1
571    }
572}
573#[doc = "Field `SWT10` writer - Software trigger 10 event."]
574pub type SWT10_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT10_A, O>;
575impl<'a, const O: u8> SWT10_W<'a, O> {
576    #[doc = "No trigger 10 event generated."]
577    #[inline(always)]
578    pub fn swt10_0(self) -> &'a mut W {
579        self.variant(SWT10_A::SWT10_0)
580    }
581    #[doc = "Trigger 10 event generated."]
582    #[inline(always)]
583    pub fn swt10_1(self) -> &'a mut W {
584        self.variant(SWT10_A::SWT10_1)
585    }
586}
587#[doc = "Field `SWT11` reader - Software trigger 11 event."]
588pub type SWT11_R = crate::BitReader<SWT11_A>;
589#[doc = "Software trigger 11 event.\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq, Eq)]
591pub enum SWT11_A {
592    #[doc = "0: No trigger 11 event generated."]
593    SWT11_0 = 0,
594    #[doc = "1: Trigger 11 event generated."]
595    SWT11_1 = 1,
596}
597impl From<SWT11_A> for bool {
598    #[inline(always)]
599    fn from(variant: SWT11_A) -> Self {
600        variant as u8 != 0
601    }
602}
603impl SWT11_R {
604    #[doc = "Get enumerated values variant"]
605    #[inline(always)]
606    pub fn variant(&self) -> SWT11_A {
607        match self.bits {
608            false => SWT11_A::SWT11_0,
609            true => SWT11_A::SWT11_1,
610        }
611    }
612    #[doc = "Checks if the value of the field is `SWT11_0`"]
613    #[inline(always)]
614    pub fn is_swt11_0(&self) -> bool {
615        *self == SWT11_A::SWT11_0
616    }
617    #[doc = "Checks if the value of the field is `SWT11_1`"]
618    #[inline(always)]
619    pub fn is_swt11_1(&self) -> bool {
620        *self == SWT11_A::SWT11_1
621    }
622}
623#[doc = "Field `SWT11` writer - Software trigger 11 event."]
624pub type SWT11_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT11_A, O>;
625impl<'a, const O: u8> SWT11_W<'a, O> {
626    #[doc = "No trigger 11 event generated."]
627    #[inline(always)]
628    pub fn swt11_0(self) -> &'a mut W {
629        self.variant(SWT11_A::SWT11_0)
630    }
631    #[doc = "Trigger 11 event generated."]
632    #[inline(always)]
633    pub fn swt11_1(self) -> &'a mut W {
634        self.variant(SWT11_A::SWT11_1)
635    }
636}
637#[doc = "Field `SWT12` reader - Software trigger 12 event."]
638pub type SWT12_R = crate::BitReader<SWT12_A>;
639#[doc = "Software trigger 12 event.\n\nValue on reset: 0"]
640#[derive(Clone, Copy, Debug, PartialEq, Eq)]
641pub enum SWT12_A {
642    #[doc = "0: No trigger 12 event generated."]
643    SWT12_0 = 0,
644    #[doc = "1: Trigger 12 event generated."]
645    SWT12_1 = 1,
646}
647impl From<SWT12_A> for bool {
648    #[inline(always)]
649    fn from(variant: SWT12_A) -> Self {
650        variant as u8 != 0
651    }
652}
653impl SWT12_R {
654    #[doc = "Get enumerated values variant"]
655    #[inline(always)]
656    pub fn variant(&self) -> SWT12_A {
657        match self.bits {
658            false => SWT12_A::SWT12_0,
659            true => SWT12_A::SWT12_1,
660        }
661    }
662    #[doc = "Checks if the value of the field is `SWT12_0`"]
663    #[inline(always)]
664    pub fn is_swt12_0(&self) -> bool {
665        *self == SWT12_A::SWT12_0
666    }
667    #[doc = "Checks if the value of the field is `SWT12_1`"]
668    #[inline(always)]
669    pub fn is_swt12_1(&self) -> bool {
670        *self == SWT12_A::SWT12_1
671    }
672}
673#[doc = "Field `SWT12` writer - Software trigger 12 event."]
674pub type SWT12_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT12_A, O>;
675impl<'a, const O: u8> SWT12_W<'a, O> {
676    #[doc = "No trigger 12 event generated."]
677    #[inline(always)]
678    pub fn swt12_0(self) -> &'a mut W {
679        self.variant(SWT12_A::SWT12_0)
680    }
681    #[doc = "Trigger 12 event generated."]
682    #[inline(always)]
683    pub fn swt12_1(self) -> &'a mut W {
684        self.variant(SWT12_A::SWT12_1)
685    }
686}
687#[doc = "Field `SWT13` reader - Software trigger 13 event."]
688pub type SWT13_R = crate::BitReader<SWT13_A>;
689#[doc = "Software trigger 13 event.\n\nValue on reset: 0"]
690#[derive(Clone, Copy, Debug, PartialEq, Eq)]
691pub enum SWT13_A {
692    #[doc = "0: No trigger 13 event generated."]
693    SWT13_0 = 0,
694    #[doc = "1: Trigger 13 event generated."]
695    SWT13_1 = 1,
696}
697impl From<SWT13_A> for bool {
698    #[inline(always)]
699    fn from(variant: SWT13_A) -> Self {
700        variant as u8 != 0
701    }
702}
703impl SWT13_R {
704    #[doc = "Get enumerated values variant"]
705    #[inline(always)]
706    pub fn variant(&self) -> SWT13_A {
707        match self.bits {
708            false => SWT13_A::SWT13_0,
709            true => SWT13_A::SWT13_1,
710        }
711    }
712    #[doc = "Checks if the value of the field is `SWT13_0`"]
713    #[inline(always)]
714    pub fn is_swt13_0(&self) -> bool {
715        *self == SWT13_A::SWT13_0
716    }
717    #[doc = "Checks if the value of the field is `SWT13_1`"]
718    #[inline(always)]
719    pub fn is_swt13_1(&self) -> bool {
720        *self == SWT13_A::SWT13_1
721    }
722}
723#[doc = "Field `SWT13` writer - Software trigger 13 event."]
724pub type SWT13_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT13_A, O>;
725impl<'a, const O: u8> SWT13_W<'a, O> {
726    #[doc = "No trigger 13 event generated."]
727    #[inline(always)]
728    pub fn swt13_0(self) -> &'a mut W {
729        self.variant(SWT13_A::SWT13_0)
730    }
731    #[doc = "Trigger 13 event generated."]
732    #[inline(always)]
733    pub fn swt13_1(self) -> &'a mut W {
734        self.variant(SWT13_A::SWT13_1)
735    }
736}
737#[doc = "Field `SWT14` reader - Software trigger 14 event."]
738pub type SWT14_R = crate::BitReader<SWT14_A>;
739#[doc = "Software trigger 14 event.\n\nValue on reset: 0"]
740#[derive(Clone, Copy, Debug, PartialEq, Eq)]
741pub enum SWT14_A {
742    #[doc = "0: No trigger 14 event generated."]
743    SWT14_0 = 0,
744    #[doc = "1: Trigger 14 event generated."]
745    SWT14_1 = 1,
746}
747impl From<SWT14_A> for bool {
748    #[inline(always)]
749    fn from(variant: SWT14_A) -> Self {
750        variant as u8 != 0
751    }
752}
753impl SWT14_R {
754    #[doc = "Get enumerated values variant"]
755    #[inline(always)]
756    pub fn variant(&self) -> SWT14_A {
757        match self.bits {
758            false => SWT14_A::SWT14_0,
759            true => SWT14_A::SWT14_1,
760        }
761    }
762    #[doc = "Checks if the value of the field is `SWT14_0`"]
763    #[inline(always)]
764    pub fn is_swt14_0(&self) -> bool {
765        *self == SWT14_A::SWT14_0
766    }
767    #[doc = "Checks if the value of the field is `SWT14_1`"]
768    #[inline(always)]
769    pub fn is_swt14_1(&self) -> bool {
770        *self == SWT14_A::SWT14_1
771    }
772}
773#[doc = "Field `SWT14` writer - Software trigger 14 event."]
774pub type SWT14_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT14_A, O>;
775impl<'a, const O: u8> SWT14_W<'a, O> {
776    #[doc = "No trigger 14 event generated."]
777    #[inline(always)]
778    pub fn swt14_0(self) -> &'a mut W {
779        self.variant(SWT14_A::SWT14_0)
780    }
781    #[doc = "Trigger 14 event generated."]
782    #[inline(always)]
783    pub fn swt14_1(self) -> &'a mut W {
784        self.variant(SWT14_A::SWT14_1)
785    }
786}
787#[doc = "Field `SWT15` reader - Software trigger 15 event."]
788pub type SWT15_R = crate::BitReader<SWT15_A>;
789#[doc = "Software trigger 15 event.\n\nValue on reset: 0"]
790#[derive(Clone, Copy, Debug, PartialEq, Eq)]
791pub enum SWT15_A {
792    #[doc = "0: No trigger 15 event generated."]
793    SWT15_0 = 0,
794    #[doc = "1: Trigger 15 event generated."]
795    SWT15_1 = 1,
796}
797impl From<SWT15_A> for bool {
798    #[inline(always)]
799    fn from(variant: SWT15_A) -> Self {
800        variant as u8 != 0
801    }
802}
803impl SWT15_R {
804    #[doc = "Get enumerated values variant"]
805    #[inline(always)]
806    pub fn variant(&self) -> SWT15_A {
807        match self.bits {
808            false => SWT15_A::SWT15_0,
809            true => SWT15_A::SWT15_1,
810        }
811    }
812    #[doc = "Checks if the value of the field is `SWT15_0`"]
813    #[inline(always)]
814    pub fn is_swt15_0(&self) -> bool {
815        *self == SWT15_A::SWT15_0
816    }
817    #[doc = "Checks if the value of the field is `SWT15_1`"]
818    #[inline(always)]
819    pub fn is_swt15_1(&self) -> bool {
820        *self == SWT15_A::SWT15_1
821    }
822}
823#[doc = "Field `SWT15` writer - Software trigger 15 event."]
824pub type SWT15_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWTRIG_SPEC, SWT15_A, O>;
825impl<'a, const O: u8> SWT15_W<'a, O> {
826    #[doc = "No trigger 15 event generated."]
827    #[inline(always)]
828    pub fn swt15_0(self) -> &'a mut W {
829        self.variant(SWT15_A::SWT15_0)
830    }
831    #[doc = "Trigger 15 event generated."]
832    #[inline(always)]
833    pub fn swt15_1(self) -> &'a mut W {
834        self.variant(SWT15_A::SWT15_1)
835    }
836}
837impl R {
838    #[doc = "Bit 0 - Software trigger 0 event."]
839    #[inline(always)]
840    pub fn swt0(&self) -> SWT0_R {
841        SWT0_R::new((self.bits & 1) != 0)
842    }
843    #[doc = "Bit 1 - Software trigger 1 event."]
844    #[inline(always)]
845    pub fn swt1(&self) -> SWT1_R {
846        SWT1_R::new(((self.bits >> 1) & 1) != 0)
847    }
848    #[doc = "Bit 2 - Software trigger 2 event."]
849    #[inline(always)]
850    pub fn swt2(&self) -> SWT2_R {
851        SWT2_R::new(((self.bits >> 2) & 1) != 0)
852    }
853    #[doc = "Bit 3 - Software trigger 3 event."]
854    #[inline(always)]
855    pub fn swt3(&self) -> SWT3_R {
856        SWT3_R::new(((self.bits >> 3) & 1) != 0)
857    }
858    #[doc = "Bit 4 - Software trigger 4 event."]
859    #[inline(always)]
860    pub fn swt4(&self) -> SWT4_R {
861        SWT4_R::new(((self.bits >> 4) & 1) != 0)
862    }
863    #[doc = "Bit 5 - Software trigger 5 event."]
864    #[inline(always)]
865    pub fn swt5(&self) -> SWT5_R {
866        SWT5_R::new(((self.bits >> 5) & 1) != 0)
867    }
868    #[doc = "Bit 6 - Software trigger 6 event."]
869    #[inline(always)]
870    pub fn swt6(&self) -> SWT6_R {
871        SWT6_R::new(((self.bits >> 6) & 1) != 0)
872    }
873    #[doc = "Bit 7 - Software trigger 7 event."]
874    #[inline(always)]
875    pub fn swt7(&self) -> SWT7_R {
876        SWT7_R::new(((self.bits >> 7) & 1) != 0)
877    }
878    #[doc = "Bit 8 - Software trigger 8 event."]
879    #[inline(always)]
880    pub fn swt8(&self) -> SWT8_R {
881        SWT8_R::new(((self.bits >> 8) & 1) != 0)
882    }
883    #[doc = "Bit 9 - Software trigger 9 event."]
884    #[inline(always)]
885    pub fn swt9(&self) -> SWT9_R {
886        SWT9_R::new(((self.bits >> 9) & 1) != 0)
887    }
888    #[doc = "Bit 10 - Software trigger 10 event."]
889    #[inline(always)]
890    pub fn swt10(&self) -> SWT10_R {
891        SWT10_R::new(((self.bits >> 10) & 1) != 0)
892    }
893    #[doc = "Bit 11 - Software trigger 11 event."]
894    #[inline(always)]
895    pub fn swt11(&self) -> SWT11_R {
896        SWT11_R::new(((self.bits >> 11) & 1) != 0)
897    }
898    #[doc = "Bit 12 - Software trigger 12 event."]
899    #[inline(always)]
900    pub fn swt12(&self) -> SWT12_R {
901        SWT12_R::new(((self.bits >> 12) & 1) != 0)
902    }
903    #[doc = "Bit 13 - Software trigger 13 event."]
904    #[inline(always)]
905    pub fn swt13(&self) -> SWT13_R {
906        SWT13_R::new(((self.bits >> 13) & 1) != 0)
907    }
908    #[doc = "Bit 14 - Software trigger 14 event."]
909    #[inline(always)]
910    pub fn swt14(&self) -> SWT14_R {
911        SWT14_R::new(((self.bits >> 14) & 1) != 0)
912    }
913    #[doc = "Bit 15 - Software trigger 15 event."]
914    #[inline(always)]
915    pub fn swt15(&self) -> SWT15_R {
916        SWT15_R::new(((self.bits >> 15) & 1) != 0)
917    }
918}
919impl W {
920    #[doc = "Bit 0 - Software trigger 0 event."]
921    #[inline(always)]
922    pub fn swt0(&mut self) -> SWT0_W<0> {
923        SWT0_W::new(self)
924    }
925    #[doc = "Bit 1 - Software trigger 1 event."]
926    #[inline(always)]
927    pub fn swt1(&mut self) -> SWT1_W<1> {
928        SWT1_W::new(self)
929    }
930    #[doc = "Bit 2 - Software trigger 2 event."]
931    #[inline(always)]
932    pub fn swt2(&mut self) -> SWT2_W<2> {
933        SWT2_W::new(self)
934    }
935    #[doc = "Bit 3 - Software trigger 3 event."]
936    #[inline(always)]
937    pub fn swt3(&mut self) -> SWT3_W<3> {
938        SWT3_W::new(self)
939    }
940    #[doc = "Bit 4 - Software trigger 4 event."]
941    #[inline(always)]
942    pub fn swt4(&mut self) -> SWT4_W<4> {
943        SWT4_W::new(self)
944    }
945    #[doc = "Bit 5 - Software trigger 5 event."]
946    #[inline(always)]
947    pub fn swt5(&mut self) -> SWT5_W<5> {
948        SWT5_W::new(self)
949    }
950    #[doc = "Bit 6 - Software trigger 6 event."]
951    #[inline(always)]
952    pub fn swt6(&mut self) -> SWT6_W<6> {
953        SWT6_W::new(self)
954    }
955    #[doc = "Bit 7 - Software trigger 7 event."]
956    #[inline(always)]
957    pub fn swt7(&mut self) -> SWT7_W<7> {
958        SWT7_W::new(self)
959    }
960    #[doc = "Bit 8 - Software trigger 8 event."]
961    #[inline(always)]
962    pub fn swt8(&mut self) -> SWT8_W<8> {
963        SWT8_W::new(self)
964    }
965    #[doc = "Bit 9 - Software trigger 9 event."]
966    #[inline(always)]
967    pub fn swt9(&mut self) -> SWT9_W<9> {
968        SWT9_W::new(self)
969    }
970    #[doc = "Bit 10 - Software trigger 10 event."]
971    #[inline(always)]
972    pub fn swt10(&mut self) -> SWT10_W<10> {
973        SWT10_W::new(self)
974    }
975    #[doc = "Bit 11 - Software trigger 11 event."]
976    #[inline(always)]
977    pub fn swt11(&mut self) -> SWT11_W<11> {
978        SWT11_W::new(self)
979    }
980    #[doc = "Bit 12 - Software trigger 12 event."]
981    #[inline(always)]
982    pub fn swt12(&mut self) -> SWT12_W<12> {
983        SWT12_W::new(self)
984    }
985    #[doc = "Bit 13 - Software trigger 13 event."]
986    #[inline(always)]
987    pub fn swt13(&mut self) -> SWT13_W<13> {
988        SWT13_W::new(self)
989    }
990    #[doc = "Bit 14 - Software trigger 14 event."]
991    #[inline(always)]
992    pub fn swt14(&mut self) -> SWT14_W<14> {
993        SWT14_W::new(self)
994    }
995    #[doc = "Bit 15 - Software trigger 15 event."]
996    #[inline(always)]
997    pub fn swt15(&mut self) -> SWT15_W<15> {
998        SWT15_W::new(self)
999    }
1000    #[doc = "Writes raw bits to the register."]
1001    #[inline(always)]
1002    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1003        self.0.bits(bits);
1004        self
1005    }
1006}
1007#[doc = "Software Trigger 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 [swtrig](index.html) module"]
1008pub struct SWTRIG_SPEC;
1009impl crate::RegisterSpec for SWTRIG_SPEC {
1010    type Ux = u32;
1011}
1012#[doc = "`read()` method returns [swtrig::R](R) reader structure"]
1013impl crate::Readable for SWTRIG_SPEC {
1014    type Reader = R;
1015}
1016#[doc = "`write(|w| ..)` method takes [swtrig::W](W) writer structure"]
1017impl crate::Writable for SWTRIG_SPEC {
1018    type Writer = W;
1019}
1020#[doc = "`reset()` method sets SWTRIG to value 0"]
1021impl crate::Resettable for SWTRIG_SPEC {
1022    #[inline(always)]
1023    fn reset_value() -> Self::Ux {
1024        0
1025    }
1026}