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 = "Master Pending interrupt Enable.\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum MSTPENDINGEN_A {
40 #[doc = "0: Disabled. The MstPending interrupt is disabled."]
41 DISABLED = 0,
42 #[doc = "1: Enabled. The MstPending interrupt is enabled."]
43 ENABLED = 1,
44}
45impl From<MSTPENDINGEN_A> for bool {
46 #[inline(always)]
47 fn from(variant: MSTPENDINGEN_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `MSTPENDINGEN` reader - Master Pending interrupt Enable."]
52pub struct MSTPENDINGEN_R(crate::FieldReader<bool, MSTPENDINGEN_A>);
53impl MSTPENDINGEN_R {
54 pub(crate) fn new(bits: bool) -> Self {
55 MSTPENDINGEN_R(crate::FieldReader::new(bits))
56 }
57 #[doc = r"Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> MSTPENDINGEN_A {
60 match self.bits {
61 false => MSTPENDINGEN_A::DISABLED,
62 true => MSTPENDINGEN_A::ENABLED,
63 }
64 }
65 #[doc = "Checks if the value of the field is `DISABLED`"]
66 #[inline(always)]
67 pub fn is_disabled(&self) -> bool {
68 **self == MSTPENDINGEN_A::DISABLED
69 }
70 #[doc = "Checks if the value of the field is `ENABLED`"]
71 #[inline(always)]
72 pub fn is_enabled(&self) -> bool {
73 **self == MSTPENDINGEN_A::ENABLED
74 }
75}
76impl core::ops::Deref for MSTPENDINGEN_R {
77 type Target = crate::FieldReader<bool, MSTPENDINGEN_A>;
78 #[inline(always)]
79 fn deref(&self) -> &Self::Target {
80 &self.0
81 }
82}
83#[doc = "Field `MSTPENDINGEN` writer - Master Pending interrupt Enable."]
84pub struct MSTPENDINGEN_W<'a> {
85 w: &'a mut W,
86}
87impl<'a> MSTPENDINGEN_W<'a> {
88 #[doc = r"Writes `variant` to the field"]
89 #[inline(always)]
90 pub fn variant(self, variant: MSTPENDINGEN_A) -> &'a mut W {
91 self.bit(variant.into())
92 }
93 #[doc = "Disabled. The MstPending interrupt is disabled."]
94 #[inline(always)]
95 pub fn disabled(self) -> &'a mut W {
96 self.variant(MSTPENDINGEN_A::DISABLED)
97 }
98 #[doc = "Enabled. The MstPending interrupt is enabled."]
99 #[inline(always)]
100 pub fn enabled(self) -> &'a mut W {
101 self.variant(MSTPENDINGEN_A::ENABLED)
102 }
103 #[doc = r"Sets the field bit"]
104 #[inline(always)]
105 pub fn set_bit(self) -> &'a mut W {
106 self.bit(true)
107 }
108 #[doc = r"Clears the field bit"]
109 #[inline(always)]
110 pub fn clear_bit(self) -> &'a mut W {
111 self.bit(false)
112 }
113 #[doc = r"Writes raw bits to the field"]
114 #[inline(always)]
115 pub fn bit(self, value: bool) -> &'a mut W {
116 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
117 self.w
118 }
119}
120#[doc = "Master Arbitration Loss interrupt Enable.\n\nValue on reset: 0"]
121#[derive(Clone, Copy, Debug, PartialEq)]
122pub enum MSTARBLOSSEN_A {
123 #[doc = "0: Disabled. The MstArbLoss interrupt is disabled."]
124 DISABLED = 0,
125 #[doc = "1: Enabled. The MstArbLoss interrupt is enabled."]
126 ENABLED = 1,
127}
128impl From<MSTARBLOSSEN_A> for bool {
129 #[inline(always)]
130 fn from(variant: MSTARBLOSSEN_A) -> Self {
131 variant as u8 != 0
132 }
133}
134#[doc = "Field `MSTARBLOSSEN` reader - Master Arbitration Loss interrupt Enable."]
135pub struct MSTARBLOSSEN_R(crate::FieldReader<bool, MSTARBLOSSEN_A>);
136impl MSTARBLOSSEN_R {
137 pub(crate) fn new(bits: bool) -> Self {
138 MSTARBLOSSEN_R(crate::FieldReader::new(bits))
139 }
140 #[doc = r"Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> MSTARBLOSSEN_A {
143 match self.bits {
144 false => MSTARBLOSSEN_A::DISABLED,
145 true => MSTARBLOSSEN_A::ENABLED,
146 }
147 }
148 #[doc = "Checks if the value of the field is `DISABLED`"]
149 #[inline(always)]
150 pub fn is_disabled(&self) -> bool {
151 **self == MSTARBLOSSEN_A::DISABLED
152 }
153 #[doc = "Checks if the value of the field is `ENABLED`"]
154 #[inline(always)]
155 pub fn is_enabled(&self) -> bool {
156 **self == MSTARBLOSSEN_A::ENABLED
157 }
158}
159impl core::ops::Deref for MSTARBLOSSEN_R {
160 type Target = crate::FieldReader<bool, MSTARBLOSSEN_A>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `MSTARBLOSSEN` writer - Master Arbitration Loss interrupt Enable."]
167pub struct MSTARBLOSSEN_W<'a> {
168 w: &'a mut W,
169}
170impl<'a> MSTARBLOSSEN_W<'a> {
171 #[doc = r"Writes `variant` to the field"]
172 #[inline(always)]
173 pub fn variant(self, variant: MSTARBLOSSEN_A) -> &'a mut W {
174 self.bit(variant.into())
175 }
176 #[doc = "Disabled. The MstArbLoss interrupt is disabled."]
177 #[inline(always)]
178 pub fn disabled(self) -> &'a mut W {
179 self.variant(MSTARBLOSSEN_A::DISABLED)
180 }
181 #[doc = "Enabled. The MstArbLoss interrupt is enabled."]
182 #[inline(always)]
183 pub fn enabled(self) -> &'a mut W {
184 self.variant(MSTARBLOSSEN_A::ENABLED)
185 }
186 #[doc = r"Sets the field bit"]
187 #[inline(always)]
188 pub fn set_bit(self) -> &'a mut W {
189 self.bit(true)
190 }
191 #[doc = r"Clears the field bit"]
192 #[inline(always)]
193 pub fn clear_bit(self) -> &'a mut W {
194 self.bit(false)
195 }
196 #[doc = r"Writes raw bits to the field"]
197 #[inline(always)]
198 pub fn bit(self, value: bool) -> &'a mut W {
199 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
200 self.w
201 }
202}
203#[doc = "Master Start/Stop Error interrupt Enable.\n\nValue on reset: 0"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum MSTSTSTPERREN_A {
206 #[doc = "0: Disabled. The MstStStpErr interrupt is disabled."]
207 DISABLED = 0,
208 #[doc = "1: Enabled. The MstStStpErr interrupt is enabled."]
209 ENABLED = 1,
210}
211impl From<MSTSTSTPERREN_A> for bool {
212 #[inline(always)]
213 fn from(variant: MSTSTSTPERREN_A) -> Self {
214 variant as u8 != 0
215 }
216}
217#[doc = "Field `MSTSTSTPERREN` reader - Master Start/Stop Error interrupt Enable."]
218pub struct MSTSTSTPERREN_R(crate::FieldReader<bool, MSTSTSTPERREN_A>);
219impl MSTSTSTPERREN_R {
220 pub(crate) fn new(bits: bool) -> Self {
221 MSTSTSTPERREN_R(crate::FieldReader::new(bits))
222 }
223 #[doc = r"Get enumerated values variant"]
224 #[inline(always)]
225 pub fn variant(&self) -> MSTSTSTPERREN_A {
226 match self.bits {
227 false => MSTSTSTPERREN_A::DISABLED,
228 true => MSTSTSTPERREN_A::ENABLED,
229 }
230 }
231 #[doc = "Checks if the value of the field is `DISABLED`"]
232 #[inline(always)]
233 pub fn is_disabled(&self) -> bool {
234 **self == MSTSTSTPERREN_A::DISABLED
235 }
236 #[doc = "Checks if the value of the field is `ENABLED`"]
237 #[inline(always)]
238 pub fn is_enabled(&self) -> bool {
239 **self == MSTSTSTPERREN_A::ENABLED
240 }
241}
242impl core::ops::Deref for MSTSTSTPERREN_R {
243 type Target = crate::FieldReader<bool, MSTSTSTPERREN_A>;
244 #[inline(always)]
245 fn deref(&self) -> &Self::Target {
246 &self.0
247 }
248}
249#[doc = "Field `MSTSTSTPERREN` writer - Master Start/Stop Error interrupt Enable."]
250pub struct MSTSTSTPERREN_W<'a> {
251 w: &'a mut W,
252}
253impl<'a> MSTSTSTPERREN_W<'a> {
254 #[doc = r"Writes `variant` to the field"]
255 #[inline(always)]
256 pub fn variant(self, variant: MSTSTSTPERREN_A) -> &'a mut W {
257 self.bit(variant.into())
258 }
259 #[doc = "Disabled. The MstStStpErr interrupt is disabled."]
260 #[inline(always)]
261 pub fn disabled(self) -> &'a mut W {
262 self.variant(MSTSTSTPERREN_A::DISABLED)
263 }
264 #[doc = "Enabled. The MstStStpErr interrupt is enabled."]
265 #[inline(always)]
266 pub fn enabled(self) -> &'a mut W {
267 self.variant(MSTSTSTPERREN_A::ENABLED)
268 }
269 #[doc = r"Sets the field bit"]
270 #[inline(always)]
271 pub fn set_bit(self) -> &'a mut W {
272 self.bit(true)
273 }
274 #[doc = r"Clears the field bit"]
275 #[inline(always)]
276 pub fn clear_bit(self) -> &'a mut W {
277 self.bit(false)
278 }
279 #[doc = r"Writes raw bits to the field"]
280 #[inline(always)]
281 pub fn bit(self, value: bool) -> &'a mut W {
282 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
283 self.w
284 }
285}
286#[doc = "Slave Pending interrupt Enable.\n\nValue on reset: 0"]
287#[derive(Clone, Copy, Debug, PartialEq)]
288pub enum SLVPENDINGEN_A {
289 #[doc = "0: Disabled. The SlvPending interrupt is disabled."]
290 DISABLED = 0,
291 #[doc = "1: Enabled. The SlvPending interrupt is enabled."]
292 ENABLED = 1,
293}
294impl From<SLVPENDINGEN_A> for bool {
295 #[inline(always)]
296 fn from(variant: SLVPENDINGEN_A) -> Self {
297 variant as u8 != 0
298 }
299}
300#[doc = "Field `SLVPENDINGEN` reader - Slave Pending interrupt Enable."]
301pub struct SLVPENDINGEN_R(crate::FieldReader<bool, SLVPENDINGEN_A>);
302impl SLVPENDINGEN_R {
303 pub(crate) fn new(bits: bool) -> Self {
304 SLVPENDINGEN_R(crate::FieldReader::new(bits))
305 }
306 #[doc = r"Get enumerated values variant"]
307 #[inline(always)]
308 pub fn variant(&self) -> SLVPENDINGEN_A {
309 match self.bits {
310 false => SLVPENDINGEN_A::DISABLED,
311 true => SLVPENDINGEN_A::ENABLED,
312 }
313 }
314 #[doc = "Checks if the value of the field is `DISABLED`"]
315 #[inline(always)]
316 pub fn is_disabled(&self) -> bool {
317 **self == SLVPENDINGEN_A::DISABLED
318 }
319 #[doc = "Checks if the value of the field is `ENABLED`"]
320 #[inline(always)]
321 pub fn is_enabled(&self) -> bool {
322 **self == SLVPENDINGEN_A::ENABLED
323 }
324}
325impl core::ops::Deref for SLVPENDINGEN_R {
326 type Target = crate::FieldReader<bool, SLVPENDINGEN_A>;
327 #[inline(always)]
328 fn deref(&self) -> &Self::Target {
329 &self.0
330 }
331}
332#[doc = "Field `SLVPENDINGEN` writer - Slave Pending interrupt Enable."]
333pub struct SLVPENDINGEN_W<'a> {
334 w: &'a mut W,
335}
336impl<'a> SLVPENDINGEN_W<'a> {
337 #[doc = r"Writes `variant` to the field"]
338 #[inline(always)]
339 pub fn variant(self, variant: SLVPENDINGEN_A) -> &'a mut W {
340 self.bit(variant.into())
341 }
342 #[doc = "Disabled. The SlvPending interrupt is disabled."]
343 #[inline(always)]
344 pub fn disabled(self) -> &'a mut W {
345 self.variant(SLVPENDINGEN_A::DISABLED)
346 }
347 #[doc = "Enabled. The SlvPending interrupt is enabled."]
348 #[inline(always)]
349 pub fn enabled(self) -> &'a mut W {
350 self.variant(SLVPENDINGEN_A::ENABLED)
351 }
352 #[doc = r"Sets the field bit"]
353 #[inline(always)]
354 pub fn set_bit(self) -> &'a mut W {
355 self.bit(true)
356 }
357 #[doc = r"Clears the field bit"]
358 #[inline(always)]
359 pub fn clear_bit(self) -> &'a mut W {
360 self.bit(false)
361 }
362 #[doc = r"Writes raw bits to the field"]
363 #[inline(always)]
364 pub fn bit(self, value: bool) -> &'a mut W {
365 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
366 self.w
367 }
368}
369#[doc = "Slave Not Stretching interrupt Enable.\n\nValue on reset: 0"]
370#[derive(Clone, Copy, Debug, PartialEq)]
371pub enum SLVNOTSTREN_A {
372 #[doc = "0: Disabled. The SlvNotStr interrupt is disabled."]
373 DISABLED = 0,
374 #[doc = "1: Enabled. The SlvNotStr interrupt is enabled."]
375 ENABLED = 1,
376}
377impl From<SLVNOTSTREN_A> for bool {
378 #[inline(always)]
379 fn from(variant: SLVNOTSTREN_A) -> Self {
380 variant as u8 != 0
381 }
382}
383#[doc = "Field `SLVNOTSTREN` reader - Slave Not Stretching interrupt Enable."]
384pub struct SLVNOTSTREN_R(crate::FieldReader<bool, SLVNOTSTREN_A>);
385impl SLVNOTSTREN_R {
386 pub(crate) fn new(bits: bool) -> Self {
387 SLVNOTSTREN_R(crate::FieldReader::new(bits))
388 }
389 #[doc = r"Get enumerated values variant"]
390 #[inline(always)]
391 pub fn variant(&self) -> SLVNOTSTREN_A {
392 match self.bits {
393 false => SLVNOTSTREN_A::DISABLED,
394 true => SLVNOTSTREN_A::ENABLED,
395 }
396 }
397 #[doc = "Checks if the value of the field is `DISABLED`"]
398 #[inline(always)]
399 pub fn is_disabled(&self) -> bool {
400 **self == SLVNOTSTREN_A::DISABLED
401 }
402 #[doc = "Checks if the value of the field is `ENABLED`"]
403 #[inline(always)]
404 pub fn is_enabled(&self) -> bool {
405 **self == SLVNOTSTREN_A::ENABLED
406 }
407}
408impl core::ops::Deref for SLVNOTSTREN_R {
409 type Target = crate::FieldReader<bool, SLVNOTSTREN_A>;
410 #[inline(always)]
411 fn deref(&self) -> &Self::Target {
412 &self.0
413 }
414}
415#[doc = "Field `SLVNOTSTREN` writer - Slave Not Stretching interrupt Enable."]
416pub struct SLVNOTSTREN_W<'a> {
417 w: &'a mut W,
418}
419impl<'a> SLVNOTSTREN_W<'a> {
420 #[doc = r"Writes `variant` to the field"]
421 #[inline(always)]
422 pub fn variant(self, variant: SLVNOTSTREN_A) -> &'a mut W {
423 self.bit(variant.into())
424 }
425 #[doc = "Disabled. The SlvNotStr interrupt is disabled."]
426 #[inline(always)]
427 pub fn disabled(self) -> &'a mut W {
428 self.variant(SLVNOTSTREN_A::DISABLED)
429 }
430 #[doc = "Enabled. The SlvNotStr interrupt is enabled."]
431 #[inline(always)]
432 pub fn enabled(self) -> &'a mut W {
433 self.variant(SLVNOTSTREN_A::ENABLED)
434 }
435 #[doc = r"Sets the field bit"]
436 #[inline(always)]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r"Clears the field bit"]
441 #[inline(always)]
442 pub fn clear_bit(self) -> &'a mut W {
443 self.bit(false)
444 }
445 #[doc = r"Writes raw bits to the field"]
446 #[inline(always)]
447 pub fn bit(self, value: bool) -> &'a mut W {
448 self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
449 self.w
450 }
451}
452#[doc = "Slave Deselect interrupt Enable.\n\nValue on reset: 0"]
453#[derive(Clone, Copy, Debug, PartialEq)]
454pub enum SLVDESELEN_A {
455 #[doc = "0: Disabled. The SlvDeSel interrupt is disabled."]
456 DISABLED = 0,
457 #[doc = "1: Enabled. The SlvDeSel interrupt is enabled."]
458 ENABLED = 1,
459}
460impl From<SLVDESELEN_A> for bool {
461 #[inline(always)]
462 fn from(variant: SLVDESELEN_A) -> Self {
463 variant as u8 != 0
464 }
465}
466#[doc = "Field `SLVDESELEN` reader - Slave Deselect interrupt Enable."]
467pub struct SLVDESELEN_R(crate::FieldReader<bool, SLVDESELEN_A>);
468impl SLVDESELEN_R {
469 pub(crate) fn new(bits: bool) -> Self {
470 SLVDESELEN_R(crate::FieldReader::new(bits))
471 }
472 #[doc = r"Get enumerated values variant"]
473 #[inline(always)]
474 pub fn variant(&self) -> SLVDESELEN_A {
475 match self.bits {
476 false => SLVDESELEN_A::DISABLED,
477 true => SLVDESELEN_A::ENABLED,
478 }
479 }
480 #[doc = "Checks if the value of the field is `DISABLED`"]
481 #[inline(always)]
482 pub fn is_disabled(&self) -> bool {
483 **self == SLVDESELEN_A::DISABLED
484 }
485 #[doc = "Checks if the value of the field is `ENABLED`"]
486 #[inline(always)]
487 pub fn is_enabled(&self) -> bool {
488 **self == SLVDESELEN_A::ENABLED
489 }
490}
491impl core::ops::Deref for SLVDESELEN_R {
492 type Target = crate::FieldReader<bool, SLVDESELEN_A>;
493 #[inline(always)]
494 fn deref(&self) -> &Self::Target {
495 &self.0
496 }
497}
498#[doc = "Field `SLVDESELEN` writer - Slave Deselect interrupt Enable."]
499pub struct SLVDESELEN_W<'a> {
500 w: &'a mut W,
501}
502impl<'a> SLVDESELEN_W<'a> {
503 #[doc = r"Writes `variant` to the field"]
504 #[inline(always)]
505 pub fn variant(self, variant: SLVDESELEN_A) -> &'a mut W {
506 self.bit(variant.into())
507 }
508 #[doc = "Disabled. The SlvDeSel interrupt is disabled."]
509 #[inline(always)]
510 pub fn disabled(self) -> &'a mut W {
511 self.variant(SLVDESELEN_A::DISABLED)
512 }
513 #[doc = "Enabled. The SlvDeSel interrupt is enabled."]
514 #[inline(always)]
515 pub fn enabled(self) -> &'a mut W {
516 self.variant(SLVDESELEN_A::ENABLED)
517 }
518 #[doc = r"Sets the field bit"]
519 #[inline(always)]
520 pub fn set_bit(self) -> &'a mut W {
521 self.bit(true)
522 }
523 #[doc = r"Clears the field bit"]
524 #[inline(always)]
525 pub fn clear_bit(self) -> &'a mut W {
526 self.bit(false)
527 }
528 #[doc = r"Writes raw bits to the field"]
529 #[inline(always)]
530 pub fn bit(self, value: bool) -> &'a mut W {
531 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
532 self.w
533 }
534}
535#[doc = "Monitor data Ready interrupt Enable.\n\nValue on reset: 0"]
536#[derive(Clone, Copy, Debug, PartialEq)]
537pub enum MONRDYEN_A {
538 #[doc = "0: Disabled. The MonRdy interrupt is disabled."]
539 DISABLED = 0,
540 #[doc = "1: Enabled. The MonRdy interrupt is enabled."]
541 ENABLED = 1,
542}
543impl From<MONRDYEN_A> for bool {
544 #[inline(always)]
545 fn from(variant: MONRDYEN_A) -> Self {
546 variant as u8 != 0
547 }
548}
549#[doc = "Field `MONRDYEN` reader - Monitor data Ready interrupt Enable."]
550pub struct MONRDYEN_R(crate::FieldReader<bool, MONRDYEN_A>);
551impl MONRDYEN_R {
552 pub(crate) fn new(bits: bool) -> Self {
553 MONRDYEN_R(crate::FieldReader::new(bits))
554 }
555 #[doc = r"Get enumerated values variant"]
556 #[inline(always)]
557 pub fn variant(&self) -> MONRDYEN_A {
558 match self.bits {
559 false => MONRDYEN_A::DISABLED,
560 true => MONRDYEN_A::ENABLED,
561 }
562 }
563 #[doc = "Checks if the value of the field is `DISABLED`"]
564 #[inline(always)]
565 pub fn is_disabled(&self) -> bool {
566 **self == MONRDYEN_A::DISABLED
567 }
568 #[doc = "Checks if the value of the field is `ENABLED`"]
569 #[inline(always)]
570 pub fn is_enabled(&self) -> bool {
571 **self == MONRDYEN_A::ENABLED
572 }
573}
574impl core::ops::Deref for MONRDYEN_R {
575 type Target = crate::FieldReader<bool, MONRDYEN_A>;
576 #[inline(always)]
577 fn deref(&self) -> &Self::Target {
578 &self.0
579 }
580}
581#[doc = "Field `MONRDYEN` writer - Monitor data Ready interrupt Enable."]
582pub struct MONRDYEN_W<'a> {
583 w: &'a mut W,
584}
585impl<'a> MONRDYEN_W<'a> {
586 #[doc = r"Writes `variant` to the field"]
587 #[inline(always)]
588 pub fn variant(self, variant: MONRDYEN_A) -> &'a mut W {
589 self.bit(variant.into())
590 }
591 #[doc = "Disabled. The MonRdy interrupt is disabled."]
592 #[inline(always)]
593 pub fn disabled(self) -> &'a mut W {
594 self.variant(MONRDYEN_A::DISABLED)
595 }
596 #[doc = "Enabled. The MonRdy interrupt is enabled."]
597 #[inline(always)]
598 pub fn enabled(self) -> &'a mut W {
599 self.variant(MONRDYEN_A::ENABLED)
600 }
601 #[doc = r"Sets the field bit"]
602 #[inline(always)]
603 pub fn set_bit(self) -> &'a mut W {
604 self.bit(true)
605 }
606 #[doc = r"Clears the field bit"]
607 #[inline(always)]
608 pub fn clear_bit(self) -> &'a mut W {
609 self.bit(false)
610 }
611 #[doc = r"Writes raw bits to the field"]
612 #[inline(always)]
613 pub fn bit(self, value: bool) -> &'a mut W {
614 self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
615 self.w
616 }
617}
618#[doc = "Monitor Overrun interrupt Enable.\n\nValue on reset: 0"]
619#[derive(Clone, Copy, Debug, PartialEq)]
620pub enum MONOVEN_A {
621 #[doc = "0: Disabled. The MonOv interrupt is disabled."]
622 DISABLED = 0,
623 #[doc = "1: Enabled. The MonOv interrupt is enabled."]
624 ENABLED = 1,
625}
626impl From<MONOVEN_A> for bool {
627 #[inline(always)]
628 fn from(variant: MONOVEN_A) -> Self {
629 variant as u8 != 0
630 }
631}
632#[doc = "Field `MONOVEN` reader - Monitor Overrun interrupt Enable."]
633pub struct MONOVEN_R(crate::FieldReader<bool, MONOVEN_A>);
634impl MONOVEN_R {
635 pub(crate) fn new(bits: bool) -> Self {
636 MONOVEN_R(crate::FieldReader::new(bits))
637 }
638 #[doc = r"Get enumerated values variant"]
639 #[inline(always)]
640 pub fn variant(&self) -> MONOVEN_A {
641 match self.bits {
642 false => MONOVEN_A::DISABLED,
643 true => MONOVEN_A::ENABLED,
644 }
645 }
646 #[doc = "Checks if the value of the field is `DISABLED`"]
647 #[inline(always)]
648 pub fn is_disabled(&self) -> bool {
649 **self == MONOVEN_A::DISABLED
650 }
651 #[doc = "Checks if the value of the field is `ENABLED`"]
652 #[inline(always)]
653 pub fn is_enabled(&self) -> bool {
654 **self == MONOVEN_A::ENABLED
655 }
656}
657impl core::ops::Deref for MONOVEN_R {
658 type Target = crate::FieldReader<bool, MONOVEN_A>;
659 #[inline(always)]
660 fn deref(&self) -> &Self::Target {
661 &self.0
662 }
663}
664#[doc = "Field `MONOVEN` writer - Monitor Overrun interrupt Enable."]
665pub struct MONOVEN_W<'a> {
666 w: &'a mut W,
667}
668impl<'a> MONOVEN_W<'a> {
669 #[doc = r"Writes `variant` to the field"]
670 #[inline(always)]
671 pub fn variant(self, variant: MONOVEN_A) -> &'a mut W {
672 self.bit(variant.into())
673 }
674 #[doc = "Disabled. The MonOv interrupt is disabled."]
675 #[inline(always)]
676 pub fn disabled(self) -> &'a mut W {
677 self.variant(MONOVEN_A::DISABLED)
678 }
679 #[doc = "Enabled. The MonOv interrupt is enabled."]
680 #[inline(always)]
681 pub fn enabled(self) -> &'a mut W {
682 self.variant(MONOVEN_A::ENABLED)
683 }
684 #[doc = r"Sets the field bit"]
685 #[inline(always)]
686 pub fn set_bit(self) -> &'a mut W {
687 self.bit(true)
688 }
689 #[doc = r"Clears the field bit"]
690 #[inline(always)]
691 pub fn clear_bit(self) -> &'a mut W {
692 self.bit(false)
693 }
694 #[doc = r"Writes raw bits to the field"]
695 #[inline(always)]
696 pub fn bit(self, value: bool) -> &'a mut W {
697 self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
698 self.w
699 }
700}
701#[doc = "Monitor Idle interrupt Enable.\n\nValue on reset: 0"]
702#[derive(Clone, Copy, Debug, PartialEq)]
703pub enum MONIDLEEN_A {
704 #[doc = "0: Disabled. The MonIdle interrupt is disabled."]
705 DISABLED = 0,
706 #[doc = "1: Enabled. The MonIdle interrupt is enabled."]
707 ENABLED = 1,
708}
709impl From<MONIDLEEN_A> for bool {
710 #[inline(always)]
711 fn from(variant: MONIDLEEN_A) -> Self {
712 variant as u8 != 0
713 }
714}
715#[doc = "Field `MONIDLEEN` reader - Monitor Idle interrupt Enable."]
716pub struct MONIDLEEN_R(crate::FieldReader<bool, MONIDLEEN_A>);
717impl MONIDLEEN_R {
718 pub(crate) fn new(bits: bool) -> Self {
719 MONIDLEEN_R(crate::FieldReader::new(bits))
720 }
721 #[doc = r"Get enumerated values variant"]
722 #[inline(always)]
723 pub fn variant(&self) -> MONIDLEEN_A {
724 match self.bits {
725 false => MONIDLEEN_A::DISABLED,
726 true => MONIDLEEN_A::ENABLED,
727 }
728 }
729 #[doc = "Checks if the value of the field is `DISABLED`"]
730 #[inline(always)]
731 pub fn is_disabled(&self) -> bool {
732 **self == MONIDLEEN_A::DISABLED
733 }
734 #[doc = "Checks if the value of the field is `ENABLED`"]
735 #[inline(always)]
736 pub fn is_enabled(&self) -> bool {
737 **self == MONIDLEEN_A::ENABLED
738 }
739}
740impl core::ops::Deref for MONIDLEEN_R {
741 type Target = crate::FieldReader<bool, MONIDLEEN_A>;
742 #[inline(always)]
743 fn deref(&self) -> &Self::Target {
744 &self.0
745 }
746}
747#[doc = "Field `MONIDLEEN` writer - Monitor Idle interrupt Enable."]
748pub struct MONIDLEEN_W<'a> {
749 w: &'a mut W,
750}
751impl<'a> MONIDLEEN_W<'a> {
752 #[doc = r"Writes `variant` to the field"]
753 #[inline(always)]
754 pub fn variant(self, variant: MONIDLEEN_A) -> &'a mut W {
755 self.bit(variant.into())
756 }
757 #[doc = "Disabled. The MonIdle interrupt is disabled."]
758 #[inline(always)]
759 pub fn disabled(self) -> &'a mut W {
760 self.variant(MONIDLEEN_A::DISABLED)
761 }
762 #[doc = "Enabled. The MonIdle interrupt is enabled."]
763 #[inline(always)]
764 pub fn enabled(self) -> &'a mut W {
765 self.variant(MONIDLEEN_A::ENABLED)
766 }
767 #[doc = r"Sets the field bit"]
768 #[inline(always)]
769 pub fn set_bit(self) -> &'a mut W {
770 self.bit(true)
771 }
772 #[doc = r"Clears the field bit"]
773 #[inline(always)]
774 pub fn clear_bit(self) -> &'a mut W {
775 self.bit(false)
776 }
777 #[doc = r"Writes raw bits to the field"]
778 #[inline(always)]
779 pub fn bit(self, value: bool) -> &'a mut W {
780 self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
781 self.w
782 }
783}
784#[doc = "Event time-out interrupt Enable.\n\nValue on reset: 0"]
785#[derive(Clone, Copy, Debug, PartialEq)]
786pub enum EVENTTIMEOUTEN_A {
787 #[doc = "0: Disabled. The Event time-out interrupt is disabled."]
788 DISABLED = 0,
789 #[doc = "1: Enabled. The Event time-out interrupt is enabled."]
790 ENABLED = 1,
791}
792impl From<EVENTTIMEOUTEN_A> for bool {
793 #[inline(always)]
794 fn from(variant: EVENTTIMEOUTEN_A) -> Self {
795 variant as u8 != 0
796 }
797}
798#[doc = "Field `EVENTTIMEOUTEN` reader - Event time-out interrupt Enable."]
799pub struct EVENTTIMEOUTEN_R(crate::FieldReader<bool, EVENTTIMEOUTEN_A>);
800impl EVENTTIMEOUTEN_R {
801 pub(crate) fn new(bits: bool) -> Self {
802 EVENTTIMEOUTEN_R(crate::FieldReader::new(bits))
803 }
804 #[doc = r"Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> EVENTTIMEOUTEN_A {
807 match self.bits {
808 false => EVENTTIMEOUTEN_A::DISABLED,
809 true => EVENTTIMEOUTEN_A::ENABLED,
810 }
811 }
812 #[doc = "Checks if the value of the field is `DISABLED`"]
813 #[inline(always)]
814 pub fn is_disabled(&self) -> bool {
815 **self == EVENTTIMEOUTEN_A::DISABLED
816 }
817 #[doc = "Checks if the value of the field is `ENABLED`"]
818 #[inline(always)]
819 pub fn is_enabled(&self) -> bool {
820 **self == EVENTTIMEOUTEN_A::ENABLED
821 }
822}
823impl core::ops::Deref for EVENTTIMEOUTEN_R {
824 type Target = crate::FieldReader<bool, EVENTTIMEOUTEN_A>;
825 #[inline(always)]
826 fn deref(&self) -> &Self::Target {
827 &self.0
828 }
829}
830#[doc = "Field `EVENTTIMEOUTEN` writer - Event time-out interrupt Enable."]
831pub struct EVENTTIMEOUTEN_W<'a> {
832 w: &'a mut W,
833}
834impl<'a> EVENTTIMEOUTEN_W<'a> {
835 #[doc = r"Writes `variant` to the field"]
836 #[inline(always)]
837 pub fn variant(self, variant: EVENTTIMEOUTEN_A) -> &'a mut W {
838 self.bit(variant.into())
839 }
840 #[doc = "Disabled. The Event time-out interrupt is disabled."]
841 #[inline(always)]
842 pub fn disabled(self) -> &'a mut W {
843 self.variant(EVENTTIMEOUTEN_A::DISABLED)
844 }
845 #[doc = "Enabled. The Event time-out interrupt is enabled."]
846 #[inline(always)]
847 pub fn enabled(self) -> &'a mut W {
848 self.variant(EVENTTIMEOUTEN_A::ENABLED)
849 }
850 #[doc = r"Sets the field bit"]
851 #[inline(always)]
852 pub fn set_bit(self) -> &'a mut W {
853 self.bit(true)
854 }
855 #[doc = r"Clears the field bit"]
856 #[inline(always)]
857 pub fn clear_bit(self) -> &'a mut W {
858 self.bit(false)
859 }
860 #[doc = r"Writes raw bits to the field"]
861 #[inline(always)]
862 pub fn bit(self, value: bool) -> &'a mut W {
863 self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
864 self.w
865 }
866}
867#[doc = "SCL time-out interrupt Enable.\n\nValue on reset: 0"]
868#[derive(Clone, Copy, Debug, PartialEq)]
869pub enum SCLTIMEOUTEN_A {
870 #[doc = "0: Disabled. The SCL time-out interrupt is disabled."]
871 DISABLED = 0,
872 #[doc = "1: Enabled. The SCL time-out interrupt is enabled."]
873 ENABLED = 1,
874}
875impl From<SCLTIMEOUTEN_A> for bool {
876 #[inline(always)]
877 fn from(variant: SCLTIMEOUTEN_A) -> Self {
878 variant as u8 != 0
879 }
880}
881#[doc = "Field `SCLTIMEOUTEN` reader - SCL time-out interrupt Enable."]
882pub struct SCLTIMEOUTEN_R(crate::FieldReader<bool, SCLTIMEOUTEN_A>);
883impl SCLTIMEOUTEN_R {
884 pub(crate) fn new(bits: bool) -> Self {
885 SCLTIMEOUTEN_R(crate::FieldReader::new(bits))
886 }
887 #[doc = r"Get enumerated values variant"]
888 #[inline(always)]
889 pub fn variant(&self) -> SCLTIMEOUTEN_A {
890 match self.bits {
891 false => SCLTIMEOUTEN_A::DISABLED,
892 true => SCLTIMEOUTEN_A::ENABLED,
893 }
894 }
895 #[doc = "Checks if the value of the field is `DISABLED`"]
896 #[inline(always)]
897 pub fn is_disabled(&self) -> bool {
898 **self == SCLTIMEOUTEN_A::DISABLED
899 }
900 #[doc = "Checks if the value of the field is `ENABLED`"]
901 #[inline(always)]
902 pub fn is_enabled(&self) -> bool {
903 **self == SCLTIMEOUTEN_A::ENABLED
904 }
905}
906impl core::ops::Deref for SCLTIMEOUTEN_R {
907 type Target = crate::FieldReader<bool, SCLTIMEOUTEN_A>;
908 #[inline(always)]
909 fn deref(&self) -> &Self::Target {
910 &self.0
911 }
912}
913#[doc = "Field `SCLTIMEOUTEN` writer - SCL time-out interrupt Enable."]
914pub struct SCLTIMEOUTEN_W<'a> {
915 w: &'a mut W,
916}
917impl<'a> SCLTIMEOUTEN_W<'a> {
918 #[doc = r"Writes `variant` to the field"]
919 #[inline(always)]
920 pub fn variant(self, variant: SCLTIMEOUTEN_A) -> &'a mut W {
921 self.bit(variant.into())
922 }
923 #[doc = "Disabled. The SCL time-out interrupt is disabled."]
924 #[inline(always)]
925 pub fn disabled(self) -> &'a mut W {
926 self.variant(SCLTIMEOUTEN_A::DISABLED)
927 }
928 #[doc = "Enabled. The SCL time-out interrupt is enabled."]
929 #[inline(always)]
930 pub fn enabled(self) -> &'a mut W {
931 self.variant(SCLTIMEOUTEN_A::ENABLED)
932 }
933 #[doc = r"Sets the field bit"]
934 #[inline(always)]
935 pub fn set_bit(self) -> &'a mut W {
936 self.bit(true)
937 }
938 #[doc = r"Clears the field bit"]
939 #[inline(always)]
940 pub fn clear_bit(self) -> &'a mut W {
941 self.bit(false)
942 }
943 #[doc = r"Writes raw bits to the field"]
944 #[inline(always)]
945 pub fn bit(self, value: bool) -> &'a mut W {
946 self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25);
947 self.w
948 }
949}
950impl R {
951 #[doc = "Bit 0 - Master Pending interrupt Enable."]
952 #[inline(always)]
953 pub fn mstpendingen(&self) -> MSTPENDINGEN_R {
954 MSTPENDINGEN_R::new((self.bits & 0x01) != 0)
955 }
956 #[doc = "Bit 4 - Master Arbitration Loss interrupt Enable."]
957 #[inline(always)]
958 pub fn mstarblossen(&self) -> MSTARBLOSSEN_R {
959 MSTARBLOSSEN_R::new(((self.bits >> 4) & 0x01) != 0)
960 }
961 #[doc = "Bit 6 - Master Start/Stop Error interrupt Enable."]
962 #[inline(always)]
963 pub fn mstststperren(&self) -> MSTSTSTPERREN_R {
964 MSTSTSTPERREN_R::new(((self.bits >> 6) & 0x01) != 0)
965 }
966 #[doc = "Bit 8 - Slave Pending interrupt Enable."]
967 #[inline(always)]
968 pub fn slvpendingen(&self) -> SLVPENDINGEN_R {
969 SLVPENDINGEN_R::new(((self.bits >> 8) & 0x01) != 0)
970 }
971 #[doc = "Bit 11 - Slave Not Stretching interrupt Enable."]
972 #[inline(always)]
973 pub fn slvnotstren(&self) -> SLVNOTSTREN_R {
974 SLVNOTSTREN_R::new(((self.bits >> 11) & 0x01) != 0)
975 }
976 #[doc = "Bit 15 - Slave Deselect interrupt Enable."]
977 #[inline(always)]
978 pub fn slvdeselen(&self) -> SLVDESELEN_R {
979 SLVDESELEN_R::new(((self.bits >> 15) & 0x01) != 0)
980 }
981 #[doc = "Bit 16 - Monitor data Ready interrupt Enable."]
982 #[inline(always)]
983 pub fn monrdyen(&self) -> MONRDYEN_R {
984 MONRDYEN_R::new(((self.bits >> 16) & 0x01) != 0)
985 }
986 #[doc = "Bit 17 - Monitor Overrun interrupt Enable."]
987 #[inline(always)]
988 pub fn monoven(&self) -> MONOVEN_R {
989 MONOVEN_R::new(((self.bits >> 17) & 0x01) != 0)
990 }
991 #[doc = "Bit 19 - Monitor Idle interrupt Enable."]
992 #[inline(always)]
993 pub fn monidleen(&self) -> MONIDLEEN_R {
994 MONIDLEEN_R::new(((self.bits >> 19) & 0x01) != 0)
995 }
996 #[doc = "Bit 24 - Event time-out interrupt Enable."]
997 #[inline(always)]
998 pub fn eventtimeouten(&self) -> EVENTTIMEOUTEN_R {
999 EVENTTIMEOUTEN_R::new(((self.bits >> 24) & 0x01) != 0)
1000 }
1001 #[doc = "Bit 25 - SCL time-out interrupt Enable."]
1002 #[inline(always)]
1003 pub fn scltimeouten(&self) -> SCLTIMEOUTEN_R {
1004 SCLTIMEOUTEN_R::new(((self.bits >> 25) & 0x01) != 0)
1005 }
1006}
1007impl W {
1008 #[doc = "Bit 0 - Master Pending interrupt Enable."]
1009 #[inline(always)]
1010 pub fn mstpendingen(&mut self) -> MSTPENDINGEN_W {
1011 MSTPENDINGEN_W { w: self }
1012 }
1013 #[doc = "Bit 4 - Master Arbitration Loss interrupt Enable."]
1014 #[inline(always)]
1015 pub fn mstarblossen(&mut self) -> MSTARBLOSSEN_W {
1016 MSTARBLOSSEN_W { w: self }
1017 }
1018 #[doc = "Bit 6 - Master Start/Stop Error interrupt Enable."]
1019 #[inline(always)]
1020 pub fn mstststperren(&mut self) -> MSTSTSTPERREN_W {
1021 MSTSTSTPERREN_W { w: self }
1022 }
1023 #[doc = "Bit 8 - Slave Pending interrupt Enable."]
1024 #[inline(always)]
1025 pub fn slvpendingen(&mut self) -> SLVPENDINGEN_W {
1026 SLVPENDINGEN_W { w: self }
1027 }
1028 #[doc = "Bit 11 - Slave Not Stretching interrupt Enable."]
1029 #[inline(always)]
1030 pub fn slvnotstren(&mut self) -> SLVNOTSTREN_W {
1031 SLVNOTSTREN_W { w: self }
1032 }
1033 #[doc = "Bit 15 - Slave Deselect interrupt Enable."]
1034 #[inline(always)]
1035 pub fn slvdeselen(&mut self) -> SLVDESELEN_W {
1036 SLVDESELEN_W { w: self }
1037 }
1038 #[doc = "Bit 16 - Monitor data Ready interrupt Enable."]
1039 #[inline(always)]
1040 pub fn monrdyen(&mut self) -> MONRDYEN_W {
1041 MONRDYEN_W { w: self }
1042 }
1043 #[doc = "Bit 17 - Monitor Overrun interrupt Enable."]
1044 #[inline(always)]
1045 pub fn monoven(&mut self) -> MONOVEN_W {
1046 MONOVEN_W { w: self }
1047 }
1048 #[doc = "Bit 19 - Monitor Idle interrupt Enable."]
1049 #[inline(always)]
1050 pub fn monidleen(&mut self) -> MONIDLEEN_W {
1051 MONIDLEEN_W { w: self }
1052 }
1053 #[doc = "Bit 24 - Event time-out interrupt Enable."]
1054 #[inline(always)]
1055 pub fn eventtimeouten(&mut self) -> EVENTTIMEOUTEN_W {
1056 EVENTTIMEOUTEN_W { w: self }
1057 }
1058 #[doc = "Bit 25 - SCL time-out interrupt Enable."]
1059 #[inline(always)]
1060 pub fn scltimeouten(&mut self) -> SCLTIMEOUTEN_W {
1061 SCLTIMEOUTEN_W { w: self }
1062 }
1063 #[doc = "Writes raw bits to the register."]
1064 #[inline(always)]
1065 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1066 self.0.bits(bits);
1067 self
1068 }
1069}
1070#[doc = "Interrupt Enable Set and read 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 [intenset](index.html) module"]
1071pub struct INTENSET_SPEC;
1072impl crate::RegisterSpec for INTENSET_SPEC {
1073 type Ux = u32;
1074}
1075#[doc = "`read()` method returns [intenset::R](R) reader structure"]
1076impl crate::Readable for INTENSET_SPEC {
1077 type Reader = R;
1078}
1079#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
1080impl crate::Writable for INTENSET_SPEC {
1081 type Writer = W;
1082}
1083#[doc = "`reset()` method sets INTENSET to value 0"]
1084impl crate::Resettable for INTENSET_SPEC {
1085 #[inline(always)]
1086 fn reset_value() -> Self::Ux {
1087 0
1088 }
1089}