1#[doc = "Register `INTENSET` reader"]
2pub struct R(crate::R<INTENSET_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INTENSET_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INTENSET_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INTENSET` writer"]
17pub struct W(crate::W<INTENSET_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INTENSET_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<INTENSET_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"]
38pub type STOPPED_R = crate::BitReader<STOPPED_A>;
39#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum STOPPED_A {
42 #[doc = "0: Read: Disabled"]
43 DISABLED = 0,
44 #[doc = "1: Read: Enabled"]
45 ENABLED = 1,
46}
47impl From<STOPPED_A> for bool {
48 #[inline(always)]
49 fn from(variant: STOPPED_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl STOPPED_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> STOPPED_A {
57 match self.bits {
58 false => STOPPED_A::DISABLED,
59 true => STOPPED_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 == STOPPED_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 == STOPPED_A::ENABLED
71 }
72}
73#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
74#[derive(Clone, Copy, Debug, PartialEq)]
75pub enum STOPPED_AW {
76 #[doc = "1: Enable"]
77 SET = 1,
78}
79impl From<STOPPED_AW> for bool {
80 #[inline(always)]
81 fn from(variant: STOPPED_AW) -> Self {
82 variant as u8 != 0
83 }
84}
85#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"]
86pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>;
87impl<'a, const O: u8> STOPPED_W<'a, O> {
88 #[doc = "Enable"]
89 #[inline(always)]
90 pub fn set(self) -> &'a mut W {
91 self.variant(STOPPED_AW::SET)
92 }
93}
94#[doc = "Field `SEQSTARTED0` reader - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"]
95pub type SEQSTARTED0_R = crate::BitReader<SEQSTARTED0_A>;
96#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"]
97#[derive(Clone, Copy, Debug, PartialEq)]
98pub enum SEQSTARTED0_A {
99 #[doc = "0: Read: Disabled"]
100 DISABLED = 0,
101 #[doc = "1: Read: Enabled"]
102 ENABLED = 1,
103}
104impl From<SEQSTARTED0_A> for bool {
105 #[inline(always)]
106 fn from(variant: SEQSTARTED0_A) -> Self {
107 variant as u8 != 0
108 }
109}
110impl SEQSTARTED0_R {
111 #[doc = "Get enumerated values variant"]
112 #[inline(always)]
113 pub fn variant(&self) -> SEQSTARTED0_A {
114 match self.bits {
115 false => SEQSTARTED0_A::DISABLED,
116 true => SEQSTARTED0_A::ENABLED,
117 }
118 }
119 #[doc = "Checks if the value of the field is `DISABLED`"]
120 #[inline(always)]
121 pub fn is_disabled(&self) -> bool {
122 *self == SEQSTARTED0_A::DISABLED
123 }
124 #[doc = "Checks if the value of the field is `ENABLED`"]
125 #[inline(always)]
126 pub fn is_enabled(&self) -> bool {
127 *self == SEQSTARTED0_A::ENABLED
128 }
129}
130#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"]
131#[derive(Clone, Copy, Debug, PartialEq)]
132pub enum SEQSTARTED0_AW {
133 #[doc = "1: Enable"]
134 SET = 1,
135}
136impl From<SEQSTARTED0_AW> for bool {
137 #[inline(always)]
138 fn from(variant: SEQSTARTED0_AW) -> Self {
139 variant as u8 != 0
140 }
141}
142#[doc = "Field `SEQSTARTED0` writer - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"]
143pub type SEQSTARTED0_W<'a, const O: u8> =
144 crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED0_AW, O>;
145impl<'a, const O: u8> SEQSTARTED0_W<'a, O> {
146 #[doc = "Enable"]
147 #[inline(always)]
148 pub fn set(self) -> &'a mut W {
149 self.variant(SEQSTARTED0_AW::SET)
150 }
151}
152#[doc = "Field `SEQSTARTED1` reader - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"]
153pub type SEQSTARTED1_R = crate::BitReader<SEQSTARTED1_A>;
154#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"]
155#[derive(Clone, Copy, Debug, PartialEq)]
156pub enum SEQSTARTED1_A {
157 #[doc = "0: Read: Disabled"]
158 DISABLED = 0,
159 #[doc = "1: Read: Enabled"]
160 ENABLED = 1,
161}
162impl From<SEQSTARTED1_A> for bool {
163 #[inline(always)]
164 fn from(variant: SEQSTARTED1_A) -> Self {
165 variant as u8 != 0
166 }
167}
168impl SEQSTARTED1_R {
169 #[doc = "Get enumerated values variant"]
170 #[inline(always)]
171 pub fn variant(&self) -> SEQSTARTED1_A {
172 match self.bits {
173 false => SEQSTARTED1_A::DISABLED,
174 true => SEQSTARTED1_A::ENABLED,
175 }
176 }
177 #[doc = "Checks if the value of the field is `DISABLED`"]
178 #[inline(always)]
179 pub fn is_disabled(&self) -> bool {
180 *self == SEQSTARTED1_A::DISABLED
181 }
182 #[doc = "Checks if the value of the field is `ENABLED`"]
183 #[inline(always)]
184 pub fn is_enabled(&self) -> bool {
185 *self == SEQSTARTED1_A::ENABLED
186 }
187}
188#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"]
189#[derive(Clone, Copy, Debug, PartialEq)]
190pub enum SEQSTARTED1_AW {
191 #[doc = "1: Enable"]
192 SET = 1,
193}
194impl From<SEQSTARTED1_AW> for bool {
195 #[inline(always)]
196 fn from(variant: SEQSTARTED1_AW) -> Self {
197 variant as u8 != 0
198 }
199}
200#[doc = "Field `SEQSTARTED1` writer - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"]
201pub type SEQSTARTED1_W<'a, const O: u8> =
202 crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED1_AW, O>;
203impl<'a, const O: u8> SEQSTARTED1_W<'a, O> {
204 #[doc = "Enable"]
205 #[inline(always)]
206 pub fn set(self) -> &'a mut W {
207 self.variant(SEQSTARTED1_AW::SET)
208 }
209}
210#[doc = "Field `SEQEND0` reader - Write '1' to enable interrupt for event SEQEND\\[0\\]"]
211pub type SEQEND0_R = crate::BitReader<SEQEND0_A>;
212#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"]
213#[derive(Clone, Copy, Debug, PartialEq)]
214pub enum SEQEND0_A {
215 #[doc = "0: Read: Disabled"]
216 DISABLED = 0,
217 #[doc = "1: Read: Enabled"]
218 ENABLED = 1,
219}
220impl From<SEQEND0_A> for bool {
221 #[inline(always)]
222 fn from(variant: SEQEND0_A) -> Self {
223 variant as u8 != 0
224 }
225}
226impl SEQEND0_R {
227 #[doc = "Get enumerated values variant"]
228 #[inline(always)]
229 pub fn variant(&self) -> SEQEND0_A {
230 match self.bits {
231 false => SEQEND0_A::DISABLED,
232 true => SEQEND0_A::ENABLED,
233 }
234 }
235 #[doc = "Checks if the value of the field is `DISABLED`"]
236 #[inline(always)]
237 pub fn is_disabled(&self) -> bool {
238 *self == SEQEND0_A::DISABLED
239 }
240 #[doc = "Checks if the value of the field is `ENABLED`"]
241 #[inline(always)]
242 pub fn is_enabled(&self) -> bool {
243 *self == SEQEND0_A::ENABLED
244 }
245}
246#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"]
247#[derive(Clone, Copy, Debug, PartialEq)]
248pub enum SEQEND0_AW {
249 #[doc = "1: Enable"]
250 SET = 1,
251}
252impl From<SEQEND0_AW> for bool {
253 #[inline(always)]
254 fn from(variant: SEQEND0_AW) -> Self {
255 variant as u8 != 0
256 }
257}
258#[doc = "Field `SEQEND0` writer - Write '1' to enable interrupt for event SEQEND\\[0\\]"]
259pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND0_AW, O>;
260impl<'a, const O: u8> SEQEND0_W<'a, O> {
261 #[doc = "Enable"]
262 #[inline(always)]
263 pub fn set(self) -> &'a mut W {
264 self.variant(SEQEND0_AW::SET)
265 }
266}
267#[doc = "Field `SEQEND1` reader - Write '1' to enable interrupt for event SEQEND\\[1\\]"]
268pub type SEQEND1_R = crate::BitReader<SEQEND1_A>;
269#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"]
270#[derive(Clone, Copy, Debug, PartialEq)]
271pub enum SEQEND1_A {
272 #[doc = "0: Read: Disabled"]
273 DISABLED = 0,
274 #[doc = "1: Read: Enabled"]
275 ENABLED = 1,
276}
277impl From<SEQEND1_A> for bool {
278 #[inline(always)]
279 fn from(variant: SEQEND1_A) -> Self {
280 variant as u8 != 0
281 }
282}
283impl SEQEND1_R {
284 #[doc = "Get enumerated values variant"]
285 #[inline(always)]
286 pub fn variant(&self) -> SEQEND1_A {
287 match self.bits {
288 false => SEQEND1_A::DISABLED,
289 true => SEQEND1_A::ENABLED,
290 }
291 }
292 #[doc = "Checks if the value of the field is `DISABLED`"]
293 #[inline(always)]
294 pub fn is_disabled(&self) -> bool {
295 *self == SEQEND1_A::DISABLED
296 }
297 #[doc = "Checks if the value of the field is `ENABLED`"]
298 #[inline(always)]
299 pub fn is_enabled(&self) -> bool {
300 *self == SEQEND1_A::ENABLED
301 }
302}
303#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"]
304#[derive(Clone, Copy, Debug, PartialEq)]
305pub enum SEQEND1_AW {
306 #[doc = "1: Enable"]
307 SET = 1,
308}
309impl From<SEQEND1_AW> for bool {
310 #[inline(always)]
311 fn from(variant: SEQEND1_AW) -> Self {
312 variant as u8 != 0
313 }
314}
315#[doc = "Field `SEQEND1` writer - Write '1' to enable interrupt for event SEQEND\\[1\\]"]
316pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND1_AW, O>;
317impl<'a, const O: u8> SEQEND1_W<'a, O> {
318 #[doc = "Enable"]
319 #[inline(always)]
320 pub fn set(self) -> &'a mut W {
321 self.variant(SEQEND1_AW::SET)
322 }
323}
324#[doc = "Field `PWMPERIODEND` reader - Write '1' to enable interrupt for event PWMPERIODEND"]
325pub type PWMPERIODEND_R = crate::BitReader<PWMPERIODEND_A>;
326#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"]
327#[derive(Clone, Copy, Debug, PartialEq)]
328pub enum PWMPERIODEND_A {
329 #[doc = "0: Read: Disabled"]
330 DISABLED = 0,
331 #[doc = "1: Read: Enabled"]
332 ENABLED = 1,
333}
334impl From<PWMPERIODEND_A> for bool {
335 #[inline(always)]
336 fn from(variant: PWMPERIODEND_A) -> Self {
337 variant as u8 != 0
338 }
339}
340impl PWMPERIODEND_R {
341 #[doc = "Get enumerated values variant"]
342 #[inline(always)]
343 pub fn variant(&self) -> PWMPERIODEND_A {
344 match self.bits {
345 false => PWMPERIODEND_A::DISABLED,
346 true => PWMPERIODEND_A::ENABLED,
347 }
348 }
349 #[doc = "Checks if the value of the field is `DISABLED`"]
350 #[inline(always)]
351 pub fn is_disabled(&self) -> bool {
352 *self == PWMPERIODEND_A::DISABLED
353 }
354 #[doc = "Checks if the value of the field is `ENABLED`"]
355 #[inline(always)]
356 pub fn is_enabled(&self) -> bool {
357 *self == PWMPERIODEND_A::ENABLED
358 }
359}
360#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"]
361#[derive(Clone, Copy, Debug, PartialEq)]
362pub enum PWMPERIODEND_AW {
363 #[doc = "1: Enable"]
364 SET = 1,
365}
366impl From<PWMPERIODEND_AW> for bool {
367 #[inline(always)]
368 fn from(variant: PWMPERIODEND_AW) -> Self {
369 variant as u8 != 0
370 }
371}
372#[doc = "Field `PWMPERIODEND` writer - Write '1' to enable interrupt for event PWMPERIODEND"]
373pub type PWMPERIODEND_W<'a, const O: u8> =
374 crate::BitWriter<'a, u32, INTENSET_SPEC, PWMPERIODEND_AW, O>;
375impl<'a, const O: u8> PWMPERIODEND_W<'a, O> {
376 #[doc = "Enable"]
377 #[inline(always)]
378 pub fn set(self) -> &'a mut W {
379 self.variant(PWMPERIODEND_AW::SET)
380 }
381}
382#[doc = "Field `LOOPSDONE` reader - Write '1' to enable interrupt for event LOOPSDONE"]
383pub type LOOPSDONE_R = crate::BitReader<LOOPSDONE_A>;
384#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"]
385#[derive(Clone, Copy, Debug, PartialEq)]
386pub enum LOOPSDONE_A {
387 #[doc = "0: Read: Disabled"]
388 DISABLED = 0,
389 #[doc = "1: Read: Enabled"]
390 ENABLED = 1,
391}
392impl From<LOOPSDONE_A> for bool {
393 #[inline(always)]
394 fn from(variant: LOOPSDONE_A) -> Self {
395 variant as u8 != 0
396 }
397}
398impl LOOPSDONE_R {
399 #[doc = "Get enumerated values variant"]
400 #[inline(always)]
401 pub fn variant(&self) -> LOOPSDONE_A {
402 match self.bits {
403 false => LOOPSDONE_A::DISABLED,
404 true => LOOPSDONE_A::ENABLED,
405 }
406 }
407 #[doc = "Checks if the value of the field is `DISABLED`"]
408 #[inline(always)]
409 pub fn is_disabled(&self) -> bool {
410 *self == LOOPSDONE_A::DISABLED
411 }
412 #[doc = "Checks if the value of the field is `ENABLED`"]
413 #[inline(always)]
414 pub fn is_enabled(&self) -> bool {
415 *self == LOOPSDONE_A::ENABLED
416 }
417}
418#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"]
419#[derive(Clone, Copy, Debug, PartialEq)]
420pub enum LOOPSDONE_AW {
421 #[doc = "1: Enable"]
422 SET = 1,
423}
424impl From<LOOPSDONE_AW> for bool {
425 #[inline(always)]
426 fn from(variant: LOOPSDONE_AW) -> Self {
427 variant as u8 != 0
428 }
429}
430#[doc = "Field `LOOPSDONE` writer - Write '1' to enable interrupt for event LOOPSDONE"]
431pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LOOPSDONE_AW, O>;
432impl<'a, const O: u8> LOOPSDONE_W<'a, O> {
433 #[doc = "Enable"]
434 #[inline(always)]
435 pub fn set(self) -> &'a mut W {
436 self.variant(LOOPSDONE_AW::SET)
437 }
438}
439impl R {
440 #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"]
441 #[inline(always)]
442 pub fn stopped(&self) -> STOPPED_R {
443 STOPPED_R::new(((self.bits >> 1) & 1) != 0)
444 }
445 #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"]
446 #[inline(always)]
447 pub fn seqstarted0(&self) -> SEQSTARTED0_R {
448 SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0)
449 }
450 #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"]
451 #[inline(always)]
452 pub fn seqstarted1(&self) -> SEQSTARTED1_R {
453 SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0)
454 }
455 #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"]
456 #[inline(always)]
457 pub fn seqend0(&self) -> SEQEND0_R {
458 SEQEND0_R::new(((self.bits >> 4) & 1) != 0)
459 }
460 #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"]
461 #[inline(always)]
462 pub fn seqend1(&self) -> SEQEND1_R {
463 SEQEND1_R::new(((self.bits >> 5) & 1) != 0)
464 }
465 #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"]
466 #[inline(always)]
467 pub fn pwmperiodend(&self) -> PWMPERIODEND_R {
468 PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0)
469 }
470 #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"]
471 #[inline(always)]
472 pub fn loopsdone(&self) -> LOOPSDONE_R {
473 LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0)
474 }
475}
476impl W {
477 #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"]
478 #[inline(always)]
479 pub fn stopped(&mut self) -> STOPPED_W<1> {
480 STOPPED_W::new(self)
481 }
482 #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"]
483 #[inline(always)]
484 pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> {
485 SEQSTARTED0_W::new(self)
486 }
487 #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"]
488 #[inline(always)]
489 pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> {
490 SEQSTARTED1_W::new(self)
491 }
492 #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"]
493 #[inline(always)]
494 pub fn seqend0(&mut self) -> SEQEND0_W<4> {
495 SEQEND0_W::new(self)
496 }
497 #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"]
498 #[inline(always)]
499 pub fn seqend1(&mut self) -> SEQEND1_W<5> {
500 SEQEND1_W::new(self)
501 }
502 #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"]
503 #[inline(always)]
504 pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> {
505 PWMPERIODEND_W::new(self)
506 }
507 #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"]
508 #[inline(always)]
509 pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> {
510 LOOPSDONE_W::new(self)
511 }
512 #[doc = "Writes raw bits to the register."]
513 #[inline(always)]
514 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
515 self.0.bits(bits);
516 self
517 }
518}
519#[doc = "Enable 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 [intenset](index.html) module"]
520pub struct INTENSET_SPEC;
521impl crate::RegisterSpec for INTENSET_SPEC {
522 type Ux = u32;
523}
524#[doc = "`read()` method returns [intenset::R](R) reader structure"]
525impl crate::Readable for INTENSET_SPEC {
526 type Reader = R;
527}
528#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
529impl crate::Writable for INTENSET_SPEC {
530 type Writer = W;
531}
532#[doc = "`reset()` method sets INTENSET to value 0"]
533impl crate::Resettable for INTENSET_SPEC {
534 #[inline(always)]
535 fn reset_value() -> Self::Ux {
536 0
537 }
538}