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