mimxrt595s/adc0/
tstat.rs

1#[doc = "Register `TSTAT` reader"]
2pub struct R(crate::R<TSTAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<TSTAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<TSTAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<TSTAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `TSTAT` writer"]
17pub struct W(crate::W<TSTAT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<TSTAT_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<TSTAT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<TSTAT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `TEXC_NUM` reader - Trigger Exception Number"]
38pub type TEXC_NUM_R = crate::FieldReader<u16, TEXC_NUM_A>;
39#[doc = "Trigger Exception Number\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u16)]
42pub enum TEXC_NUM_A {
43    #[doc = "0: No triggers have been interrupted by a high-priority exception."]
44    NO_EXCEPTIONS = 0,
45    #[doc = "1: Trigger 0 has been interrupted by a high-priority exception."]
46    BIT0_MEANS_TRIGGER_0_INTERRUPTED = 1,
47    #[doc = "2: Trigger 1 has been interrupted by a high-priority exception."]
48    BIT1_MEANS_TRIGGER_1_INTERRUPTED = 2,
49    #[doc = "3: Associated trigger sequence has interrupted by a high-priority exception."]
50    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_3 = 3,
51    #[doc = "4: Associated trigger sequence has interrupted by a high-priority exception."]
52    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_4 = 4,
53    #[doc = "5: Associated trigger sequence has interrupted by a high-priority exception."]
54    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_5 = 5,
55    #[doc = "6: Associated trigger sequence has interrupted by a high-priority exception."]
56    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_6 = 6,
57    #[doc = "7: Associated trigger sequence has interrupted by a high-priority exception."]
58    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_7 = 7,
59    #[doc = "8: Associated trigger sequence has interrupted by a high-priority exception."]
60    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_8 = 8,
61    #[doc = "9: Associated trigger sequence has interrupted by a high-priority exception."]
62    SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_9 = 9,
63    #[doc = "65535: Every trigger sequence has been interrupted by a high-priority exception."]
64    ALL_BITS_SET_INDICATE_ALL_TRIGGERS_INTERRUPTED = 65535,
65}
66impl From<TEXC_NUM_A> for u16 {
67    #[inline(always)]
68    fn from(variant: TEXC_NUM_A) -> Self {
69        variant as _
70    }
71}
72impl TEXC_NUM_R {
73    #[doc = "Get enumerated values variant"]
74    #[inline(always)]
75    pub fn variant(&self) -> Option<TEXC_NUM_A> {
76        match self.bits {
77            0 => Some(TEXC_NUM_A::NO_EXCEPTIONS),
78            1 => Some(TEXC_NUM_A::BIT0_MEANS_TRIGGER_0_INTERRUPTED),
79            2 => Some(TEXC_NUM_A::BIT1_MEANS_TRIGGER_1_INTERRUPTED),
80            3 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_3),
81            4 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_4),
82            5 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_5),
83            6 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_6),
84            7 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_7),
85            8 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_8),
86            9 => Some(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_9),
87            65535 => Some(TEXC_NUM_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_INTERRUPTED),
88            _ => None,
89        }
90    }
91    #[doc = "Checks if the value of the field is `NO_EXCEPTIONS`"]
92    #[inline(always)]
93    pub fn is_no_exceptions(&self) -> bool {
94        *self == TEXC_NUM_A::NO_EXCEPTIONS
95    }
96    #[doc = "Checks if the value of the field is `BIT0_MEANS_TRIGGER_0_INTERRUPTED`"]
97    #[inline(always)]
98    pub fn is_bit0_means_trigger_0_interrupted(&self) -> bool {
99        *self == TEXC_NUM_A::BIT0_MEANS_TRIGGER_0_INTERRUPTED
100    }
101    #[doc = "Checks if the value of the field is `BIT1_MEANS_TRIGGER_1_INTERRUPTED`"]
102    #[inline(always)]
103    pub fn is_bit1_means_trigger_1_interrupted(&self) -> bool {
104        *self == TEXC_NUM_A::BIT1_MEANS_TRIGGER_1_INTERRUPTED
105    }
106    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_3`"]
107    #[inline(always)]
108    pub fn is_set_bits_indicate_trigger_x_interrupted_3(&self) -> bool {
109        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_3
110    }
111    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_4`"]
112    #[inline(always)]
113    pub fn is_set_bits_indicate_trigger_x_interrupted_4(&self) -> bool {
114        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_4
115    }
116    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_5`"]
117    #[inline(always)]
118    pub fn is_set_bits_indicate_trigger_x_interrupted_5(&self) -> bool {
119        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_5
120    }
121    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_6`"]
122    #[inline(always)]
123    pub fn is_set_bits_indicate_trigger_x_interrupted_6(&self) -> bool {
124        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_6
125    }
126    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_7`"]
127    #[inline(always)]
128    pub fn is_set_bits_indicate_trigger_x_interrupted_7(&self) -> bool {
129        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_7
130    }
131    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_8`"]
132    #[inline(always)]
133    pub fn is_set_bits_indicate_trigger_x_interrupted_8(&self) -> bool {
134        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_8
135    }
136    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_9`"]
137    #[inline(always)]
138    pub fn is_set_bits_indicate_trigger_x_interrupted_9(&self) -> bool {
139        *self == TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_9
140    }
141    #[doc = "Checks if the value of the field is `ALL_BITS_SET_INDICATE_ALL_TRIGGERS_INTERRUPTED`"]
142    #[inline(always)]
143    pub fn is_all_bits_set_indicate_all_triggers_interrupted(&self) -> bool {
144        *self == TEXC_NUM_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_INTERRUPTED
145    }
146}
147#[doc = "Field `TEXC_NUM` writer - Trigger Exception Number"]
148pub type TEXC_NUM_W<'a, const O: u8> =
149    crate::FieldWriter<'a, u32, TSTAT_SPEC, u16, TEXC_NUM_A, 16, O>;
150impl<'a, const O: u8> TEXC_NUM_W<'a, O> {
151    #[doc = "No triggers have been interrupted by a high-priority exception."]
152    #[inline(always)]
153    pub fn no_exceptions(self) -> &'a mut W {
154        self.variant(TEXC_NUM_A::NO_EXCEPTIONS)
155    }
156    #[doc = "Trigger 0 has been interrupted by a high-priority exception."]
157    #[inline(always)]
158    pub fn bit0_means_trigger_0_interrupted(self) -> &'a mut W {
159        self.variant(TEXC_NUM_A::BIT0_MEANS_TRIGGER_0_INTERRUPTED)
160    }
161    #[doc = "Trigger 1 has been interrupted by a high-priority exception."]
162    #[inline(always)]
163    pub fn bit1_means_trigger_1_interrupted(self) -> &'a mut W {
164        self.variant(TEXC_NUM_A::BIT1_MEANS_TRIGGER_1_INTERRUPTED)
165    }
166    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
167    #[inline(always)]
168    pub fn set_bits_indicate_trigger_x_interrupted_3(self) -> &'a mut W {
169        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_3)
170    }
171    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
172    #[inline(always)]
173    pub fn set_bits_indicate_trigger_x_interrupted_4(self) -> &'a mut W {
174        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_4)
175    }
176    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
177    #[inline(always)]
178    pub fn set_bits_indicate_trigger_x_interrupted_5(self) -> &'a mut W {
179        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_5)
180    }
181    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
182    #[inline(always)]
183    pub fn set_bits_indicate_trigger_x_interrupted_6(self) -> &'a mut W {
184        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_6)
185    }
186    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
187    #[inline(always)]
188    pub fn set_bits_indicate_trigger_x_interrupted_7(self) -> &'a mut W {
189        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_7)
190    }
191    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
192    #[inline(always)]
193    pub fn set_bits_indicate_trigger_x_interrupted_8(self) -> &'a mut W {
194        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_8)
195    }
196    #[doc = "Associated trigger sequence has interrupted by a high-priority exception."]
197    #[inline(always)]
198    pub fn set_bits_indicate_trigger_x_interrupted_9(self) -> &'a mut W {
199        self.variant(TEXC_NUM_A::SET_BITS_INDICATE_TRIGGER_X_INTERRUPTED_9)
200    }
201    #[doc = "Every trigger sequence has been interrupted by a high-priority exception."]
202    #[inline(always)]
203    pub fn all_bits_set_indicate_all_triggers_interrupted(self) -> &'a mut W {
204        self.variant(TEXC_NUM_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_INTERRUPTED)
205    }
206}
207#[doc = "Field `TCOMP_FLAG` reader - Trigger Completion Flag"]
208pub type TCOMP_FLAG_R = crate::FieldReader<u16, TCOMP_FLAG_A>;
209#[doc = "Trigger Completion Flag\n\nValue on reset: 0"]
210#[derive(Clone, Copy, Debug, PartialEq, Eq)]
211#[repr(u16)]
212pub enum TCOMP_FLAG_A {
213    #[doc = "0: No triggers have been completed. Trigger completion interrupts are disabled."]
214    NO_TRIGGER = 0,
215    #[doc = "1: Trigger 0 has been completed and trigger 0 has enabled completion interrupts."]
216    BIT0_MEANS_TRIGGER_0_COMPLETED = 1,
217    #[doc = "2: Trigger 1 has been completed and trigger 1 has enabled completion interrupts."]
218    BIT1_MEANS_TRIGGER_1_COMPLETED = 2,
219    #[doc = "3: Associated trigger sequence has completed and has enabled completion interrupts."]
220    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_3 = 3,
221    #[doc = "4: Associated trigger sequence has completed and has enabled completion interrupts."]
222    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_4 = 4,
223    #[doc = "5: Associated trigger sequence has completed and has enabled completion interrupts."]
224    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_5 = 5,
225    #[doc = "6: Associated trigger sequence has completed and has enabled completion interrupts."]
226    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_6 = 6,
227    #[doc = "7: Associated trigger sequence has completed and has enabled completion interrupts."]
228    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_7 = 7,
229    #[doc = "8: Associated trigger sequence has completed and has enabled completion interrupts."]
230    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_8 = 8,
231    #[doc = "9: Associated trigger sequence has completed and has enabled completion interrupts."]
232    SET_BITS_INDICATE_TRIGGER_X_COMPLETED_9 = 9,
233    #[doc = "65535: Every trigger sequence has been completed and every trigger has enabled completion interrupts."]
234    ALL_BITS_SET_INDICATE_ALL_TRIGGERS_COMPLETED = 65535,
235}
236impl From<TCOMP_FLAG_A> for u16 {
237    #[inline(always)]
238    fn from(variant: TCOMP_FLAG_A) -> Self {
239        variant as _
240    }
241}
242impl TCOMP_FLAG_R {
243    #[doc = "Get enumerated values variant"]
244    #[inline(always)]
245    pub fn variant(&self) -> Option<TCOMP_FLAG_A> {
246        match self.bits {
247            0 => Some(TCOMP_FLAG_A::NO_TRIGGER),
248            1 => Some(TCOMP_FLAG_A::BIT0_MEANS_TRIGGER_0_COMPLETED),
249            2 => Some(TCOMP_FLAG_A::BIT1_MEANS_TRIGGER_1_COMPLETED),
250            3 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_3),
251            4 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_4),
252            5 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_5),
253            6 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_6),
254            7 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_7),
255            8 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_8),
256            9 => Some(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_9),
257            65535 => Some(TCOMP_FLAG_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_COMPLETED),
258            _ => None,
259        }
260    }
261    #[doc = "Checks if the value of the field is `NO_TRIGGER`"]
262    #[inline(always)]
263    pub fn is_no_trigger(&self) -> bool {
264        *self == TCOMP_FLAG_A::NO_TRIGGER
265    }
266    #[doc = "Checks if the value of the field is `BIT0_MEANS_TRIGGER_0_COMPLETED`"]
267    #[inline(always)]
268    pub fn is_bit0_means_trigger_0_completed(&self) -> bool {
269        *self == TCOMP_FLAG_A::BIT0_MEANS_TRIGGER_0_COMPLETED
270    }
271    #[doc = "Checks if the value of the field is `BIT1_MEANS_TRIGGER_1_COMPLETED`"]
272    #[inline(always)]
273    pub fn is_bit1_means_trigger_1_completed(&self) -> bool {
274        *self == TCOMP_FLAG_A::BIT1_MEANS_TRIGGER_1_COMPLETED
275    }
276    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_3`"]
277    #[inline(always)]
278    pub fn is_set_bits_indicate_trigger_x_completed_3(&self) -> bool {
279        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_3
280    }
281    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_4`"]
282    #[inline(always)]
283    pub fn is_set_bits_indicate_trigger_x_completed_4(&self) -> bool {
284        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_4
285    }
286    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_5`"]
287    #[inline(always)]
288    pub fn is_set_bits_indicate_trigger_x_completed_5(&self) -> bool {
289        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_5
290    }
291    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_6`"]
292    #[inline(always)]
293    pub fn is_set_bits_indicate_trigger_x_completed_6(&self) -> bool {
294        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_6
295    }
296    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_7`"]
297    #[inline(always)]
298    pub fn is_set_bits_indicate_trigger_x_completed_7(&self) -> bool {
299        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_7
300    }
301    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_8`"]
302    #[inline(always)]
303    pub fn is_set_bits_indicate_trigger_x_completed_8(&self) -> bool {
304        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_8
305    }
306    #[doc = "Checks if the value of the field is `SET_BITS_INDICATE_TRIGGER_X_COMPLETED_9`"]
307    #[inline(always)]
308    pub fn is_set_bits_indicate_trigger_x_completed_9(&self) -> bool {
309        *self == TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_9
310    }
311    #[doc = "Checks if the value of the field is `ALL_BITS_SET_INDICATE_ALL_TRIGGERS_COMPLETED`"]
312    #[inline(always)]
313    pub fn is_all_bits_set_indicate_all_triggers_completed(&self) -> bool {
314        *self == TCOMP_FLAG_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_COMPLETED
315    }
316}
317#[doc = "Field `TCOMP_FLAG` writer - Trigger Completion Flag"]
318pub type TCOMP_FLAG_W<'a, const O: u8> =
319    crate::FieldWriter<'a, u32, TSTAT_SPEC, u16, TCOMP_FLAG_A, 16, O>;
320impl<'a, const O: u8> TCOMP_FLAG_W<'a, O> {
321    #[doc = "No triggers have been completed. Trigger completion interrupts are disabled."]
322    #[inline(always)]
323    pub fn no_trigger(self) -> &'a mut W {
324        self.variant(TCOMP_FLAG_A::NO_TRIGGER)
325    }
326    #[doc = "Trigger 0 has been completed and trigger 0 has enabled completion interrupts."]
327    #[inline(always)]
328    pub fn bit0_means_trigger_0_completed(self) -> &'a mut W {
329        self.variant(TCOMP_FLAG_A::BIT0_MEANS_TRIGGER_0_COMPLETED)
330    }
331    #[doc = "Trigger 1 has been completed and trigger 1 has enabled completion interrupts."]
332    #[inline(always)]
333    pub fn bit1_means_trigger_1_completed(self) -> &'a mut W {
334        self.variant(TCOMP_FLAG_A::BIT1_MEANS_TRIGGER_1_COMPLETED)
335    }
336    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
337    #[inline(always)]
338    pub fn set_bits_indicate_trigger_x_completed_3(self) -> &'a mut W {
339        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_3)
340    }
341    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
342    #[inline(always)]
343    pub fn set_bits_indicate_trigger_x_completed_4(self) -> &'a mut W {
344        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_4)
345    }
346    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
347    #[inline(always)]
348    pub fn set_bits_indicate_trigger_x_completed_5(self) -> &'a mut W {
349        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_5)
350    }
351    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
352    #[inline(always)]
353    pub fn set_bits_indicate_trigger_x_completed_6(self) -> &'a mut W {
354        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_6)
355    }
356    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
357    #[inline(always)]
358    pub fn set_bits_indicate_trigger_x_completed_7(self) -> &'a mut W {
359        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_7)
360    }
361    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
362    #[inline(always)]
363    pub fn set_bits_indicate_trigger_x_completed_8(self) -> &'a mut W {
364        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_8)
365    }
366    #[doc = "Associated trigger sequence has completed and has enabled completion interrupts."]
367    #[inline(always)]
368    pub fn set_bits_indicate_trigger_x_completed_9(self) -> &'a mut W {
369        self.variant(TCOMP_FLAG_A::SET_BITS_INDICATE_TRIGGER_X_COMPLETED_9)
370    }
371    #[doc = "Every trigger sequence has been completed and every trigger has enabled completion interrupts."]
372    #[inline(always)]
373    pub fn all_bits_set_indicate_all_triggers_completed(self) -> &'a mut W {
374        self.variant(TCOMP_FLAG_A::ALL_BITS_SET_INDICATE_ALL_TRIGGERS_COMPLETED)
375    }
376}
377impl R {
378    #[doc = "Bits 0:15 - Trigger Exception Number"]
379    #[inline(always)]
380    pub fn texc_num(&self) -> TEXC_NUM_R {
381        TEXC_NUM_R::new((self.bits & 0xffff) as u16)
382    }
383    #[doc = "Bits 16:31 - Trigger Completion Flag"]
384    #[inline(always)]
385    pub fn tcomp_flag(&self) -> TCOMP_FLAG_R {
386        TCOMP_FLAG_R::new(((self.bits >> 16) & 0xffff) as u16)
387    }
388}
389impl W {
390    #[doc = "Bits 0:15 - Trigger Exception Number"]
391    #[inline(always)]
392    #[must_use]
393    pub fn texc_num(&mut self) -> TEXC_NUM_W<0> {
394        TEXC_NUM_W::new(self)
395    }
396    #[doc = "Bits 16:31 - Trigger Completion Flag"]
397    #[inline(always)]
398    #[must_use]
399    pub fn tcomp_flag(&mut self) -> TCOMP_FLAG_W<16> {
400        TCOMP_FLAG_W::new(self)
401    }
402    #[doc = "Writes raw bits to the register."]
403    #[inline(always)]
404    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
405        self.0.bits(bits);
406        self
407    }
408}
409#[doc = "Trigger Status 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 [tstat](index.html) module"]
410pub struct TSTAT_SPEC;
411impl crate::RegisterSpec for TSTAT_SPEC {
412    type Ux = u32;
413}
414#[doc = "`read()` method returns [tstat::R](R) reader structure"]
415impl crate::Readable for TSTAT_SPEC {
416    type Reader = R;
417}
418#[doc = "`write(|w| ..)` method takes [tstat::W](W) writer structure"]
419impl crate::Writable for TSTAT_SPEC {
420    type Writer = W;
421    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
422    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff;
423}
424#[doc = "`reset()` method sets TSTAT to value 0"]
425impl crate::Resettable for TSTAT_SPEC {
426    const RESET_VALUE: Self::Ux = 0;
427}