atsamd51j/pac/
intflagd.rs

1#[doc = "Register `INTFLAGD` reader"]
2pub type R = crate::R<IntflagdSpec>;
3#[doc = "Register `INTFLAGD` writer"]
4pub type W = crate::W<IntflagdSpec>;
5#[doc = "Field `SERCOM4_` reader - SERCOM4"]
6pub type Sercom4_R = crate::BitReader;
7#[doc = "Field `SERCOM4_` writer - SERCOM4"]
8pub type Sercom4_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SERCOM5_` reader - SERCOM5"]
10pub type Sercom5_R = crate::BitReader;
11#[doc = "Field `SERCOM5_` writer - SERCOM5"]
12pub type Sercom5_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `TCC4_` reader - TCC4"]
14pub type Tcc4_R = crate::BitReader;
15#[doc = "Field `TCC4_` writer - TCC4"]
16pub type Tcc4_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ADC0_` reader - ADC0"]
18pub type Adc0_R = crate::BitReader;
19#[doc = "Field `ADC0_` writer - ADC0"]
20pub type Adc0_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `ADC1_` reader - ADC1"]
22pub type Adc1_R = crate::BitReader;
23#[doc = "Field `ADC1_` writer - ADC1"]
24pub type Adc1_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `DAC_` reader - DAC"]
26pub type Dac_R = crate::BitReader;
27#[doc = "Field `DAC_` writer - DAC"]
28pub type Dac_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `I2S_` reader - I2S"]
30pub type I2s_R = crate::BitReader;
31#[doc = "Field `I2S_` writer - I2S"]
32pub type I2s_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `PCC_` reader - PCC"]
34pub type Pcc_R = crate::BitReader;
35#[doc = "Field `PCC_` writer - PCC"]
36pub type Pcc_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38    #[doc = "Bit 0 - SERCOM4"]
39    #[inline(always)]
40    pub fn sercom4_(&self) -> Sercom4_R {
41        Sercom4_R::new((self.bits & 1) != 0)
42    }
43    #[doc = "Bit 1 - SERCOM5"]
44    #[inline(always)]
45    pub fn sercom5_(&self) -> Sercom5_R {
46        Sercom5_R::new(((self.bits >> 1) & 1) != 0)
47    }
48    #[doc = "Bit 4 - TCC4"]
49    #[inline(always)]
50    pub fn tcc4_(&self) -> Tcc4_R {
51        Tcc4_R::new(((self.bits >> 4) & 1) != 0)
52    }
53    #[doc = "Bit 7 - ADC0"]
54    #[inline(always)]
55    pub fn adc0_(&self) -> Adc0_R {
56        Adc0_R::new(((self.bits >> 7) & 1) != 0)
57    }
58    #[doc = "Bit 8 - ADC1"]
59    #[inline(always)]
60    pub fn adc1_(&self) -> Adc1_R {
61        Adc1_R::new(((self.bits >> 8) & 1) != 0)
62    }
63    #[doc = "Bit 9 - DAC"]
64    #[inline(always)]
65    pub fn dac_(&self) -> Dac_R {
66        Dac_R::new(((self.bits >> 9) & 1) != 0)
67    }
68    #[doc = "Bit 10 - I2S"]
69    #[inline(always)]
70    pub fn i2s_(&self) -> I2s_R {
71        I2s_R::new(((self.bits >> 10) & 1) != 0)
72    }
73    #[doc = "Bit 11 - PCC"]
74    #[inline(always)]
75    pub fn pcc_(&self) -> Pcc_R {
76        Pcc_R::new(((self.bits >> 11) & 1) != 0)
77    }
78}
79impl W {
80    #[doc = "Bit 0 - SERCOM4"]
81    #[inline(always)]
82    #[must_use]
83    pub fn sercom4_(&mut self) -> Sercom4_W<IntflagdSpec> {
84        Sercom4_W::new(self, 0)
85    }
86    #[doc = "Bit 1 - SERCOM5"]
87    #[inline(always)]
88    #[must_use]
89    pub fn sercom5_(&mut self) -> Sercom5_W<IntflagdSpec> {
90        Sercom5_W::new(self, 1)
91    }
92    #[doc = "Bit 4 - TCC4"]
93    #[inline(always)]
94    #[must_use]
95    pub fn tcc4_(&mut self) -> Tcc4_W<IntflagdSpec> {
96        Tcc4_W::new(self, 4)
97    }
98    #[doc = "Bit 7 - ADC0"]
99    #[inline(always)]
100    #[must_use]
101    pub fn adc0_(&mut self) -> Adc0_W<IntflagdSpec> {
102        Adc0_W::new(self, 7)
103    }
104    #[doc = "Bit 8 - ADC1"]
105    #[inline(always)]
106    #[must_use]
107    pub fn adc1_(&mut self) -> Adc1_W<IntflagdSpec> {
108        Adc1_W::new(self, 8)
109    }
110    #[doc = "Bit 9 - DAC"]
111    #[inline(always)]
112    #[must_use]
113    pub fn dac_(&mut self) -> Dac_W<IntflagdSpec> {
114        Dac_W::new(self, 9)
115    }
116    #[doc = "Bit 10 - I2S"]
117    #[inline(always)]
118    #[must_use]
119    pub fn i2s_(&mut self) -> I2s_W<IntflagdSpec> {
120        I2s_W::new(self, 10)
121    }
122    #[doc = "Bit 11 - PCC"]
123    #[inline(always)]
124    #[must_use]
125    pub fn pcc_(&mut self) -> Pcc_W<IntflagdSpec> {
126        Pcc_W::new(self, 11)
127    }
128}
129#[doc = "Peripheral interrupt flag status - Bridge D\n\nYou can [`read`](crate::Reg::read) this register and get [`intflagd::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflagd::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct IntflagdSpec;
131impl crate::RegisterSpec for IntflagdSpec {
132    type Ux = u32;
133}
134#[doc = "`read()` method returns [`intflagd::R`](R) reader structure"]
135impl crate::Readable for IntflagdSpec {}
136#[doc = "`write(|w| ..)` method takes [`intflagd::W`](W) writer structure"]
137impl crate::Writable for IntflagdSpec {
138    type Safety = crate::Unsafe;
139    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
140    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
141}
142#[doc = "`reset()` method sets INTFLAGD to value 0"]
143impl crate::Resettable for IntflagdSpec {
144    const RESET_VALUE: u32 = 0;
145}