nrf52840_pac/timer3/
shorts.rs

1#[doc = "Register `SHORTS` reader"]
2pub struct R(crate::R<SHORTS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SHORTS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SHORTS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SHORTS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SHORTS` writer"]
17pub struct W(crate::W<SHORTS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SHORTS_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<SHORTS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SHORTS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `COMPARE0_CLEAR` reader - Shortcut between COMPARE\\[0\\]
38event and CLEAR task"]
39pub type COMPARE0_CLEAR_R = crate::BitReader<COMPARE0_CLEAR_A>;
40#[doc = "Shortcut between COMPARE\\[0\\]
41event and CLEAR task\n\nValue on reset: 0"]
42#[derive(Clone, Copy, Debug, PartialEq)]
43pub enum COMPARE0_CLEAR_A {
44    #[doc = "0: Disable shortcut"]
45    DISABLED = 0,
46    #[doc = "1: Enable shortcut"]
47    ENABLED = 1,
48}
49impl From<COMPARE0_CLEAR_A> for bool {
50    #[inline(always)]
51    fn from(variant: COMPARE0_CLEAR_A) -> Self {
52        variant as u8 != 0
53    }
54}
55impl COMPARE0_CLEAR_R {
56    #[doc = "Get enumerated values variant"]
57    #[inline(always)]
58    pub fn variant(&self) -> COMPARE0_CLEAR_A {
59        match self.bits {
60            false => COMPARE0_CLEAR_A::DISABLED,
61            true => COMPARE0_CLEAR_A::ENABLED,
62        }
63    }
64    #[doc = "Checks if the value of the field is `DISABLED`"]
65    #[inline(always)]
66    pub fn is_disabled(&self) -> bool {
67        *self == COMPARE0_CLEAR_A::DISABLED
68    }
69    #[doc = "Checks if the value of the field is `ENABLED`"]
70    #[inline(always)]
71    pub fn is_enabled(&self) -> bool {
72        *self == COMPARE0_CLEAR_A::ENABLED
73    }
74}
75#[doc = "Field `COMPARE0_CLEAR` writer - Shortcut between COMPARE\\[0\\]
76event and CLEAR task"]
77pub type COMPARE0_CLEAR_W<'a, const O: u8> =
78    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_CLEAR_A, O>;
79impl<'a, const O: u8> COMPARE0_CLEAR_W<'a, O> {
80    #[doc = "Disable shortcut"]
81    #[inline(always)]
82    pub fn disabled(self) -> &'a mut W {
83        self.variant(COMPARE0_CLEAR_A::DISABLED)
84    }
85    #[doc = "Enable shortcut"]
86    #[inline(always)]
87    pub fn enabled(self) -> &'a mut W {
88        self.variant(COMPARE0_CLEAR_A::ENABLED)
89    }
90}
91#[doc = "Field `COMPARE1_CLEAR` reader - Shortcut between COMPARE\\[1\\]
92event and CLEAR task"]
93pub type COMPARE1_CLEAR_R = crate::BitReader<COMPARE1_CLEAR_A>;
94#[doc = "Shortcut between COMPARE\\[1\\]
95event and CLEAR task\n\nValue on reset: 0"]
96#[derive(Clone, Copy, Debug, PartialEq)]
97pub enum COMPARE1_CLEAR_A {
98    #[doc = "0: Disable shortcut"]
99    DISABLED = 0,
100    #[doc = "1: Enable shortcut"]
101    ENABLED = 1,
102}
103impl From<COMPARE1_CLEAR_A> for bool {
104    #[inline(always)]
105    fn from(variant: COMPARE1_CLEAR_A) -> Self {
106        variant as u8 != 0
107    }
108}
109impl COMPARE1_CLEAR_R {
110    #[doc = "Get enumerated values variant"]
111    #[inline(always)]
112    pub fn variant(&self) -> COMPARE1_CLEAR_A {
113        match self.bits {
114            false => COMPARE1_CLEAR_A::DISABLED,
115            true => COMPARE1_CLEAR_A::ENABLED,
116        }
117    }
118    #[doc = "Checks if the value of the field is `DISABLED`"]
119    #[inline(always)]
120    pub fn is_disabled(&self) -> bool {
121        *self == COMPARE1_CLEAR_A::DISABLED
122    }
123    #[doc = "Checks if the value of the field is `ENABLED`"]
124    #[inline(always)]
125    pub fn is_enabled(&self) -> bool {
126        *self == COMPARE1_CLEAR_A::ENABLED
127    }
128}
129#[doc = "Field `COMPARE1_CLEAR` writer - Shortcut between COMPARE\\[1\\]
130event and CLEAR task"]
131pub type COMPARE1_CLEAR_W<'a, const O: u8> =
132    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_CLEAR_A, O>;
133impl<'a, const O: u8> COMPARE1_CLEAR_W<'a, O> {
134    #[doc = "Disable shortcut"]
135    #[inline(always)]
136    pub fn disabled(self) -> &'a mut W {
137        self.variant(COMPARE1_CLEAR_A::DISABLED)
138    }
139    #[doc = "Enable shortcut"]
140    #[inline(always)]
141    pub fn enabled(self) -> &'a mut W {
142        self.variant(COMPARE1_CLEAR_A::ENABLED)
143    }
144}
145#[doc = "Field `COMPARE2_CLEAR` reader - Shortcut between COMPARE\\[2\\]
146event and CLEAR task"]
147pub type COMPARE2_CLEAR_R = crate::BitReader<COMPARE2_CLEAR_A>;
148#[doc = "Shortcut between COMPARE\\[2\\]
149event and CLEAR task\n\nValue on reset: 0"]
150#[derive(Clone, Copy, Debug, PartialEq)]
151pub enum COMPARE2_CLEAR_A {
152    #[doc = "0: Disable shortcut"]
153    DISABLED = 0,
154    #[doc = "1: Enable shortcut"]
155    ENABLED = 1,
156}
157impl From<COMPARE2_CLEAR_A> for bool {
158    #[inline(always)]
159    fn from(variant: COMPARE2_CLEAR_A) -> Self {
160        variant as u8 != 0
161    }
162}
163impl COMPARE2_CLEAR_R {
164    #[doc = "Get enumerated values variant"]
165    #[inline(always)]
166    pub fn variant(&self) -> COMPARE2_CLEAR_A {
167        match self.bits {
168            false => COMPARE2_CLEAR_A::DISABLED,
169            true => COMPARE2_CLEAR_A::ENABLED,
170        }
171    }
172    #[doc = "Checks if the value of the field is `DISABLED`"]
173    #[inline(always)]
174    pub fn is_disabled(&self) -> bool {
175        *self == COMPARE2_CLEAR_A::DISABLED
176    }
177    #[doc = "Checks if the value of the field is `ENABLED`"]
178    #[inline(always)]
179    pub fn is_enabled(&self) -> bool {
180        *self == COMPARE2_CLEAR_A::ENABLED
181    }
182}
183#[doc = "Field `COMPARE2_CLEAR` writer - Shortcut between COMPARE\\[2\\]
184event and CLEAR task"]
185pub type COMPARE2_CLEAR_W<'a, const O: u8> =
186    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_CLEAR_A, O>;
187impl<'a, const O: u8> COMPARE2_CLEAR_W<'a, O> {
188    #[doc = "Disable shortcut"]
189    #[inline(always)]
190    pub fn disabled(self) -> &'a mut W {
191        self.variant(COMPARE2_CLEAR_A::DISABLED)
192    }
193    #[doc = "Enable shortcut"]
194    #[inline(always)]
195    pub fn enabled(self) -> &'a mut W {
196        self.variant(COMPARE2_CLEAR_A::ENABLED)
197    }
198}
199#[doc = "Field `COMPARE3_CLEAR` reader - Shortcut between COMPARE\\[3\\]
200event and CLEAR task"]
201pub type COMPARE3_CLEAR_R = crate::BitReader<COMPARE3_CLEAR_A>;
202#[doc = "Shortcut between COMPARE\\[3\\]
203event and CLEAR task\n\nValue on reset: 0"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum COMPARE3_CLEAR_A {
206    #[doc = "0: Disable shortcut"]
207    DISABLED = 0,
208    #[doc = "1: Enable shortcut"]
209    ENABLED = 1,
210}
211impl From<COMPARE3_CLEAR_A> for bool {
212    #[inline(always)]
213    fn from(variant: COMPARE3_CLEAR_A) -> Self {
214        variant as u8 != 0
215    }
216}
217impl COMPARE3_CLEAR_R {
218    #[doc = "Get enumerated values variant"]
219    #[inline(always)]
220    pub fn variant(&self) -> COMPARE3_CLEAR_A {
221        match self.bits {
222            false => COMPARE3_CLEAR_A::DISABLED,
223            true => COMPARE3_CLEAR_A::ENABLED,
224        }
225    }
226    #[doc = "Checks if the value of the field is `DISABLED`"]
227    #[inline(always)]
228    pub fn is_disabled(&self) -> bool {
229        *self == COMPARE3_CLEAR_A::DISABLED
230    }
231    #[doc = "Checks if the value of the field is `ENABLED`"]
232    #[inline(always)]
233    pub fn is_enabled(&self) -> bool {
234        *self == COMPARE3_CLEAR_A::ENABLED
235    }
236}
237#[doc = "Field `COMPARE3_CLEAR` writer - Shortcut between COMPARE\\[3\\]
238event and CLEAR task"]
239pub type COMPARE3_CLEAR_W<'a, const O: u8> =
240    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_CLEAR_A, O>;
241impl<'a, const O: u8> COMPARE3_CLEAR_W<'a, O> {
242    #[doc = "Disable shortcut"]
243    #[inline(always)]
244    pub fn disabled(self) -> &'a mut W {
245        self.variant(COMPARE3_CLEAR_A::DISABLED)
246    }
247    #[doc = "Enable shortcut"]
248    #[inline(always)]
249    pub fn enabled(self) -> &'a mut W {
250        self.variant(COMPARE3_CLEAR_A::ENABLED)
251    }
252}
253#[doc = "Field `COMPARE4_CLEAR` reader - Shortcut between COMPARE\\[4\\]
254event and CLEAR task"]
255pub type COMPARE4_CLEAR_R = crate::BitReader<COMPARE4_CLEAR_A>;
256#[doc = "Shortcut between COMPARE\\[4\\]
257event and CLEAR task\n\nValue on reset: 0"]
258#[derive(Clone, Copy, Debug, PartialEq)]
259pub enum COMPARE4_CLEAR_A {
260    #[doc = "0: Disable shortcut"]
261    DISABLED = 0,
262    #[doc = "1: Enable shortcut"]
263    ENABLED = 1,
264}
265impl From<COMPARE4_CLEAR_A> for bool {
266    #[inline(always)]
267    fn from(variant: COMPARE4_CLEAR_A) -> Self {
268        variant as u8 != 0
269    }
270}
271impl COMPARE4_CLEAR_R {
272    #[doc = "Get enumerated values variant"]
273    #[inline(always)]
274    pub fn variant(&self) -> COMPARE4_CLEAR_A {
275        match self.bits {
276            false => COMPARE4_CLEAR_A::DISABLED,
277            true => COMPARE4_CLEAR_A::ENABLED,
278        }
279    }
280    #[doc = "Checks if the value of the field is `DISABLED`"]
281    #[inline(always)]
282    pub fn is_disabled(&self) -> bool {
283        *self == COMPARE4_CLEAR_A::DISABLED
284    }
285    #[doc = "Checks if the value of the field is `ENABLED`"]
286    #[inline(always)]
287    pub fn is_enabled(&self) -> bool {
288        *self == COMPARE4_CLEAR_A::ENABLED
289    }
290}
291#[doc = "Field `COMPARE4_CLEAR` writer - Shortcut between COMPARE\\[4\\]
292event and CLEAR task"]
293pub type COMPARE4_CLEAR_W<'a, const O: u8> =
294    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_CLEAR_A, O>;
295impl<'a, const O: u8> COMPARE4_CLEAR_W<'a, O> {
296    #[doc = "Disable shortcut"]
297    #[inline(always)]
298    pub fn disabled(self) -> &'a mut W {
299        self.variant(COMPARE4_CLEAR_A::DISABLED)
300    }
301    #[doc = "Enable shortcut"]
302    #[inline(always)]
303    pub fn enabled(self) -> &'a mut W {
304        self.variant(COMPARE4_CLEAR_A::ENABLED)
305    }
306}
307#[doc = "Field `COMPARE5_CLEAR` reader - Shortcut between COMPARE\\[5\\]
308event and CLEAR task"]
309pub type COMPARE5_CLEAR_R = crate::BitReader<COMPARE5_CLEAR_A>;
310#[doc = "Shortcut between COMPARE\\[5\\]
311event and CLEAR task\n\nValue on reset: 0"]
312#[derive(Clone, Copy, Debug, PartialEq)]
313pub enum COMPARE5_CLEAR_A {
314    #[doc = "0: Disable shortcut"]
315    DISABLED = 0,
316    #[doc = "1: Enable shortcut"]
317    ENABLED = 1,
318}
319impl From<COMPARE5_CLEAR_A> for bool {
320    #[inline(always)]
321    fn from(variant: COMPARE5_CLEAR_A) -> Self {
322        variant as u8 != 0
323    }
324}
325impl COMPARE5_CLEAR_R {
326    #[doc = "Get enumerated values variant"]
327    #[inline(always)]
328    pub fn variant(&self) -> COMPARE5_CLEAR_A {
329        match self.bits {
330            false => COMPARE5_CLEAR_A::DISABLED,
331            true => COMPARE5_CLEAR_A::ENABLED,
332        }
333    }
334    #[doc = "Checks if the value of the field is `DISABLED`"]
335    #[inline(always)]
336    pub fn is_disabled(&self) -> bool {
337        *self == COMPARE5_CLEAR_A::DISABLED
338    }
339    #[doc = "Checks if the value of the field is `ENABLED`"]
340    #[inline(always)]
341    pub fn is_enabled(&self) -> bool {
342        *self == COMPARE5_CLEAR_A::ENABLED
343    }
344}
345#[doc = "Field `COMPARE5_CLEAR` writer - Shortcut between COMPARE\\[5\\]
346event and CLEAR task"]
347pub type COMPARE5_CLEAR_W<'a, const O: u8> =
348    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_CLEAR_A, O>;
349impl<'a, const O: u8> COMPARE5_CLEAR_W<'a, O> {
350    #[doc = "Disable shortcut"]
351    #[inline(always)]
352    pub fn disabled(self) -> &'a mut W {
353        self.variant(COMPARE5_CLEAR_A::DISABLED)
354    }
355    #[doc = "Enable shortcut"]
356    #[inline(always)]
357    pub fn enabled(self) -> &'a mut W {
358        self.variant(COMPARE5_CLEAR_A::ENABLED)
359    }
360}
361#[doc = "Field `COMPARE0_STOP` reader - Shortcut between COMPARE\\[0\\]
362event and STOP task"]
363pub type COMPARE0_STOP_R = crate::BitReader<COMPARE0_STOP_A>;
364#[doc = "Shortcut between COMPARE\\[0\\]
365event and STOP task\n\nValue on reset: 0"]
366#[derive(Clone, Copy, Debug, PartialEq)]
367pub enum COMPARE0_STOP_A {
368    #[doc = "0: Disable shortcut"]
369    DISABLED = 0,
370    #[doc = "1: Enable shortcut"]
371    ENABLED = 1,
372}
373impl From<COMPARE0_STOP_A> for bool {
374    #[inline(always)]
375    fn from(variant: COMPARE0_STOP_A) -> Self {
376        variant as u8 != 0
377    }
378}
379impl COMPARE0_STOP_R {
380    #[doc = "Get enumerated values variant"]
381    #[inline(always)]
382    pub fn variant(&self) -> COMPARE0_STOP_A {
383        match self.bits {
384            false => COMPARE0_STOP_A::DISABLED,
385            true => COMPARE0_STOP_A::ENABLED,
386        }
387    }
388    #[doc = "Checks if the value of the field is `DISABLED`"]
389    #[inline(always)]
390    pub fn is_disabled(&self) -> bool {
391        *self == COMPARE0_STOP_A::DISABLED
392    }
393    #[doc = "Checks if the value of the field is `ENABLED`"]
394    #[inline(always)]
395    pub fn is_enabled(&self) -> bool {
396        *self == COMPARE0_STOP_A::ENABLED
397    }
398}
399#[doc = "Field `COMPARE0_STOP` writer - Shortcut between COMPARE\\[0\\]
400event and STOP task"]
401pub type COMPARE0_STOP_W<'a, const O: u8> =
402    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_STOP_A, O>;
403impl<'a, const O: u8> COMPARE0_STOP_W<'a, O> {
404    #[doc = "Disable shortcut"]
405    #[inline(always)]
406    pub fn disabled(self) -> &'a mut W {
407        self.variant(COMPARE0_STOP_A::DISABLED)
408    }
409    #[doc = "Enable shortcut"]
410    #[inline(always)]
411    pub fn enabled(self) -> &'a mut W {
412        self.variant(COMPARE0_STOP_A::ENABLED)
413    }
414}
415#[doc = "Field `COMPARE1_STOP` reader - Shortcut between COMPARE\\[1\\]
416event and STOP task"]
417pub type COMPARE1_STOP_R = crate::BitReader<COMPARE1_STOP_A>;
418#[doc = "Shortcut between COMPARE\\[1\\]
419event and STOP task\n\nValue on reset: 0"]
420#[derive(Clone, Copy, Debug, PartialEq)]
421pub enum COMPARE1_STOP_A {
422    #[doc = "0: Disable shortcut"]
423    DISABLED = 0,
424    #[doc = "1: Enable shortcut"]
425    ENABLED = 1,
426}
427impl From<COMPARE1_STOP_A> for bool {
428    #[inline(always)]
429    fn from(variant: COMPARE1_STOP_A) -> Self {
430        variant as u8 != 0
431    }
432}
433impl COMPARE1_STOP_R {
434    #[doc = "Get enumerated values variant"]
435    #[inline(always)]
436    pub fn variant(&self) -> COMPARE1_STOP_A {
437        match self.bits {
438            false => COMPARE1_STOP_A::DISABLED,
439            true => COMPARE1_STOP_A::ENABLED,
440        }
441    }
442    #[doc = "Checks if the value of the field is `DISABLED`"]
443    #[inline(always)]
444    pub fn is_disabled(&self) -> bool {
445        *self == COMPARE1_STOP_A::DISABLED
446    }
447    #[doc = "Checks if the value of the field is `ENABLED`"]
448    #[inline(always)]
449    pub fn is_enabled(&self) -> bool {
450        *self == COMPARE1_STOP_A::ENABLED
451    }
452}
453#[doc = "Field `COMPARE1_STOP` writer - Shortcut between COMPARE\\[1\\]
454event and STOP task"]
455pub type COMPARE1_STOP_W<'a, const O: u8> =
456    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_STOP_A, O>;
457impl<'a, const O: u8> COMPARE1_STOP_W<'a, O> {
458    #[doc = "Disable shortcut"]
459    #[inline(always)]
460    pub fn disabled(self) -> &'a mut W {
461        self.variant(COMPARE1_STOP_A::DISABLED)
462    }
463    #[doc = "Enable shortcut"]
464    #[inline(always)]
465    pub fn enabled(self) -> &'a mut W {
466        self.variant(COMPARE1_STOP_A::ENABLED)
467    }
468}
469#[doc = "Field `COMPARE2_STOP` reader - Shortcut between COMPARE\\[2\\]
470event and STOP task"]
471pub type COMPARE2_STOP_R = crate::BitReader<COMPARE2_STOP_A>;
472#[doc = "Shortcut between COMPARE\\[2\\]
473event and STOP task\n\nValue on reset: 0"]
474#[derive(Clone, Copy, Debug, PartialEq)]
475pub enum COMPARE2_STOP_A {
476    #[doc = "0: Disable shortcut"]
477    DISABLED = 0,
478    #[doc = "1: Enable shortcut"]
479    ENABLED = 1,
480}
481impl From<COMPARE2_STOP_A> for bool {
482    #[inline(always)]
483    fn from(variant: COMPARE2_STOP_A) -> Self {
484        variant as u8 != 0
485    }
486}
487impl COMPARE2_STOP_R {
488    #[doc = "Get enumerated values variant"]
489    #[inline(always)]
490    pub fn variant(&self) -> COMPARE2_STOP_A {
491        match self.bits {
492            false => COMPARE2_STOP_A::DISABLED,
493            true => COMPARE2_STOP_A::ENABLED,
494        }
495    }
496    #[doc = "Checks if the value of the field is `DISABLED`"]
497    #[inline(always)]
498    pub fn is_disabled(&self) -> bool {
499        *self == COMPARE2_STOP_A::DISABLED
500    }
501    #[doc = "Checks if the value of the field is `ENABLED`"]
502    #[inline(always)]
503    pub fn is_enabled(&self) -> bool {
504        *self == COMPARE2_STOP_A::ENABLED
505    }
506}
507#[doc = "Field `COMPARE2_STOP` writer - Shortcut between COMPARE\\[2\\]
508event and STOP task"]
509pub type COMPARE2_STOP_W<'a, const O: u8> =
510    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_STOP_A, O>;
511impl<'a, const O: u8> COMPARE2_STOP_W<'a, O> {
512    #[doc = "Disable shortcut"]
513    #[inline(always)]
514    pub fn disabled(self) -> &'a mut W {
515        self.variant(COMPARE2_STOP_A::DISABLED)
516    }
517    #[doc = "Enable shortcut"]
518    #[inline(always)]
519    pub fn enabled(self) -> &'a mut W {
520        self.variant(COMPARE2_STOP_A::ENABLED)
521    }
522}
523#[doc = "Field `COMPARE3_STOP` reader - Shortcut between COMPARE\\[3\\]
524event and STOP task"]
525pub type COMPARE3_STOP_R = crate::BitReader<COMPARE3_STOP_A>;
526#[doc = "Shortcut between COMPARE\\[3\\]
527event and STOP task\n\nValue on reset: 0"]
528#[derive(Clone, Copy, Debug, PartialEq)]
529pub enum COMPARE3_STOP_A {
530    #[doc = "0: Disable shortcut"]
531    DISABLED = 0,
532    #[doc = "1: Enable shortcut"]
533    ENABLED = 1,
534}
535impl From<COMPARE3_STOP_A> for bool {
536    #[inline(always)]
537    fn from(variant: COMPARE3_STOP_A) -> Self {
538        variant as u8 != 0
539    }
540}
541impl COMPARE3_STOP_R {
542    #[doc = "Get enumerated values variant"]
543    #[inline(always)]
544    pub fn variant(&self) -> COMPARE3_STOP_A {
545        match self.bits {
546            false => COMPARE3_STOP_A::DISABLED,
547            true => COMPARE3_STOP_A::ENABLED,
548        }
549    }
550    #[doc = "Checks if the value of the field is `DISABLED`"]
551    #[inline(always)]
552    pub fn is_disabled(&self) -> bool {
553        *self == COMPARE3_STOP_A::DISABLED
554    }
555    #[doc = "Checks if the value of the field is `ENABLED`"]
556    #[inline(always)]
557    pub fn is_enabled(&self) -> bool {
558        *self == COMPARE3_STOP_A::ENABLED
559    }
560}
561#[doc = "Field `COMPARE3_STOP` writer - Shortcut between COMPARE\\[3\\]
562event and STOP task"]
563pub type COMPARE3_STOP_W<'a, const O: u8> =
564    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_STOP_A, O>;
565impl<'a, const O: u8> COMPARE3_STOP_W<'a, O> {
566    #[doc = "Disable shortcut"]
567    #[inline(always)]
568    pub fn disabled(self) -> &'a mut W {
569        self.variant(COMPARE3_STOP_A::DISABLED)
570    }
571    #[doc = "Enable shortcut"]
572    #[inline(always)]
573    pub fn enabled(self) -> &'a mut W {
574        self.variant(COMPARE3_STOP_A::ENABLED)
575    }
576}
577#[doc = "Field `COMPARE4_STOP` reader - Shortcut between COMPARE\\[4\\]
578event and STOP task"]
579pub type COMPARE4_STOP_R = crate::BitReader<COMPARE4_STOP_A>;
580#[doc = "Shortcut between COMPARE\\[4\\]
581event and STOP task\n\nValue on reset: 0"]
582#[derive(Clone, Copy, Debug, PartialEq)]
583pub enum COMPARE4_STOP_A {
584    #[doc = "0: Disable shortcut"]
585    DISABLED = 0,
586    #[doc = "1: Enable shortcut"]
587    ENABLED = 1,
588}
589impl From<COMPARE4_STOP_A> for bool {
590    #[inline(always)]
591    fn from(variant: COMPARE4_STOP_A) -> Self {
592        variant as u8 != 0
593    }
594}
595impl COMPARE4_STOP_R {
596    #[doc = "Get enumerated values variant"]
597    #[inline(always)]
598    pub fn variant(&self) -> COMPARE4_STOP_A {
599        match self.bits {
600            false => COMPARE4_STOP_A::DISABLED,
601            true => COMPARE4_STOP_A::ENABLED,
602        }
603    }
604    #[doc = "Checks if the value of the field is `DISABLED`"]
605    #[inline(always)]
606    pub fn is_disabled(&self) -> bool {
607        *self == COMPARE4_STOP_A::DISABLED
608    }
609    #[doc = "Checks if the value of the field is `ENABLED`"]
610    #[inline(always)]
611    pub fn is_enabled(&self) -> bool {
612        *self == COMPARE4_STOP_A::ENABLED
613    }
614}
615#[doc = "Field `COMPARE4_STOP` writer - Shortcut between COMPARE\\[4\\]
616event and STOP task"]
617pub type COMPARE4_STOP_W<'a, const O: u8> =
618    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_STOP_A, O>;
619impl<'a, const O: u8> COMPARE4_STOP_W<'a, O> {
620    #[doc = "Disable shortcut"]
621    #[inline(always)]
622    pub fn disabled(self) -> &'a mut W {
623        self.variant(COMPARE4_STOP_A::DISABLED)
624    }
625    #[doc = "Enable shortcut"]
626    #[inline(always)]
627    pub fn enabled(self) -> &'a mut W {
628        self.variant(COMPARE4_STOP_A::ENABLED)
629    }
630}
631#[doc = "Field `COMPARE5_STOP` reader - Shortcut between COMPARE\\[5\\]
632event and STOP task"]
633pub type COMPARE5_STOP_R = crate::BitReader<COMPARE5_STOP_A>;
634#[doc = "Shortcut between COMPARE\\[5\\]
635event and STOP task\n\nValue on reset: 0"]
636#[derive(Clone, Copy, Debug, PartialEq)]
637pub enum COMPARE5_STOP_A {
638    #[doc = "0: Disable shortcut"]
639    DISABLED = 0,
640    #[doc = "1: Enable shortcut"]
641    ENABLED = 1,
642}
643impl From<COMPARE5_STOP_A> for bool {
644    #[inline(always)]
645    fn from(variant: COMPARE5_STOP_A) -> Self {
646        variant as u8 != 0
647    }
648}
649impl COMPARE5_STOP_R {
650    #[doc = "Get enumerated values variant"]
651    #[inline(always)]
652    pub fn variant(&self) -> COMPARE5_STOP_A {
653        match self.bits {
654            false => COMPARE5_STOP_A::DISABLED,
655            true => COMPARE5_STOP_A::ENABLED,
656        }
657    }
658    #[doc = "Checks if the value of the field is `DISABLED`"]
659    #[inline(always)]
660    pub fn is_disabled(&self) -> bool {
661        *self == COMPARE5_STOP_A::DISABLED
662    }
663    #[doc = "Checks if the value of the field is `ENABLED`"]
664    #[inline(always)]
665    pub fn is_enabled(&self) -> bool {
666        *self == COMPARE5_STOP_A::ENABLED
667    }
668}
669#[doc = "Field `COMPARE5_STOP` writer - Shortcut between COMPARE\\[5\\]
670event and STOP task"]
671pub type COMPARE5_STOP_W<'a, const O: u8> =
672    crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_STOP_A, O>;
673impl<'a, const O: u8> COMPARE5_STOP_W<'a, O> {
674    #[doc = "Disable shortcut"]
675    #[inline(always)]
676    pub fn disabled(self) -> &'a mut W {
677        self.variant(COMPARE5_STOP_A::DISABLED)
678    }
679    #[doc = "Enable shortcut"]
680    #[inline(always)]
681    pub fn enabled(self) -> &'a mut W {
682        self.variant(COMPARE5_STOP_A::ENABLED)
683    }
684}
685impl R {
686    #[doc = "Bit 0 - Shortcut between COMPARE\\[0\\]
687event and CLEAR task"]
688    #[inline(always)]
689    pub fn compare0_clear(&self) -> COMPARE0_CLEAR_R {
690        COMPARE0_CLEAR_R::new((self.bits & 1) != 0)
691    }
692    #[doc = "Bit 1 - Shortcut between COMPARE\\[1\\]
693event and CLEAR task"]
694    #[inline(always)]
695    pub fn compare1_clear(&self) -> COMPARE1_CLEAR_R {
696        COMPARE1_CLEAR_R::new(((self.bits >> 1) & 1) != 0)
697    }
698    #[doc = "Bit 2 - Shortcut between COMPARE\\[2\\]
699event and CLEAR task"]
700    #[inline(always)]
701    pub fn compare2_clear(&self) -> COMPARE2_CLEAR_R {
702        COMPARE2_CLEAR_R::new(((self.bits >> 2) & 1) != 0)
703    }
704    #[doc = "Bit 3 - Shortcut between COMPARE\\[3\\]
705event and CLEAR task"]
706    #[inline(always)]
707    pub fn compare3_clear(&self) -> COMPARE3_CLEAR_R {
708        COMPARE3_CLEAR_R::new(((self.bits >> 3) & 1) != 0)
709    }
710    #[doc = "Bit 4 - Shortcut between COMPARE\\[4\\]
711event and CLEAR task"]
712    #[inline(always)]
713    pub fn compare4_clear(&self) -> COMPARE4_CLEAR_R {
714        COMPARE4_CLEAR_R::new(((self.bits >> 4) & 1) != 0)
715    }
716    #[doc = "Bit 5 - Shortcut between COMPARE\\[5\\]
717event and CLEAR task"]
718    #[inline(always)]
719    pub fn compare5_clear(&self) -> COMPARE5_CLEAR_R {
720        COMPARE5_CLEAR_R::new(((self.bits >> 5) & 1) != 0)
721    }
722    #[doc = "Bit 8 - Shortcut between COMPARE\\[0\\]
723event and STOP task"]
724    #[inline(always)]
725    pub fn compare0_stop(&self) -> COMPARE0_STOP_R {
726        COMPARE0_STOP_R::new(((self.bits >> 8) & 1) != 0)
727    }
728    #[doc = "Bit 9 - Shortcut between COMPARE\\[1\\]
729event and STOP task"]
730    #[inline(always)]
731    pub fn compare1_stop(&self) -> COMPARE1_STOP_R {
732        COMPARE1_STOP_R::new(((self.bits >> 9) & 1) != 0)
733    }
734    #[doc = "Bit 10 - Shortcut between COMPARE\\[2\\]
735event and STOP task"]
736    #[inline(always)]
737    pub fn compare2_stop(&self) -> COMPARE2_STOP_R {
738        COMPARE2_STOP_R::new(((self.bits >> 10) & 1) != 0)
739    }
740    #[doc = "Bit 11 - Shortcut between COMPARE\\[3\\]
741event and STOP task"]
742    #[inline(always)]
743    pub fn compare3_stop(&self) -> COMPARE3_STOP_R {
744        COMPARE3_STOP_R::new(((self.bits >> 11) & 1) != 0)
745    }
746    #[doc = "Bit 12 - Shortcut between COMPARE\\[4\\]
747event and STOP task"]
748    #[inline(always)]
749    pub fn compare4_stop(&self) -> COMPARE4_STOP_R {
750        COMPARE4_STOP_R::new(((self.bits >> 12) & 1) != 0)
751    }
752    #[doc = "Bit 13 - Shortcut between COMPARE\\[5\\]
753event and STOP task"]
754    #[inline(always)]
755    pub fn compare5_stop(&self) -> COMPARE5_STOP_R {
756        COMPARE5_STOP_R::new(((self.bits >> 13) & 1) != 0)
757    }
758}
759impl W {
760    #[doc = "Bit 0 - Shortcut between COMPARE\\[0\\]
761event and CLEAR task"]
762    #[inline(always)]
763    pub fn compare0_clear(&mut self) -> COMPARE0_CLEAR_W<0> {
764        COMPARE0_CLEAR_W::new(self)
765    }
766    #[doc = "Bit 1 - Shortcut between COMPARE\\[1\\]
767event and CLEAR task"]
768    #[inline(always)]
769    pub fn compare1_clear(&mut self) -> COMPARE1_CLEAR_W<1> {
770        COMPARE1_CLEAR_W::new(self)
771    }
772    #[doc = "Bit 2 - Shortcut between COMPARE\\[2\\]
773event and CLEAR task"]
774    #[inline(always)]
775    pub fn compare2_clear(&mut self) -> COMPARE2_CLEAR_W<2> {
776        COMPARE2_CLEAR_W::new(self)
777    }
778    #[doc = "Bit 3 - Shortcut between COMPARE\\[3\\]
779event and CLEAR task"]
780    #[inline(always)]
781    pub fn compare3_clear(&mut self) -> COMPARE3_CLEAR_W<3> {
782        COMPARE3_CLEAR_W::new(self)
783    }
784    #[doc = "Bit 4 - Shortcut between COMPARE\\[4\\]
785event and CLEAR task"]
786    #[inline(always)]
787    pub fn compare4_clear(&mut self) -> COMPARE4_CLEAR_W<4> {
788        COMPARE4_CLEAR_W::new(self)
789    }
790    #[doc = "Bit 5 - Shortcut between COMPARE\\[5\\]
791event and CLEAR task"]
792    #[inline(always)]
793    pub fn compare5_clear(&mut self) -> COMPARE5_CLEAR_W<5> {
794        COMPARE5_CLEAR_W::new(self)
795    }
796    #[doc = "Bit 8 - Shortcut between COMPARE\\[0\\]
797event and STOP task"]
798    #[inline(always)]
799    pub fn compare0_stop(&mut self) -> COMPARE0_STOP_W<8> {
800        COMPARE0_STOP_W::new(self)
801    }
802    #[doc = "Bit 9 - Shortcut between COMPARE\\[1\\]
803event and STOP task"]
804    #[inline(always)]
805    pub fn compare1_stop(&mut self) -> COMPARE1_STOP_W<9> {
806        COMPARE1_STOP_W::new(self)
807    }
808    #[doc = "Bit 10 - Shortcut between COMPARE\\[2\\]
809event and STOP task"]
810    #[inline(always)]
811    pub fn compare2_stop(&mut self) -> COMPARE2_STOP_W<10> {
812        COMPARE2_STOP_W::new(self)
813    }
814    #[doc = "Bit 11 - Shortcut between COMPARE\\[3\\]
815event and STOP task"]
816    #[inline(always)]
817    pub fn compare3_stop(&mut self) -> COMPARE3_STOP_W<11> {
818        COMPARE3_STOP_W::new(self)
819    }
820    #[doc = "Bit 12 - Shortcut between COMPARE\\[4\\]
821event and STOP task"]
822    #[inline(always)]
823    pub fn compare4_stop(&mut self) -> COMPARE4_STOP_W<12> {
824        COMPARE4_STOP_W::new(self)
825    }
826    #[doc = "Bit 13 - Shortcut between COMPARE\\[5\\]
827event and STOP task"]
828    #[inline(always)]
829    pub fn compare5_stop(&mut self) -> COMPARE5_STOP_W<13> {
830        COMPARE5_STOP_W::new(self)
831    }
832    #[doc = "Writes raw bits to the register."]
833    #[inline(always)]
834    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
835        self.0.bits(bits);
836        self
837    }
838}
839#[doc = "Shortcut 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 [shorts](index.html) module"]
840pub struct SHORTS_SPEC;
841impl crate::RegisterSpec for SHORTS_SPEC {
842    type Ux = u32;
843}
844#[doc = "`read()` method returns [shorts::R](R) reader structure"]
845impl crate::Readable for SHORTS_SPEC {
846    type Reader = R;
847}
848#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"]
849impl crate::Writable for SHORTS_SPEC {
850    type Writer = W;
851}
852#[doc = "`reset()` method sets SHORTS to value 0"]
853impl crate::Resettable for SHORTS_SPEC {
854    #[inline(always)]
855    fn reset_value() -> Self::Ux {
856        0
857    }
858}