mcxa_pac/lpi2c0/
sier.rs

1#[doc = "Register `SIER` reader"]
2pub type R = crate::R<SierSpec>;
3#[doc = "Register `SIER` writer"]
4pub type W = crate::W<SierSpec>;
5#[doc = "Transmit Data Interrupt Enable\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Tdie {
9    #[doc = "0: Disable"]
10    Disabled = 0,
11    #[doc = "1: Enable"]
12    Enabled = 1,
13}
14impl From<Tdie> for bool {
15    #[inline(always)]
16    fn from(variant: Tdie) -> Self {
17        variant as u8 != 0
18    }
19}
20#[doc = "Field `TDIE` reader - Transmit Data Interrupt Enable"]
21pub type TdieR = crate::BitReader<Tdie>;
22impl TdieR {
23    #[doc = "Get enumerated values variant"]
24    #[inline(always)]
25    pub const fn variant(&self) -> Tdie {
26        match self.bits {
27            false => Tdie::Disabled,
28            true => Tdie::Enabled,
29        }
30    }
31    #[doc = "Disable"]
32    #[inline(always)]
33    pub fn is_disabled(&self) -> bool {
34        *self == Tdie::Disabled
35    }
36    #[doc = "Enable"]
37    #[inline(always)]
38    pub fn is_enabled(&self) -> bool {
39        *self == Tdie::Enabled
40    }
41}
42#[doc = "Field `TDIE` writer - Transmit Data Interrupt Enable"]
43pub type TdieW<'a, REG> = crate::BitWriter<'a, REG, Tdie>;
44impl<'a, REG> TdieW<'a, REG>
45where
46    REG: crate::Writable + crate::RegisterSpec,
47{
48    #[doc = "Disable"]
49    #[inline(always)]
50    pub fn disabled(self) -> &'a mut crate::W<REG> {
51        self.variant(Tdie::Disabled)
52    }
53    #[doc = "Enable"]
54    #[inline(always)]
55    pub fn enabled(self) -> &'a mut crate::W<REG> {
56        self.variant(Tdie::Enabled)
57    }
58}
59#[doc = "Receive Data Interrupt Enable\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Rdie {
63    #[doc = "0: Disable"]
64    Disabled = 0,
65    #[doc = "1: Enable"]
66    Enabled = 1,
67}
68impl From<Rdie> for bool {
69    #[inline(always)]
70    fn from(variant: Rdie) -> Self {
71        variant as u8 != 0
72    }
73}
74#[doc = "Field `RDIE` reader - Receive Data Interrupt Enable"]
75pub type RdieR = crate::BitReader<Rdie>;
76impl RdieR {
77    #[doc = "Get enumerated values variant"]
78    #[inline(always)]
79    pub const fn variant(&self) -> Rdie {
80        match self.bits {
81            false => Rdie::Disabled,
82            true => Rdie::Enabled,
83        }
84    }
85    #[doc = "Disable"]
86    #[inline(always)]
87    pub fn is_disabled(&self) -> bool {
88        *self == Rdie::Disabled
89    }
90    #[doc = "Enable"]
91    #[inline(always)]
92    pub fn is_enabled(&self) -> bool {
93        *self == Rdie::Enabled
94    }
95}
96#[doc = "Field `RDIE` writer - Receive Data Interrupt Enable"]
97pub type RdieW<'a, REG> = crate::BitWriter<'a, REG, Rdie>;
98impl<'a, REG> RdieW<'a, REG>
99where
100    REG: crate::Writable + crate::RegisterSpec,
101{
102    #[doc = "Disable"]
103    #[inline(always)]
104    pub fn disabled(self) -> &'a mut crate::W<REG> {
105        self.variant(Rdie::Disabled)
106    }
107    #[doc = "Enable"]
108    #[inline(always)]
109    pub fn enabled(self) -> &'a mut crate::W<REG> {
110        self.variant(Rdie::Enabled)
111    }
112}
113#[doc = "Address Valid Interrupt Enable\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Avie {
117    #[doc = "0: Disable"]
118    Disabled = 0,
119    #[doc = "1: Enable"]
120    Enabled = 1,
121}
122impl From<Avie> for bool {
123    #[inline(always)]
124    fn from(variant: Avie) -> Self {
125        variant as u8 != 0
126    }
127}
128#[doc = "Field `AVIE` reader - Address Valid Interrupt Enable"]
129pub type AvieR = crate::BitReader<Avie>;
130impl AvieR {
131    #[doc = "Get enumerated values variant"]
132    #[inline(always)]
133    pub const fn variant(&self) -> Avie {
134        match self.bits {
135            false => Avie::Disabled,
136            true => Avie::Enabled,
137        }
138    }
139    #[doc = "Disable"]
140    #[inline(always)]
141    pub fn is_disabled(&self) -> bool {
142        *self == Avie::Disabled
143    }
144    #[doc = "Enable"]
145    #[inline(always)]
146    pub fn is_enabled(&self) -> bool {
147        *self == Avie::Enabled
148    }
149}
150#[doc = "Field `AVIE` writer - Address Valid Interrupt Enable"]
151pub type AvieW<'a, REG> = crate::BitWriter<'a, REG, Avie>;
152impl<'a, REG> AvieW<'a, REG>
153where
154    REG: crate::Writable + crate::RegisterSpec,
155{
156    #[doc = "Disable"]
157    #[inline(always)]
158    pub fn disabled(self) -> &'a mut crate::W<REG> {
159        self.variant(Avie::Disabled)
160    }
161    #[doc = "Enable"]
162    #[inline(always)]
163    pub fn enabled(self) -> &'a mut crate::W<REG> {
164        self.variant(Avie::Enabled)
165    }
166}
167#[doc = "Transmit ACK Interrupt Enable\n\nValue on reset: 0"]
168#[cfg_attr(feature = "defmt", derive(defmt::Format))]
169#[derive(Clone, Copy, Debug, PartialEq, Eq)]
170pub enum Taie {
171    #[doc = "0: Disable"]
172    Disabled = 0,
173    #[doc = "1: Enable"]
174    Enabled = 1,
175}
176impl From<Taie> for bool {
177    #[inline(always)]
178    fn from(variant: Taie) -> Self {
179        variant as u8 != 0
180    }
181}
182#[doc = "Field `TAIE` reader - Transmit ACK Interrupt Enable"]
183pub type TaieR = crate::BitReader<Taie>;
184impl TaieR {
185    #[doc = "Get enumerated values variant"]
186    #[inline(always)]
187    pub const fn variant(&self) -> Taie {
188        match self.bits {
189            false => Taie::Disabled,
190            true => Taie::Enabled,
191        }
192    }
193    #[doc = "Disable"]
194    #[inline(always)]
195    pub fn is_disabled(&self) -> bool {
196        *self == Taie::Disabled
197    }
198    #[doc = "Enable"]
199    #[inline(always)]
200    pub fn is_enabled(&self) -> bool {
201        *self == Taie::Enabled
202    }
203}
204#[doc = "Field `TAIE` writer - Transmit ACK Interrupt Enable"]
205pub type TaieW<'a, REG> = crate::BitWriter<'a, REG, Taie>;
206impl<'a, REG> TaieW<'a, REG>
207where
208    REG: crate::Writable + crate::RegisterSpec,
209{
210    #[doc = "Disable"]
211    #[inline(always)]
212    pub fn disabled(self) -> &'a mut crate::W<REG> {
213        self.variant(Taie::Disabled)
214    }
215    #[doc = "Enable"]
216    #[inline(always)]
217    pub fn enabled(self) -> &'a mut crate::W<REG> {
218        self.variant(Taie::Enabled)
219    }
220}
221#[doc = "Repeated Start Interrupt Enable\n\nValue on reset: 0"]
222#[cfg_attr(feature = "defmt", derive(defmt::Format))]
223#[derive(Clone, Copy, Debug, PartialEq, Eq)]
224pub enum Rsie {
225    #[doc = "0: Disable"]
226    Disabled = 0,
227    #[doc = "1: Enable"]
228    Enabled = 1,
229}
230impl From<Rsie> for bool {
231    #[inline(always)]
232    fn from(variant: Rsie) -> Self {
233        variant as u8 != 0
234    }
235}
236#[doc = "Field `RSIE` reader - Repeated Start Interrupt Enable"]
237pub type RsieR = crate::BitReader<Rsie>;
238impl RsieR {
239    #[doc = "Get enumerated values variant"]
240    #[inline(always)]
241    pub const fn variant(&self) -> Rsie {
242        match self.bits {
243            false => Rsie::Disabled,
244            true => Rsie::Enabled,
245        }
246    }
247    #[doc = "Disable"]
248    #[inline(always)]
249    pub fn is_disabled(&self) -> bool {
250        *self == Rsie::Disabled
251    }
252    #[doc = "Enable"]
253    #[inline(always)]
254    pub fn is_enabled(&self) -> bool {
255        *self == Rsie::Enabled
256    }
257}
258#[doc = "Field `RSIE` writer - Repeated Start Interrupt Enable"]
259pub type RsieW<'a, REG> = crate::BitWriter<'a, REG, Rsie>;
260impl<'a, REG> RsieW<'a, REG>
261where
262    REG: crate::Writable + crate::RegisterSpec,
263{
264    #[doc = "Disable"]
265    #[inline(always)]
266    pub fn disabled(self) -> &'a mut crate::W<REG> {
267        self.variant(Rsie::Disabled)
268    }
269    #[doc = "Enable"]
270    #[inline(always)]
271    pub fn enabled(self) -> &'a mut crate::W<REG> {
272        self.variant(Rsie::Enabled)
273    }
274}
275#[doc = "Stop Detect Interrupt Enable\n\nValue on reset: 0"]
276#[cfg_attr(feature = "defmt", derive(defmt::Format))]
277#[derive(Clone, Copy, Debug, PartialEq, Eq)]
278pub enum Sdie {
279    #[doc = "0: Disable"]
280    Disabled = 0,
281    #[doc = "1: Enable"]
282    Enabled = 1,
283}
284impl From<Sdie> for bool {
285    #[inline(always)]
286    fn from(variant: Sdie) -> Self {
287        variant as u8 != 0
288    }
289}
290#[doc = "Field `SDIE` reader - Stop Detect Interrupt Enable"]
291pub type SdieR = crate::BitReader<Sdie>;
292impl SdieR {
293    #[doc = "Get enumerated values variant"]
294    #[inline(always)]
295    pub const fn variant(&self) -> Sdie {
296        match self.bits {
297            false => Sdie::Disabled,
298            true => Sdie::Enabled,
299        }
300    }
301    #[doc = "Disable"]
302    #[inline(always)]
303    pub fn is_disabled(&self) -> bool {
304        *self == Sdie::Disabled
305    }
306    #[doc = "Enable"]
307    #[inline(always)]
308    pub fn is_enabled(&self) -> bool {
309        *self == Sdie::Enabled
310    }
311}
312#[doc = "Field `SDIE` writer - Stop Detect Interrupt Enable"]
313pub type SdieW<'a, REG> = crate::BitWriter<'a, REG, Sdie>;
314impl<'a, REG> SdieW<'a, REG>
315where
316    REG: crate::Writable + crate::RegisterSpec,
317{
318    #[doc = "Disable"]
319    #[inline(always)]
320    pub fn disabled(self) -> &'a mut crate::W<REG> {
321        self.variant(Sdie::Disabled)
322    }
323    #[doc = "Enable"]
324    #[inline(always)]
325    pub fn enabled(self) -> &'a mut crate::W<REG> {
326        self.variant(Sdie::Enabled)
327    }
328}
329#[doc = "Bit Error Interrupt Enable\n\nValue on reset: 0"]
330#[cfg_attr(feature = "defmt", derive(defmt::Format))]
331#[derive(Clone, Copy, Debug, PartialEq, Eq)]
332pub enum Beie {
333    #[doc = "0: Disable"]
334    Disabled = 0,
335    #[doc = "1: Enable"]
336    Enabled = 1,
337}
338impl From<Beie> for bool {
339    #[inline(always)]
340    fn from(variant: Beie) -> Self {
341        variant as u8 != 0
342    }
343}
344#[doc = "Field `BEIE` reader - Bit Error Interrupt Enable"]
345pub type BeieR = crate::BitReader<Beie>;
346impl BeieR {
347    #[doc = "Get enumerated values variant"]
348    #[inline(always)]
349    pub const fn variant(&self) -> Beie {
350        match self.bits {
351            false => Beie::Disabled,
352            true => Beie::Enabled,
353        }
354    }
355    #[doc = "Disable"]
356    #[inline(always)]
357    pub fn is_disabled(&self) -> bool {
358        *self == Beie::Disabled
359    }
360    #[doc = "Enable"]
361    #[inline(always)]
362    pub fn is_enabled(&self) -> bool {
363        *self == Beie::Enabled
364    }
365}
366#[doc = "Field `BEIE` writer - Bit Error Interrupt Enable"]
367pub type BeieW<'a, REG> = crate::BitWriter<'a, REG, Beie>;
368impl<'a, REG> BeieW<'a, REG>
369where
370    REG: crate::Writable + crate::RegisterSpec,
371{
372    #[doc = "Disable"]
373    #[inline(always)]
374    pub fn disabled(self) -> &'a mut crate::W<REG> {
375        self.variant(Beie::Disabled)
376    }
377    #[doc = "Enable"]
378    #[inline(always)]
379    pub fn enabled(self) -> &'a mut crate::W<REG> {
380        self.variant(Beie::Enabled)
381    }
382}
383#[doc = "FIFO Error Interrupt Enable\n\nValue on reset: 0"]
384#[cfg_attr(feature = "defmt", derive(defmt::Format))]
385#[derive(Clone, Copy, Debug, PartialEq, Eq)]
386pub enum Feie {
387    #[doc = "0: Disable"]
388    Disabled = 0,
389    #[doc = "1: Enable"]
390    Enabled = 1,
391}
392impl From<Feie> for bool {
393    #[inline(always)]
394    fn from(variant: Feie) -> Self {
395        variant as u8 != 0
396    }
397}
398#[doc = "Field `FEIE` reader - FIFO Error Interrupt Enable"]
399pub type FeieR = crate::BitReader<Feie>;
400impl FeieR {
401    #[doc = "Get enumerated values variant"]
402    #[inline(always)]
403    pub const fn variant(&self) -> Feie {
404        match self.bits {
405            false => Feie::Disabled,
406            true => Feie::Enabled,
407        }
408    }
409    #[doc = "Disable"]
410    #[inline(always)]
411    pub fn is_disabled(&self) -> bool {
412        *self == Feie::Disabled
413    }
414    #[doc = "Enable"]
415    #[inline(always)]
416    pub fn is_enabled(&self) -> bool {
417        *self == Feie::Enabled
418    }
419}
420#[doc = "Field `FEIE` writer - FIFO Error Interrupt Enable"]
421pub type FeieW<'a, REG> = crate::BitWriter<'a, REG, Feie>;
422impl<'a, REG> FeieW<'a, REG>
423where
424    REG: crate::Writable + crate::RegisterSpec,
425{
426    #[doc = "Disable"]
427    #[inline(always)]
428    pub fn disabled(self) -> &'a mut crate::W<REG> {
429        self.variant(Feie::Disabled)
430    }
431    #[doc = "Enable"]
432    #[inline(always)]
433    pub fn enabled(self) -> &'a mut crate::W<REG> {
434        self.variant(Feie::Enabled)
435    }
436}
437#[doc = "Address Match 0 Interrupt Enable\n\nValue on reset: 0"]
438#[cfg_attr(feature = "defmt", derive(defmt::Format))]
439#[derive(Clone, Copy, Debug, PartialEq, Eq)]
440pub enum Am0ie {
441    #[doc = "0: Disable"]
442    Disabled = 0,
443    #[doc = "1: Enable"]
444    Enabled = 1,
445}
446impl From<Am0ie> for bool {
447    #[inline(always)]
448    fn from(variant: Am0ie) -> Self {
449        variant as u8 != 0
450    }
451}
452#[doc = "Field `AM0IE` reader - Address Match 0 Interrupt Enable"]
453pub type Am0ieR = crate::BitReader<Am0ie>;
454impl Am0ieR {
455    #[doc = "Get enumerated values variant"]
456    #[inline(always)]
457    pub const fn variant(&self) -> Am0ie {
458        match self.bits {
459            false => Am0ie::Disabled,
460            true => Am0ie::Enabled,
461        }
462    }
463    #[doc = "Disable"]
464    #[inline(always)]
465    pub fn is_disabled(&self) -> bool {
466        *self == Am0ie::Disabled
467    }
468    #[doc = "Enable"]
469    #[inline(always)]
470    pub fn is_enabled(&self) -> bool {
471        *self == Am0ie::Enabled
472    }
473}
474#[doc = "Field `AM0IE` writer - Address Match 0 Interrupt Enable"]
475pub type Am0ieW<'a, REG> = crate::BitWriter<'a, REG, Am0ie>;
476impl<'a, REG> Am0ieW<'a, REG>
477where
478    REG: crate::Writable + crate::RegisterSpec,
479{
480    #[doc = "Disable"]
481    #[inline(always)]
482    pub fn disabled(self) -> &'a mut crate::W<REG> {
483        self.variant(Am0ie::Disabled)
484    }
485    #[doc = "Enable"]
486    #[inline(always)]
487    pub fn enabled(self) -> &'a mut crate::W<REG> {
488        self.variant(Am0ie::Enabled)
489    }
490}
491#[doc = "Address Match 1 Interrupt Enable\n\nValue on reset: 0"]
492#[cfg_attr(feature = "defmt", derive(defmt::Format))]
493#[derive(Clone, Copy, Debug, PartialEq, Eq)]
494pub enum Am1ie {
495    #[doc = "0: Disable"]
496    Disabled = 0,
497    #[doc = "1: Enable"]
498    Enabled = 1,
499}
500impl From<Am1ie> for bool {
501    #[inline(always)]
502    fn from(variant: Am1ie) -> Self {
503        variant as u8 != 0
504    }
505}
506#[doc = "Field `AM1IE` reader - Address Match 1 Interrupt Enable"]
507pub type Am1ieR = crate::BitReader<Am1ie>;
508impl Am1ieR {
509    #[doc = "Get enumerated values variant"]
510    #[inline(always)]
511    pub const fn variant(&self) -> Am1ie {
512        match self.bits {
513            false => Am1ie::Disabled,
514            true => Am1ie::Enabled,
515        }
516    }
517    #[doc = "Disable"]
518    #[inline(always)]
519    pub fn is_disabled(&self) -> bool {
520        *self == Am1ie::Disabled
521    }
522    #[doc = "Enable"]
523    #[inline(always)]
524    pub fn is_enabled(&self) -> bool {
525        *self == Am1ie::Enabled
526    }
527}
528#[doc = "Field `AM1IE` writer - Address Match 1 Interrupt Enable"]
529pub type Am1ieW<'a, REG> = crate::BitWriter<'a, REG, Am1ie>;
530impl<'a, REG> Am1ieW<'a, REG>
531where
532    REG: crate::Writable + crate::RegisterSpec,
533{
534    #[doc = "Disable"]
535    #[inline(always)]
536    pub fn disabled(self) -> &'a mut crate::W<REG> {
537        self.variant(Am1ie::Disabled)
538    }
539    #[doc = "Enable"]
540    #[inline(always)]
541    pub fn enabled(self) -> &'a mut crate::W<REG> {
542        self.variant(Am1ie::Enabled)
543    }
544}
545#[doc = "General Call Interrupt Enable\n\nValue on reset: 0"]
546#[cfg_attr(feature = "defmt", derive(defmt::Format))]
547#[derive(Clone, Copy, Debug, PartialEq, Eq)]
548pub enum Gcie {
549    #[doc = "0: Disabled"]
550    Disabled = 0,
551    #[doc = "1: Enabled"]
552    Enabled = 1,
553}
554impl From<Gcie> for bool {
555    #[inline(always)]
556    fn from(variant: Gcie) -> Self {
557        variant as u8 != 0
558    }
559}
560#[doc = "Field `GCIE` reader - General Call Interrupt Enable"]
561pub type GcieR = crate::BitReader<Gcie>;
562impl GcieR {
563    #[doc = "Get enumerated values variant"]
564    #[inline(always)]
565    pub const fn variant(&self) -> Gcie {
566        match self.bits {
567            false => Gcie::Disabled,
568            true => Gcie::Enabled,
569        }
570    }
571    #[doc = "Disabled"]
572    #[inline(always)]
573    pub fn is_disabled(&self) -> bool {
574        *self == Gcie::Disabled
575    }
576    #[doc = "Enabled"]
577    #[inline(always)]
578    pub fn is_enabled(&self) -> bool {
579        *self == Gcie::Enabled
580    }
581}
582#[doc = "Field `GCIE` writer - General Call Interrupt Enable"]
583pub type GcieW<'a, REG> = crate::BitWriter<'a, REG, Gcie>;
584impl<'a, REG> GcieW<'a, REG>
585where
586    REG: crate::Writable + crate::RegisterSpec,
587{
588    #[doc = "Disabled"]
589    #[inline(always)]
590    pub fn disabled(self) -> &'a mut crate::W<REG> {
591        self.variant(Gcie::Disabled)
592    }
593    #[doc = "Enabled"]
594    #[inline(always)]
595    pub fn enabled(self) -> &'a mut crate::W<REG> {
596        self.variant(Gcie::Enabled)
597    }
598}
599#[doc = "SMBus Alert Response Interrupt Enable\n\nValue on reset: 0"]
600#[cfg_attr(feature = "defmt", derive(defmt::Format))]
601#[derive(Clone, Copy, Debug, PartialEq, Eq)]
602pub enum Sarie {
603    #[doc = "0: Disable"]
604    Disabled = 0,
605    #[doc = "1: Enable"]
606    Enabled = 1,
607}
608impl From<Sarie> for bool {
609    #[inline(always)]
610    fn from(variant: Sarie) -> Self {
611        variant as u8 != 0
612    }
613}
614#[doc = "Field `SARIE` reader - SMBus Alert Response Interrupt Enable"]
615pub type SarieR = crate::BitReader<Sarie>;
616impl SarieR {
617    #[doc = "Get enumerated values variant"]
618    #[inline(always)]
619    pub const fn variant(&self) -> Sarie {
620        match self.bits {
621            false => Sarie::Disabled,
622            true => Sarie::Enabled,
623        }
624    }
625    #[doc = "Disable"]
626    #[inline(always)]
627    pub fn is_disabled(&self) -> bool {
628        *self == Sarie::Disabled
629    }
630    #[doc = "Enable"]
631    #[inline(always)]
632    pub fn is_enabled(&self) -> bool {
633        *self == Sarie::Enabled
634    }
635}
636#[doc = "Field `SARIE` writer - SMBus Alert Response Interrupt Enable"]
637pub type SarieW<'a, REG> = crate::BitWriter<'a, REG, Sarie>;
638impl<'a, REG> SarieW<'a, REG>
639where
640    REG: crate::Writable + crate::RegisterSpec,
641{
642    #[doc = "Disable"]
643    #[inline(always)]
644    pub fn disabled(self) -> &'a mut crate::W<REG> {
645        self.variant(Sarie::Disabled)
646    }
647    #[doc = "Enable"]
648    #[inline(always)]
649    pub fn enabled(self) -> &'a mut crate::W<REG> {
650        self.variant(Sarie::Enabled)
651    }
652}
653impl R {
654    #[doc = "Bit 0 - Transmit Data Interrupt Enable"]
655    #[inline(always)]
656    pub fn tdie(&self) -> TdieR {
657        TdieR::new((self.bits & 1) != 0)
658    }
659    #[doc = "Bit 1 - Receive Data Interrupt Enable"]
660    #[inline(always)]
661    pub fn rdie(&self) -> RdieR {
662        RdieR::new(((self.bits >> 1) & 1) != 0)
663    }
664    #[doc = "Bit 2 - Address Valid Interrupt Enable"]
665    #[inline(always)]
666    pub fn avie(&self) -> AvieR {
667        AvieR::new(((self.bits >> 2) & 1) != 0)
668    }
669    #[doc = "Bit 3 - Transmit ACK Interrupt Enable"]
670    #[inline(always)]
671    pub fn taie(&self) -> TaieR {
672        TaieR::new(((self.bits >> 3) & 1) != 0)
673    }
674    #[doc = "Bit 8 - Repeated Start Interrupt Enable"]
675    #[inline(always)]
676    pub fn rsie(&self) -> RsieR {
677        RsieR::new(((self.bits >> 8) & 1) != 0)
678    }
679    #[doc = "Bit 9 - Stop Detect Interrupt Enable"]
680    #[inline(always)]
681    pub fn sdie(&self) -> SdieR {
682        SdieR::new(((self.bits >> 9) & 1) != 0)
683    }
684    #[doc = "Bit 10 - Bit Error Interrupt Enable"]
685    #[inline(always)]
686    pub fn beie(&self) -> BeieR {
687        BeieR::new(((self.bits >> 10) & 1) != 0)
688    }
689    #[doc = "Bit 11 - FIFO Error Interrupt Enable"]
690    #[inline(always)]
691    pub fn feie(&self) -> FeieR {
692        FeieR::new(((self.bits >> 11) & 1) != 0)
693    }
694    #[doc = "Bit 12 - Address Match 0 Interrupt Enable"]
695    #[inline(always)]
696    pub fn am0ie(&self) -> Am0ieR {
697        Am0ieR::new(((self.bits >> 12) & 1) != 0)
698    }
699    #[doc = "Bit 13 - Address Match 1 Interrupt Enable"]
700    #[inline(always)]
701    pub fn am1ie(&self) -> Am1ieR {
702        Am1ieR::new(((self.bits >> 13) & 1) != 0)
703    }
704    #[doc = "Bit 14 - General Call Interrupt Enable"]
705    #[inline(always)]
706    pub fn gcie(&self) -> GcieR {
707        GcieR::new(((self.bits >> 14) & 1) != 0)
708    }
709    #[doc = "Bit 15 - SMBus Alert Response Interrupt Enable"]
710    #[inline(always)]
711    pub fn sarie(&self) -> SarieR {
712        SarieR::new(((self.bits >> 15) & 1) != 0)
713    }
714}
715#[cfg(feature = "debug")]
716impl core::fmt::Debug for R {
717    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
718        f.debug_struct("SIER")
719            .field("tdie", &self.tdie())
720            .field("rdie", &self.rdie())
721            .field("avie", &self.avie())
722            .field("taie", &self.taie())
723            .field("rsie", &self.rsie())
724            .field("sdie", &self.sdie())
725            .field("beie", &self.beie())
726            .field("feie", &self.feie())
727            .field("am0ie", &self.am0ie())
728            .field("am1ie", &self.am1ie())
729            .field("gcie", &self.gcie())
730            .field("sarie", &self.sarie())
731            .finish()
732    }
733}
734impl W {
735    #[doc = "Bit 0 - Transmit Data Interrupt Enable"]
736    #[inline(always)]
737    pub fn tdie(&mut self) -> TdieW<'_, SierSpec> {
738        TdieW::new(self, 0)
739    }
740    #[doc = "Bit 1 - Receive Data Interrupt Enable"]
741    #[inline(always)]
742    pub fn rdie(&mut self) -> RdieW<'_, SierSpec> {
743        RdieW::new(self, 1)
744    }
745    #[doc = "Bit 2 - Address Valid Interrupt Enable"]
746    #[inline(always)]
747    pub fn avie(&mut self) -> AvieW<'_, SierSpec> {
748        AvieW::new(self, 2)
749    }
750    #[doc = "Bit 3 - Transmit ACK Interrupt Enable"]
751    #[inline(always)]
752    pub fn taie(&mut self) -> TaieW<'_, SierSpec> {
753        TaieW::new(self, 3)
754    }
755    #[doc = "Bit 8 - Repeated Start Interrupt Enable"]
756    #[inline(always)]
757    pub fn rsie(&mut self) -> RsieW<'_, SierSpec> {
758        RsieW::new(self, 8)
759    }
760    #[doc = "Bit 9 - Stop Detect Interrupt Enable"]
761    #[inline(always)]
762    pub fn sdie(&mut self) -> SdieW<'_, SierSpec> {
763        SdieW::new(self, 9)
764    }
765    #[doc = "Bit 10 - Bit Error Interrupt Enable"]
766    #[inline(always)]
767    pub fn beie(&mut self) -> BeieW<'_, SierSpec> {
768        BeieW::new(self, 10)
769    }
770    #[doc = "Bit 11 - FIFO Error Interrupt Enable"]
771    #[inline(always)]
772    pub fn feie(&mut self) -> FeieW<'_, SierSpec> {
773        FeieW::new(self, 11)
774    }
775    #[doc = "Bit 12 - Address Match 0 Interrupt Enable"]
776    #[inline(always)]
777    pub fn am0ie(&mut self) -> Am0ieW<'_, SierSpec> {
778        Am0ieW::new(self, 12)
779    }
780    #[doc = "Bit 13 - Address Match 1 Interrupt Enable"]
781    #[inline(always)]
782    pub fn am1ie(&mut self) -> Am1ieW<'_, SierSpec> {
783        Am1ieW::new(self, 13)
784    }
785    #[doc = "Bit 14 - General Call Interrupt Enable"]
786    #[inline(always)]
787    pub fn gcie(&mut self) -> GcieW<'_, SierSpec> {
788        GcieW::new(self, 14)
789    }
790    #[doc = "Bit 15 - SMBus Alert Response Interrupt Enable"]
791    #[inline(always)]
792    pub fn sarie(&mut self) -> SarieW<'_, SierSpec> {
793        SarieW::new(self, 15)
794    }
795}
796#[doc = "Target Interrupt Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`sier::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sier::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
797pub struct SierSpec;
798impl crate::RegisterSpec for SierSpec {
799    type Ux = u32;
800}
801#[doc = "`read()` method returns [`sier::R`](R) reader structure"]
802impl crate::Readable for SierSpec {}
803#[doc = "`write(|w| ..)` method takes [`sier::W`](W) writer structure"]
804impl crate::Writable for SierSpec {
805    type Safety = crate::Unsafe;
806}
807#[doc = "`reset()` method sets SIER to value 0"]
808impl crate::Resettable for SierSpec {}