efm32hg309_pac/usb/
gintmsk.rs

1#[doc = "Register `GINTMSK` reader"]
2pub struct R(crate::R<GINTMSK_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GINTMSK_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GINTMSK_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GINTMSK_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GINTMSK` writer"]
17pub struct W(crate::W<GINTMSK_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GINTMSK_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<GINTMSK_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GINTMSK_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `MODEMISMSK` reader - Mode Mismatch Interrupt Mask"]
38pub type MODEMISMSK_R = crate::BitReader<bool>;
39#[doc = "Field `MODEMISMSK` writer - Mode Mismatch Interrupt Mask"]
40pub type MODEMISMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 1>;
41#[doc = "Field `SOFMSK` reader - Start of Frame Mask"]
42pub type SOFMSK_R = crate::BitReader<bool>;
43#[doc = "Field `SOFMSK` writer - Start of Frame Mask"]
44pub type SOFMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 3>;
45#[doc = "Field `RXFLVLMSK` reader - Receive FIFO Non-Empty Mask"]
46pub type RXFLVLMSK_R = crate::BitReader<bool>;
47#[doc = "Field `RXFLVLMSK` writer - Receive FIFO Non-Empty Mask"]
48pub type RXFLVLMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 4>;
49#[doc = "Field `GINNAKEFFMSK` reader - Global Non-periodic IN NAK Effective Mask"]
50pub type GINNAKEFFMSK_R = crate::BitReader<bool>;
51#[doc = "Field `GINNAKEFFMSK` writer - Global Non-periodic IN NAK Effective Mask"]
52pub type GINNAKEFFMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 6>;
53#[doc = "Field `GOUTNAKEFFMSK` reader - Global OUT NAK Effective Mask"]
54pub type GOUTNAKEFFMSK_R = crate::BitReader<bool>;
55#[doc = "Field `GOUTNAKEFFMSK` writer - Global OUT NAK Effective Mask"]
56pub type GOUTNAKEFFMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 7>;
57#[doc = "Field `ERLYSUSPMSK` reader - Early Suspend Mask"]
58pub type ERLYSUSPMSK_R = crate::BitReader<bool>;
59#[doc = "Field `ERLYSUSPMSK` writer - Early Suspend Mask"]
60pub type ERLYSUSPMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 10>;
61#[doc = "Field `USBSUSPMSK` reader - USB Suspend Mask"]
62pub type USBSUSPMSK_R = crate::BitReader<bool>;
63#[doc = "Field `USBSUSPMSK` writer - USB Suspend Mask"]
64pub type USBSUSPMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 11>;
65#[doc = "Field `USBRSTMSK` reader - USB Reset Mask"]
66pub type USBRSTMSK_R = crate::BitReader<bool>;
67#[doc = "Field `USBRSTMSK` writer - USB Reset Mask"]
68pub type USBRSTMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 12>;
69#[doc = "Field `ENUMDONEMSK` reader - Enumeration Done Mask"]
70pub type ENUMDONEMSK_R = crate::BitReader<bool>;
71#[doc = "Field `ENUMDONEMSK` writer - Enumeration Done Mask"]
72pub type ENUMDONEMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 13>;
73#[doc = "Field `ISOOUTDROPMSK` reader - Isochronous OUT Packet Dropped Interrupt Mask"]
74pub type ISOOUTDROPMSK_R = crate::BitReader<bool>;
75#[doc = "Field `ISOOUTDROPMSK` writer - Isochronous OUT Packet Dropped Interrupt Mask"]
76pub type ISOOUTDROPMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 14>;
77#[doc = "Field `EOPFMSK` reader - End of Periodic Frame Interrupt Mask"]
78pub type EOPFMSK_R = crate::BitReader<bool>;
79#[doc = "Field `EOPFMSK` writer - End of Periodic Frame Interrupt Mask"]
80pub type EOPFMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 15>;
81#[doc = "Field `IEPINTMSK` reader - IN Endpoints Interrupt Mask"]
82pub type IEPINTMSK_R = crate::BitReader<bool>;
83#[doc = "Field `IEPINTMSK` writer - IN Endpoints Interrupt Mask"]
84pub type IEPINTMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 18>;
85#[doc = "Field `OEPINTMSK` reader - OUT Endpoints Interrupt Mask"]
86pub type OEPINTMSK_R = crate::BitReader<bool>;
87#[doc = "Field `OEPINTMSK` writer - OUT Endpoints Interrupt Mask"]
88pub type OEPINTMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 19>;
89#[doc = "Field `INCOMPISOINMSK` reader - Incomplete Isochronous IN Transfer Mask"]
90pub type INCOMPISOINMSK_R = crate::BitReader<bool>;
91#[doc = "Field `INCOMPISOINMSK` writer - Incomplete Isochronous IN Transfer Mask"]
92pub type INCOMPISOINMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 20>;
93#[doc = "Field `INCOMPLPMSK` reader - Incomplete Periodic Transfer Mask"]
94pub type INCOMPLPMSK_R = crate::BitReader<bool>;
95#[doc = "Field `INCOMPLPMSK` writer - Incomplete Periodic Transfer Mask"]
96pub type INCOMPLPMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 21>;
97#[doc = "Field `FETSUSPMSK` reader - Data Fetch Suspended Mask"]
98pub type FETSUSPMSK_R = crate::BitReader<bool>;
99#[doc = "Field `FETSUSPMSK` writer - Data Fetch Suspended Mask"]
100pub type FETSUSPMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 22>;
101#[doc = "Field `RESETDETMSK` reader - Reset detected Interrupt Mask"]
102pub type RESETDETMSK_R = crate::BitReader<bool>;
103#[doc = "Field `RESETDETMSK` writer - Reset detected Interrupt Mask"]
104pub type RESETDETMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 23>;
105#[doc = "Field `WKUPINTMSK` reader - Resume/Remote Wakeup Detected Interrupt Mask"]
106pub type WKUPINTMSK_R = crate::BitReader<bool>;
107#[doc = "Field `WKUPINTMSK` writer - Resume/Remote Wakeup Detected Interrupt Mask"]
108pub type WKUPINTMSK_W<'a> = crate::BitWriter<'a, u32, GINTMSK_SPEC, bool, 31>;
109impl R {
110    #[doc = "Bit 1 - Mode Mismatch Interrupt Mask"]
111    #[inline(always)]
112    pub fn modemismsk(&self) -> MODEMISMSK_R {
113        MODEMISMSK_R::new(((self.bits >> 1) & 1) != 0)
114    }
115    #[doc = "Bit 3 - Start of Frame Mask"]
116    #[inline(always)]
117    pub fn sofmsk(&self) -> SOFMSK_R {
118        SOFMSK_R::new(((self.bits >> 3) & 1) != 0)
119    }
120    #[doc = "Bit 4 - Receive FIFO Non-Empty Mask"]
121    #[inline(always)]
122    pub fn rxflvlmsk(&self) -> RXFLVLMSK_R {
123        RXFLVLMSK_R::new(((self.bits >> 4) & 1) != 0)
124    }
125    #[doc = "Bit 6 - Global Non-periodic IN NAK Effective Mask"]
126    #[inline(always)]
127    pub fn ginnakeffmsk(&self) -> GINNAKEFFMSK_R {
128        GINNAKEFFMSK_R::new(((self.bits >> 6) & 1) != 0)
129    }
130    #[doc = "Bit 7 - Global OUT NAK Effective Mask"]
131    #[inline(always)]
132    pub fn goutnakeffmsk(&self) -> GOUTNAKEFFMSK_R {
133        GOUTNAKEFFMSK_R::new(((self.bits >> 7) & 1) != 0)
134    }
135    #[doc = "Bit 10 - Early Suspend Mask"]
136    #[inline(always)]
137    pub fn erlysuspmsk(&self) -> ERLYSUSPMSK_R {
138        ERLYSUSPMSK_R::new(((self.bits >> 10) & 1) != 0)
139    }
140    #[doc = "Bit 11 - USB Suspend Mask"]
141    #[inline(always)]
142    pub fn usbsuspmsk(&self) -> USBSUSPMSK_R {
143        USBSUSPMSK_R::new(((self.bits >> 11) & 1) != 0)
144    }
145    #[doc = "Bit 12 - USB Reset Mask"]
146    #[inline(always)]
147    pub fn usbrstmsk(&self) -> USBRSTMSK_R {
148        USBRSTMSK_R::new(((self.bits >> 12) & 1) != 0)
149    }
150    #[doc = "Bit 13 - Enumeration Done Mask"]
151    #[inline(always)]
152    pub fn enumdonemsk(&self) -> ENUMDONEMSK_R {
153        ENUMDONEMSK_R::new(((self.bits >> 13) & 1) != 0)
154    }
155    #[doc = "Bit 14 - Isochronous OUT Packet Dropped Interrupt Mask"]
156    #[inline(always)]
157    pub fn isooutdropmsk(&self) -> ISOOUTDROPMSK_R {
158        ISOOUTDROPMSK_R::new(((self.bits >> 14) & 1) != 0)
159    }
160    #[doc = "Bit 15 - End of Periodic Frame Interrupt Mask"]
161    #[inline(always)]
162    pub fn eopfmsk(&self) -> EOPFMSK_R {
163        EOPFMSK_R::new(((self.bits >> 15) & 1) != 0)
164    }
165    #[doc = "Bit 18 - IN Endpoints Interrupt Mask"]
166    #[inline(always)]
167    pub fn iepintmsk(&self) -> IEPINTMSK_R {
168        IEPINTMSK_R::new(((self.bits >> 18) & 1) != 0)
169    }
170    #[doc = "Bit 19 - OUT Endpoints Interrupt Mask"]
171    #[inline(always)]
172    pub fn oepintmsk(&self) -> OEPINTMSK_R {
173        OEPINTMSK_R::new(((self.bits >> 19) & 1) != 0)
174    }
175    #[doc = "Bit 20 - Incomplete Isochronous IN Transfer Mask"]
176    #[inline(always)]
177    pub fn incompisoinmsk(&self) -> INCOMPISOINMSK_R {
178        INCOMPISOINMSK_R::new(((self.bits >> 20) & 1) != 0)
179    }
180    #[doc = "Bit 21 - Incomplete Periodic Transfer Mask"]
181    #[inline(always)]
182    pub fn incomplpmsk(&self) -> INCOMPLPMSK_R {
183        INCOMPLPMSK_R::new(((self.bits >> 21) & 1) != 0)
184    }
185    #[doc = "Bit 22 - Data Fetch Suspended Mask"]
186    #[inline(always)]
187    pub fn fetsuspmsk(&self) -> FETSUSPMSK_R {
188        FETSUSPMSK_R::new(((self.bits >> 22) & 1) != 0)
189    }
190    #[doc = "Bit 23 - Reset detected Interrupt Mask"]
191    #[inline(always)]
192    pub fn resetdetmsk(&self) -> RESETDETMSK_R {
193        RESETDETMSK_R::new(((self.bits >> 23) & 1) != 0)
194    }
195    #[doc = "Bit 31 - Resume/Remote Wakeup Detected Interrupt Mask"]
196    #[inline(always)]
197    pub fn wkupintmsk(&self) -> WKUPINTMSK_R {
198        WKUPINTMSK_R::new(((self.bits >> 31) & 1) != 0)
199    }
200}
201impl W {
202    #[doc = "Bit 1 - Mode Mismatch Interrupt Mask"]
203    #[inline(always)]
204    pub fn modemismsk(&mut self) -> MODEMISMSK_W {
205        MODEMISMSK_W::new(self)
206    }
207    #[doc = "Bit 3 - Start of Frame Mask"]
208    #[inline(always)]
209    pub fn sofmsk(&mut self) -> SOFMSK_W {
210        SOFMSK_W::new(self)
211    }
212    #[doc = "Bit 4 - Receive FIFO Non-Empty Mask"]
213    #[inline(always)]
214    pub fn rxflvlmsk(&mut self) -> RXFLVLMSK_W {
215        RXFLVLMSK_W::new(self)
216    }
217    #[doc = "Bit 6 - Global Non-periodic IN NAK Effective Mask"]
218    #[inline(always)]
219    pub fn ginnakeffmsk(&mut self) -> GINNAKEFFMSK_W {
220        GINNAKEFFMSK_W::new(self)
221    }
222    #[doc = "Bit 7 - Global OUT NAK Effective Mask"]
223    #[inline(always)]
224    pub fn goutnakeffmsk(&mut self) -> GOUTNAKEFFMSK_W {
225        GOUTNAKEFFMSK_W::new(self)
226    }
227    #[doc = "Bit 10 - Early Suspend Mask"]
228    #[inline(always)]
229    pub fn erlysuspmsk(&mut self) -> ERLYSUSPMSK_W {
230        ERLYSUSPMSK_W::new(self)
231    }
232    #[doc = "Bit 11 - USB Suspend Mask"]
233    #[inline(always)]
234    pub fn usbsuspmsk(&mut self) -> USBSUSPMSK_W {
235        USBSUSPMSK_W::new(self)
236    }
237    #[doc = "Bit 12 - USB Reset Mask"]
238    #[inline(always)]
239    pub fn usbrstmsk(&mut self) -> USBRSTMSK_W {
240        USBRSTMSK_W::new(self)
241    }
242    #[doc = "Bit 13 - Enumeration Done Mask"]
243    #[inline(always)]
244    pub fn enumdonemsk(&mut self) -> ENUMDONEMSK_W {
245        ENUMDONEMSK_W::new(self)
246    }
247    #[doc = "Bit 14 - Isochronous OUT Packet Dropped Interrupt Mask"]
248    #[inline(always)]
249    pub fn isooutdropmsk(&mut self) -> ISOOUTDROPMSK_W {
250        ISOOUTDROPMSK_W::new(self)
251    }
252    #[doc = "Bit 15 - End of Periodic Frame Interrupt Mask"]
253    #[inline(always)]
254    pub fn eopfmsk(&mut self) -> EOPFMSK_W {
255        EOPFMSK_W::new(self)
256    }
257    #[doc = "Bit 18 - IN Endpoints Interrupt Mask"]
258    #[inline(always)]
259    pub fn iepintmsk(&mut self) -> IEPINTMSK_W {
260        IEPINTMSK_W::new(self)
261    }
262    #[doc = "Bit 19 - OUT Endpoints Interrupt Mask"]
263    #[inline(always)]
264    pub fn oepintmsk(&mut self) -> OEPINTMSK_W {
265        OEPINTMSK_W::new(self)
266    }
267    #[doc = "Bit 20 - Incomplete Isochronous IN Transfer Mask"]
268    #[inline(always)]
269    pub fn incompisoinmsk(&mut self) -> INCOMPISOINMSK_W {
270        INCOMPISOINMSK_W::new(self)
271    }
272    #[doc = "Bit 21 - Incomplete Periodic Transfer Mask"]
273    #[inline(always)]
274    pub fn incomplpmsk(&mut self) -> INCOMPLPMSK_W {
275        INCOMPLPMSK_W::new(self)
276    }
277    #[doc = "Bit 22 - Data Fetch Suspended Mask"]
278    #[inline(always)]
279    pub fn fetsuspmsk(&mut self) -> FETSUSPMSK_W {
280        FETSUSPMSK_W::new(self)
281    }
282    #[doc = "Bit 23 - Reset detected Interrupt Mask"]
283    #[inline(always)]
284    pub fn resetdetmsk(&mut self) -> RESETDETMSK_W {
285        RESETDETMSK_W::new(self)
286    }
287    #[doc = "Bit 31 - Resume/Remote Wakeup Detected Interrupt Mask"]
288    #[inline(always)]
289    pub fn wkupintmsk(&mut self) -> WKUPINTMSK_W {
290        WKUPINTMSK_W::new(self)
291    }
292    #[doc = "Writes raw bits to the register."]
293    #[inline(always)]
294    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
295        self.0.bits(bits);
296        self
297    }
298}
299#[doc = "Interrupt Mask 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 [gintmsk](index.html) module"]
300pub struct GINTMSK_SPEC;
301impl crate::RegisterSpec for GINTMSK_SPEC {
302    type Ux = u32;
303}
304#[doc = "`read()` method returns [gintmsk::R](R) reader structure"]
305impl crate::Readable for GINTMSK_SPEC {
306    type Reader = R;
307}
308#[doc = "`write(|w| ..)` method takes [gintmsk::W](W) writer structure"]
309impl crate::Writable for GINTMSK_SPEC {
310    type Writer = W;
311}
312#[doc = "`reset()` method sets GINTMSK to value 0"]
313impl crate::Resettable for GINTMSK_SPEC {
314    #[inline(always)]
315    fn reset_value() -> Self::Ux {
316        0
317    }
318}