atsaml21g17b/pac/
intflagc.rs

1#[doc = "Register `INTFLAGC` reader"]
2pub struct R(crate::R<INTFLAGC_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<INTFLAGC_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<INTFLAGC_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<INTFLAGC_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `INTFLAGC` writer"]
17pub struct W(crate::W<INTFLAGC_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<INTFLAGC_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<INTFLAGC_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<INTFLAGC_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `SERCOM0_` reader - SERCOM0"]
38pub type SERCOM0__R = crate::BitReader<bool>;
39#[doc = "Field `SERCOM0_` writer - SERCOM0"]
40pub type SERCOM0__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
41#[doc = "Field `SERCOM1_` reader - SERCOM1"]
42pub type SERCOM1__R = crate::BitReader<bool>;
43#[doc = "Field `SERCOM1_` writer - SERCOM1"]
44pub type SERCOM1__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
45#[doc = "Field `SERCOM2_` reader - SERCOM2"]
46pub type SERCOM2__R = crate::BitReader<bool>;
47#[doc = "Field `SERCOM2_` writer - SERCOM2"]
48pub type SERCOM2__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
49#[doc = "Field `SERCOM3_` reader - SERCOM3"]
50pub type SERCOM3__R = crate::BitReader<bool>;
51#[doc = "Field `SERCOM3_` writer - SERCOM3"]
52pub type SERCOM3__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
53#[doc = "Field `SERCOM4_` reader - SERCOM4"]
54pub type SERCOM4__R = crate::BitReader<bool>;
55#[doc = "Field `SERCOM4_` writer - SERCOM4"]
56pub type SERCOM4__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
57#[doc = "Field `TCC0_` reader - TCC0"]
58pub type TCC0__R = crate::BitReader<bool>;
59#[doc = "Field `TCC0_` writer - TCC0"]
60pub type TCC0__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
61#[doc = "Field `TCC1_` reader - TCC1"]
62pub type TCC1__R = crate::BitReader<bool>;
63#[doc = "Field `TCC1_` writer - TCC1"]
64pub type TCC1__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
65#[doc = "Field `TCC2_` reader - TCC2"]
66pub type TCC2__R = crate::BitReader<bool>;
67#[doc = "Field `TCC2_` writer - TCC2"]
68pub type TCC2__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
69#[doc = "Field `TC0_` reader - TC0"]
70pub type TC0__R = crate::BitReader<bool>;
71#[doc = "Field `TC0_` writer - TC0"]
72pub type TC0__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
73#[doc = "Field `TC1_` reader - TC1"]
74pub type TC1__R = crate::BitReader<bool>;
75#[doc = "Field `TC1_` writer - TC1"]
76pub type TC1__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
77#[doc = "Field `DAC_` reader - DAC"]
78pub type DAC__R = crate::BitReader<bool>;
79#[doc = "Field `DAC_` writer - DAC"]
80pub type DAC__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
81#[doc = "Field `AES_` reader - AES"]
82pub type AES__R = crate::BitReader<bool>;
83#[doc = "Field `AES_` writer - AES"]
84pub type AES__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
85#[doc = "Field `TRNG_` reader - TRNG"]
86pub type TRNG__R = crate::BitReader<bool>;
87#[doc = "Field `TRNG_` writer - TRNG"]
88pub type TRNG__W<'a, const O: u8> = crate::BitWriter<'a, u32, INTFLAGC_SPEC, bool, O>;
89impl R {
90    #[doc = "Bit 0 - SERCOM0"]
91    #[inline(always)]
92    pub fn sercom0_(&self) -> SERCOM0__R {
93        SERCOM0__R::new((self.bits & 1) != 0)
94    }
95    #[doc = "Bit 1 - SERCOM1"]
96    #[inline(always)]
97    pub fn sercom1_(&self) -> SERCOM1__R {
98        SERCOM1__R::new(((self.bits >> 1) & 1) != 0)
99    }
100    #[doc = "Bit 2 - SERCOM2"]
101    #[inline(always)]
102    pub fn sercom2_(&self) -> SERCOM2__R {
103        SERCOM2__R::new(((self.bits >> 2) & 1) != 0)
104    }
105    #[doc = "Bit 3 - SERCOM3"]
106    #[inline(always)]
107    pub fn sercom3_(&self) -> SERCOM3__R {
108        SERCOM3__R::new(((self.bits >> 3) & 1) != 0)
109    }
110    #[doc = "Bit 4 - SERCOM4"]
111    #[inline(always)]
112    pub fn sercom4_(&self) -> SERCOM4__R {
113        SERCOM4__R::new(((self.bits >> 4) & 1) != 0)
114    }
115    #[doc = "Bit 5 - TCC0"]
116    #[inline(always)]
117    pub fn tcc0_(&self) -> TCC0__R {
118        TCC0__R::new(((self.bits >> 5) & 1) != 0)
119    }
120    #[doc = "Bit 6 - TCC1"]
121    #[inline(always)]
122    pub fn tcc1_(&self) -> TCC1__R {
123        TCC1__R::new(((self.bits >> 6) & 1) != 0)
124    }
125    #[doc = "Bit 7 - TCC2"]
126    #[inline(always)]
127    pub fn tcc2_(&self) -> TCC2__R {
128        TCC2__R::new(((self.bits >> 7) & 1) != 0)
129    }
130    #[doc = "Bit 8 - TC0"]
131    #[inline(always)]
132    pub fn tc0_(&self) -> TC0__R {
133        TC0__R::new(((self.bits >> 8) & 1) != 0)
134    }
135    #[doc = "Bit 9 - TC1"]
136    #[inline(always)]
137    pub fn tc1_(&self) -> TC1__R {
138        TC1__R::new(((self.bits >> 9) & 1) != 0)
139    }
140    #[doc = "Bit 12 - DAC"]
141    #[inline(always)]
142    pub fn dac_(&self) -> DAC__R {
143        DAC__R::new(((self.bits >> 12) & 1) != 0)
144    }
145    #[doc = "Bit 13 - AES"]
146    #[inline(always)]
147    pub fn aes_(&self) -> AES__R {
148        AES__R::new(((self.bits >> 13) & 1) != 0)
149    }
150    #[doc = "Bit 14 - TRNG"]
151    #[inline(always)]
152    pub fn trng_(&self) -> TRNG__R {
153        TRNG__R::new(((self.bits >> 14) & 1) != 0)
154    }
155}
156impl W {
157    #[doc = "Bit 0 - SERCOM0"]
158    #[inline(always)]
159    #[must_use]
160    pub fn sercom0_(&mut self) -> SERCOM0__W<0> {
161        SERCOM0__W::new(self)
162    }
163    #[doc = "Bit 1 - SERCOM1"]
164    #[inline(always)]
165    #[must_use]
166    pub fn sercom1_(&mut self) -> SERCOM1__W<1> {
167        SERCOM1__W::new(self)
168    }
169    #[doc = "Bit 2 - SERCOM2"]
170    #[inline(always)]
171    #[must_use]
172    pub fn sercom2_(&mut self) -> SERCOM2__W<2> {
173        SERCOM2__W::new(self)
174    }
175    #[doc = "Bit 3 - SERCOM3"]
176    #[inline(always)]
177    #[must_use]
178    pub fn sercom3_(&mut self) -> SERCOM3__W<3> {
179        SERCOM3__W::new(self)
180    }
181    #[doc = "Bit 4 - SERCOM4"]
182    #[inline(always)]
183    #[must_use]
184    pub fn sercom4_(&mut self) -> SERCOM4__W<4> {
185        SERCOM4__W::new(self)
186    }
187    #[doc = "Bit 5 - TCC0"]
188    #[inline(always)]
189    #[must_use]
190    pub fn tcc0_(&mut self) -> TCC0__W<5> {
191        TCC0__W::new(self)
192    }
193    #[doc = "Bit 6 - TCC1"]
194    #[inline(always)]
195    #[must_use]
196    pub fn tcc1_(&mut self) -> TCC1__W<6> {
197        TCC1__W::new(self)
198    }
199    #[doc = "Bit 7 - TCC2"]
200    #[inline(always)]
201    #[must_use]
202    pub fn tcc2_(&mut self) -> TCC2__W<7> {
203        TCC2__W::new(self)
204    }
205    #[doc = "Bit 8 - TC0"]
206    #[inline(always)]
207    #[must_use]
208    pub fn tc0_(&mut self) -> TC0__W<8> {
209        TC0__W::new(self)
210    }
211    #[doc = "Bit 9 - TC1"]
212    #[inline(always)]
213    #[must_use]
214    pub fn tc1_(&mut self) -> TC1__W<9> {
215        TC1__W::new(self)
216    }
217    #[doc = "Bit 12 - DAC"]
218    #[inline(always)]
219    #[must_use]
220    pub fn dac_(&mut self) -> DAC__W<12> {
221        DAC__W::new(self)
222    }
223    #[doc = "Bit 13 - AES"]
224    #[inline(always)]
225    #[must_use]
226    pub fn aes_(&mut self) -> AES__W<13> {
227        AES__W::new(self)
228    }
229    #[doc = "Bit 14 - TRNG"]
230    #[inline(always)]
231    #[must_use]
232    pub fn trng_(&mut self) -> TRNG__W<14> {
233        TRNG__W::new(self)
234    }
235    #[doc = "Writes raw bits to the register."]
236    #[inline(always)]
237    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
238        self.0.bits(bits);
239        self
240    }
241}
242#[doc = "Peripheral interrupt flag status - Bridge C\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 [intflagc](index.html) module"]
243pub struct INTFLAGC_SPEC;
244impl crate::RegisterSpec for INTFLAGC_SPEC {
245    type Ux = u32;
246}
247#[doc = "`read()` method returns [intflagc::R](R) reader structure"]
248impl crate::Readable for INTFLAGC_SPEC {
249    type Reader = R;
250}
251#[doc = "`write(|w| ..)` method takes [intflagc::W](W) writer structure"]
252impl crate::Writable for INTFLAGC_SPEC {
253    type Writer = W;
254    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
255    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
256}
257#[doc = "`reset()` method sets INTFLAGC to value 0"]
258impl crate::Resettable for INTFLAGC_SPEC {
259    const RESET_VALUE: Self::Ux = 0;
260}