1#[doc = "Register `INTSTS0` reader"]
2pub struct R(crate::R<INTSTS0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INTSTS0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INTSTS0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INTSTS0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INTSTS0` writer"]
17pub struct W(crate::W<INTSTS0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INTSTS0_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<INTSTS0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INTSTS0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `CTSQ` reader - Control Transfer Stage"]
38pub type CTSQ_R = crate::FieldReader<u8, CTSQ_A>;
39#[doc = "Control Transfer Stage\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum CTSQ_A {
43 #[doc = "0: Idle or setup stage"]
44 _000 = 0,
45 #[doc = "1: Control read data stage"]
46 _001 = 1,
47 #[doc = "2: Control read status stage"]
48 _010 = 2,
49 #[doc = "3: Control write data stage"]
50 _011 = 3,
51 #[doc = "4: Control write status stage"]
52 _100 = 4,
53 #[doc = "5: Control write (no data) status stage"]
54 _101 = 5,
55 #[doc = "6: Control transfer sequence error"]
56 _110 = 6,
57}
58impl From<CTSQ_A> for u8 {
59 #[inline(always)]
60 fn from(variant: CTSQ_A) -> Self {
61 variant as _
62 }
63}
64impl CTSQ_R {
65 #[doc = "Get enumerated values variant"]
66 #[inline(always)]
67 pub fn variant(&self) -> CTSQ_A {
68 match self.bits {
69 0 => CTSQ_A::_000,
70 1 => CTSQ_A::_001,
71 2 => CTSQ_A::_010,
72 3 => CTSQ_A::_011,
73 4 => CTSQ_A::_100,
74 5 => CTSQ_A::_101,
75 6 => CTSQ_A::_110,
76 _ => unreachable!(),
77 }
78 }
79 #[doc = "Checks if the value of the field is `_000`"]
80 #[inline(always)]
81 pub fn is_000(&self) -> bool {
82 *self == CTSQ_A::_000
83 }
84 #[doc = "Checks if the value of the field is `_001`"]
85 #[inline(always)]
86 pub fn is_001(&self) -> bool {
87 *self == CTSQ_A::_001
88 }
89 #[doc = "Checks if the value of the field is `_010`"]
90 #[inline(always)]
91 pub fn is_010(&self) -> bool {
92 *self == CTSQ_A::_010
93 }
94 #[doc = "Checks if the value of the field is `_011`"]
95 #[inline(always)]
96 pub fn is_011(&self) -> bool {
97 *self == CTSQ_A::_011
98 }
99 #[doc = "Checks if the value of the field is `_100`"]
100 #[inline(always)]
101 pub fn is_100(&self) -> bool {
102 *self == CTSQ_A::_100
103 }
104 #[doc = "Checks if the value of the field is `_101`"]
105 #[inline(always)]
106 pub fn is_101(&self) -> bool {
107 *self == CTSQ_A::_101
108 }
109 #[doc = "Checks if the value of the field is `_110`"]
110 #[inline(always)]
111 pub fn is_110(&self) -> bool {
112 *self == CTSQ_A::_110
113 }
114}
115#[doc = "Field `VALID` reader - USB Request Reception"]
116pub type VALID_R = crate::BitReader<VALID_A>;
117#[doc = "USB Request Reception\n\nValue on reset: 0"]
118#[derive(Clone, Copy, Debug, PartialEq, Eq)]
119pub enum VALID_A {
120 #[doc = "0: Setup packet is not received"]
121 _0 = 0,
122 #[doc = "1: Setup packet is received"]
123 _1 = 1,
124}
125impl From<VALID_A> for bool {
126 #[inline(always)]
127 fn from(variant: VALID_A) -> Self {
128 variant as u8 != 0
129 }
130}
131impl VALID_R {
132 #[doc = "Get enumerated values variant"]
133 #[inline(always)]
134 pub fn variant(&self) -> VALID_A {
135 match self.bits {
136 false => VALID_A::_0,
137 true => VALID_A::_1,
138 }
139 }
140 #[doc = "Checks if the value of the field is `_0`"]
141 #[inline(always)]
142 pub fn is_0(&self) -> bool {
143 *self == VALID_A::_0
144 }
145 #[doc = "Checks if the value of the field is `_1`"]
146 #[inline(always)]
147 pub fn is_1(&self) -> bool {
148 *self == VALID_A::_1
149 }
150}
151#[doc = "Field `VALID` writer - USB Request Reception"]
152pub type VALID_W<'a, const O: u8> = crate::BitWriter<'a, u16, INTSTS0_SPEC, VALID_A, O>;
153impl<'a, const O: u8> VALID_W<'a, O> {
154 #[doc = "Setup packet is not received"]
155 #[inline(always)]
156 pub fn _0(self) -> &'a mut W {
157 self.variant(VALID_A::_0)
158 }
159 #[doc = "Setup packet is received"]
160 #[inline(always)]
161 pub fn _1(self) -> &'a mut W {
162 self.variant(VALID_A::_1)
163 }
164}
165#[doc = "Field `DVSQ` reader - Device State"]
166pub type DVSQ_R = crate::FieldReader<u8, DVSQ_A>;
167#[doc = "Device State\n\nValue on reset: 0"]
168#[derive(Clone, Copy, Debug, PartialEq, Eq)]
169#[repr(u8)]
170pub enum DVSQ_A {
171 #[doc = "0: Powered state"]
172 _000 = 0,
173 #[doc = "1: Default state"]
174 _001 = 1,
175 #[doc = "2: Address state"]
176 _010 = 2,
177 #[doc = "3: Configured state"]
178 _011 = 3,
179}
180impl From<DVSQ_A> for u8 {
181 #[inline(always)]
182 fn from(variant: DVSQ_A) -> Self {
183 variant as _
184 }
185}
186impl DVSQ_R {
187 #[doc = "Get enumerated values variant"]
188 #[inline(always)]
189 pub fn variant(&self) -> Option<DVSQ_A> {
190 match self.bits {
191 0 => Some(DVSQ_A::_000),
192 1 => Some(DVSQ_A::_001),
193 2 => Some(DVSQ_A::_010),
194 3 => Some(DVSQ_A::_011),
195 _ => None,
196 }
197 }
198 #[doc = "Checks if the value of the field is `_000`"]
199 #[inline(always)]
200 pub fn is_000(&self) -> bool {
201 *self == DVSQ_A::_000
202 }
203 #[doc = "Checks if the value of the field is `_001`"]
204 #[inline(always)]
205 pub fn is_001(&self) -> bool {
206 *self == DVSQ_A::_001
207 }
208 #[doc = "Checks if the value of the field is `_010`"]
209 #[inline(always)]
210 pub fn is_010(&self) -> bool {
211 *self == DVSQ_A::_010
212 }
213 #[doc = "Checks if the value of the field is `_011`"]
214 #[inline(always)]
215 pub fn is_011(&self) -> bool {
216 *self == DVSQ_A::_011
217 }
218}
219#[doc = "Field `VBSTS` reader - VBUS Input Status"]
220pub type VBSTS_R = crate::BitReader<VBSTS_A>;
221#[doc = "VBUS Input Status\n\nValue on reset: 0"]
222#[derive(Clone, Copy, Debug, PartialEq, Eq)]
223pub enum VBSTS_A {
224 #[doc = "0: USB_VBUS pin is low."]
225 _0 = 0,
226 #[doc = "1: USB_VBUS pin is high."]
227 _1 = 1,
228}
229impl From<VBSTS_A> for bool {
230 #[inline(always)]
231 fn from(variant: VBSTS_A) -> Self {
232 variant as u8 != 0
233 }
234}
235impl VBSTS_R {
236 #[doc = "Get enumerated values variant"]
237 #[inline(always)]
238 pub fn variant(&self) -> VBSTS_A {
239 match self.bits {
240 false => VBSTS_A::_0,
241 true => VBSTS_A::_1,
242 }
243 }
244 #[doc = "Checks if the value of the field is `_0`"]
245 #[inline(always)]
246 pub fn is_0(&self) -> bool {
247 *self == VBSTS_A::_0
248 }
249 #[doc = "Checks if the value of the field is `_1`"]
250 #[inline(always)]
251 pub fn is_1(&self) -> bool {
252 *self == VBSTS_A::_1
253 }
254}
255#[doc = "Field `BRDY` reader - Buffer Ready Interrupt Status"]
256pub type BRDY_R = crate::BitReader<BRDY_A>;
257#[doc = "Buffer Ready Interrupt Status\n\nValue on reset: 0"]
258#[derive(Clone, Copy, Debug, PartialEq, Eq)]
259pub enum BRDY_A {
260 #[doc = "0: BRDY interrupts are not generated."]
261 _0 = 0,
262 #[doc = "1: BRDY interrupts are generated."]
263 _1 = 1,
264}
265impl From<BRDY_A> for bool {
266 #[inline(always)]
267 fn from(variant: BRDY_A) -> Self {
268 variant as u8 != 0
269 }
270}
271impl BRDY_R {
272 #[doc = "Get enumerated values variant"]
273 #[inline(always)]
274 pub fn variant(&self) -> BRDY_A {
275 match self.bits {
276 false => BRDY_A::_0,
277 true => BRDY_A::_1,
278 }
279 }
280 #[doc = "Checks if the value of the field is `_0`"]
281 #[inline(always)]
282 pub fn is_0(&self) -> bool {
283 *self == BRDY_A::_0
284 }
285 #[doc = "Checks if the value of the field is `_1`"]
286 #[inline(always)]
287 pub fn is_1(&self) -> bool {
288 *self == BRDY_A::_1
289 }
290}
291#[doc = "Field `NRDY` reader - Buffer Not Ready Interrupt Status"]
292pub type NRDY_R = crate::BitReader<NRDY_A>;
293#[doc = "Buffer Not Ready Interrupt Status\n\nValue on reset: 0"]
294#[derive(Clone, Copy, Debug, PartialEq, Eq)]
295pub enum NRDY_A {
296 #[doc = "0: NRDY interrupts are not generated."]
297 _0 = 0,
298 #[doc = "1: NRDY interrupts are generated."]
299 _1 = 1,
300}
301impl From<NRDY_A> for bool {
302 #[inline(always)]
303 fn from(variant: NRDY_A) -> Self {
304 variant as u8 != 0
305 }
306}
307impl NRDY_R {
308 #[doc = "Get enumerated values variant"]
309 #[inline(always)]
310 pub fn variant(&self) -> NRDY_A {
311 match self.bits {
312 false => NRDY_A::_0,
313 true => NRDY_A::_1,
314 }
315 }
316 #[doc = "Checks if the value of the field is `_0`"]
317 #[inline(always)]
318 pub fn is_0(&self) -> bool {
319 *self == NRDY_A::_0
320 }
321 #[doc = "Checks if the value of the field is `_1`"]
322 #[inline(always)]
323 pub fn is_1(&self) -> bool {
324 *self == NRDY_A::_1
325 }
326}
327#[doc = "Field `BEMP` reader - Buffer Empty Interrupt Status"]
328pub type BEMP_R = crate::BitReader<BEMP_A>;
329#[doc = "Buffer Empty Interrupt Status\n\nValue on reset: 0"]
330#[derive(Clone, Copy, Debug, PartialEq, Eq)]
331pub enum BEMP_A {
332 #[doc = "0: BEMP interrupts are not generated."]
333 _0 = 0,
334 #[doc = "1: BEMP interrupts are generated."]
335 _1 = 1,
336}
337impl From<BEMP_A> for bool {
338 #[inline(always)]
339 fn from(variant: BEMP_A) -> Self {
340 variant as u8 != 0
341 }
342}
343impl BEMP_R {
344 #[doc = "Get enumerated values variant"]
345 #[inline(always)]
346 pub fn variant(&self) -> BEMP_A {
347 match self.bits {
348 false => BEMP_A::_0,
349 true => BEMP_A::_1,
350 }
351 }
352 #[doc = "Checks if the value of the field is `_0`"]
353 #[inline(always)]
354 pub fn is_0(&self) -> bool {
355 *self == BEMP_A::_0
356 }
357 #[doc = "Checks if the value of the field is `_1`"]
358 #[inline(always)]
359 pub fn is_1(&self) -> bool {
360 *self == BEMP_A::_1
361 }
362}
363#[doc = "Field `CTRT` reader - Control Transfer Stage Transition Interrupt Status\n\nThe field is **modified** in some way after a read operation."]
364pub type CTRT_R = crate::BitReader<CTRT_A>;
365#[doc = "Control Transfer Stage Transition Interrupt Status\n\nValue on reset: 0"]
366#[derive(Clone, Copy, Debug, PartialEq, Eq)]
367pub enum CTRT_A {
368 #[doc = "0: Control transfer stage transition interrupts are not generated."]
369 _0 = 0,
370 #[doc = "1: Control transfer stage transition interrupts are generated."]
371 _1 = 1,
372}
373impl From<CTRT_A> for bool {
374 #[inline(always)]
375 fn from(variant: CTRT_A) -> Self {
376 variant as u8 != 0
377 }
378}
379impl CTRT_R {
380 #[doc = "Get enumerated values variant"]
381 #[inline(always)]
382 pub fn variant(&self) -> CTRT_A {
383 match self.bits {
384 false => CTRT_A::_0,
385 true => CTRT_A::_1,
386 }
387 }
388 #[doc = "Checks if the value of the field is `_0`"]
389 #[inline(always)]
390 pub fn is_0(&self) -> bool {
391 *self == CTRT_A::_0
392 }
393 #[doc = "Checks if the value of the field is `_1`"]
394 #[inline(always)]
395 pub fn is_1(&self) -> bool {
396 *self == CTRT_A::_1
397 }
398}
399#[doc = "Field `CTRT` writer - Control Transfer Stage Transition Interrupt Status"]
400pub type CTRT_W<'a, const O: u8> = crate::BitWriter0C<'a, u16, INTSTS0_SPEC, CTRT_A, O>;
401impl<'a, const O: u8> CTRT_W<'a, O> {
402 #[doc = "Control transfer stage transition interrupts are not generated."]
403 #[inline(always)]
404 pub fn _0(self) -> &'a mut W {
405 self.variant(CTRT_A::_0)
406 }
407 #[doc = "Control transfer stage transition interrupts are generated."]
408 #[inline(always)]
409 pub fn _1(self) -> &'a mut W {
410 self.variant(CTRT_A::_1)
411 }
412}
413#[doc = "Field `DVST` reader - Device State Transition Interrupt Status\n\nThe field is **modified** in some way after a read operation."]
414pub type DVST_R = crate::BitReader<DVST_A>;
415#[doc = "Device State Transition Interrupt Status\n\nValue on reset: 0"]
416#[derive(Clone, Copy, Debug, PartialEq, Eq)]
417pub enum DVST_A {
418 #[doc = "0: Device state transition interrupts are not generated."]
419 _0 = 0,
420 #[doc = "1: Device state transition interrupts are generated."]
421 _1 = 1,
422}
423impl From<DVST_A> for bool {
424 #[inline(always)]
425 fn from(variant: DVST_A) -> Self {
426 variant as u8 != 0
427 }
428}
429impl DVST_R {
430 #[doc = "Get enumerated values variant"]
431 #[inline(always)]
432 pub fn variant(&self) -> DVST_A {
433 match self.bits {
434 false => DVST_A::_0,
435 true => DVST_A::_1,
436 }
437 }
438 #[doc = "Checks if the value of the field is `_0`"]
439 #[inline(always)]
440 pub fn is_0(&self) -> bool {
441 *self == DVST_A::_0
442 }
443 #[doc = "Checks if the value of the field is `_1`"]
444 #[inline(always)]
445 pub fn is_1(&self) -> bool {
446 *self == DVST_A::_1
447 }
448}
449#[doc = "Field `DVST` writer - Device State Transition Interrupt Status"]
450pub type DVST_W<'a, const O: u8> = crate::BitWriter0C<'a, u16, INTSTS0_SPEC, DVST_A, O>;
451impl<'a, const O: u8> DVST_W<'a, O> {
452 #[doc = "Device state transition interrupts are not generated."]
453 #[inline(always)]
454 pub fn _0(self) -> &'a mut W {
455 self.variant(DVST_A::_0)
456 }
457 #[doc = "Device state transition interrupts are generated."]
458 #[inline(always)]
459 pub fn _1(self) -> &'a mut W {
460 self.variant(DVST_A::_1)
461 }
462}
463#[doc = "Field `SOFR` reader - Frame Number Refresh Interrupt Status\n\nThe field is **modified** in some way after a read operation."]
464pub type SOFR_R = crate::BitReader<SOFR_A>;
465#[doc = "Frame Number Refresh Interrupt Status\n\nValue on reset: 0"]
466#[derive(Clone, Copy, Debug, PartialEq, Eq)]
467pub enum SOFR_A {
468 #[doc = "0: SOF interrupts are not generated."]
469 _0 = 0,
470 #[doc = "1: SOF interrupts are generated."]
471 _1 = 1,
472}
473impl From<SOFR_A> for bool {
474 #[inline(always)]
475 fn from(variant: SOFR_A) -> Self {
476 variant as u8 != 0
477 }
478}
479impl SOFR_R {
480 #[doc = "Get enumerated values variant"]
481 #[inline(always)]
482 pub fn variant(&self) -> SOFR_A {
483 match self.bits {
484 false => SOFR_A::_0,
485 true => SOFR_A::_1,
486 }
487 }
488 #[doc = "Checks if the value of the field is `_0`"]
489 #[inline(always)]
490 pub fn is_0(&self) -> bool {
491 *self == SOFR_A::_0
492 }
493 #[doc = "Checks if the value of the field is `_1`"]
494 #[inline(always)]
495 pub fn is_1(&self) -> bool {
496 *self == SOFR_A::_1
497 }
498}
499#[doc = "Field `SOFR` writer - Frame Number Refresh Interrupt Status"]
500pub type SOFR_W<'a, const O: u8> = crate::BitWriter0C<'a, u16, INTSTS0_SPEC, SOFR_A, O>;
501impl<'a, const O: u8> SOFR_W<'a, O> {
502 #[doc = "SOF interrupts are not generated."]
503 #[inline(always)]
504 pub fn _0(self) -> &'a mut W {
505 self.variant(SOFR_A::_0)
506 }
507 #[doc = "SOF interrupts are generated."]
508 #[inline(always)]
509 pub fn _1(self) -> &'a mut W {
510 self.variant(SOFR_A::_1)
511 }
512}
513#[doc = "Field `RESM` reader - Resume Interrupt Status\n\nThe field is **modified** in some way after a read operation."]
514pub type RESM_R = crate::BitReader<RESM_A>;
515#[doc = "Resume Interrupt Status\n\nValue on reset: 0"]
516#[derive(Clone, Copy, Debug, PartialEq, Eq)]
517pub enum RESM_A {
518 #[doc = "0: Resume interrupts are not generated."]
519 _0 = 0,
520 #[doc = "1: Resume interrupts are generated."]
521 _1 = 1,
522}
523impl From<RESM_A> for bool {
524 #[inline(always)]
525 fn from(variant: RESM_A) -> Self {
526 variant as u8 != 0
527 }
528}
529impl RESM_R {
530 #[doc = "Get enumerated values variant"]
531 #[inline(always)]
532 pub fn variant(&self) -> RESM_A {
533 match self.bits {
534 false => RESM_A::_0,
535 true => RESM_A::_1,
536 }
537 }
538 #[doc = "Checks if the value of the field is `_0`"]
539 #[inline(always)]
540 pub fn is_0(&self) -> bool {
541 *self == RESM_A::_0
542 }
543 #[doc = "Checks if the value of the field is `_1`"]
544 #[inline(always)]
545 pub fn is_1(&self) -> bool {
546 *self == RESM_A::_1
547 }
548}
549#[doc = "Field `RESM` writer - Resume Interrupt Status"]
550pub type RESM_W<'a, const O: u8> = crate::BitWriter0C<'a, u16, INTSTS0_SPEC, RESM_A, O>;
551impl<'a, const O: u8> RESM_W<'a, O> {
552 #[doc = "Resume interrupts are not generated."]
553 #[inline(always)]
554 pub fn _0(self) -> &'a mut W {
555 self.variant(RESM_A::_0)
556 }
557 #[doc = "Resume interrupts are generated."]
558 #[inline(always)]
559 pub fn _1(self) -> &'a mut W {
560 self.variant(RESM_A::_1)
561 }
562}
563#[doc = "Field `VBINT` reader - VBUS Interrupt Status\n\nThe field is **modified** in some way after a read operation."]
564pub type VBINT_R = crate::BitReader<VBINT_A>;
565#[doc = "VBUS Interrupt Status\n\nValue on reset: 0"]
566#[derive(Clone, Copy, Debug, PartialEq, Eq)]
567pub enum VBINT_A {
568 #[doc = "0: VBUS interrupts are not generated."]
569 _0 = 0,
570 #[doc = "1: VBUS interrupts are generated."]
571 _1 = 1,
572}
573impl From<VBINT_A> for bool {
574 #[inline(always)]
575 fn from(variant: VBINT_A) -> Self {
576 variant as u8 != 0
577 }
578}
579impl VBINT_R {
580 #[doc = "Get enumerated values variant"]
581 #[inline(always)]
582 pub fn variant(&self) -> VBINT_A {
583 match self.bits {
584 false => VBINT_A::_0,
585 true => VBINT_A::_1,
586 }
587 }
588 #[doc = "Checks if the value of the field is `_0`"]
589 #[inline(always)]
590 pub fn is_0(&self) -> bool {
591 *self == VBINT_A::_0
592 }
593 #[doc = "Checks if the value of the field is `_1`"]
594 #[inline(always)]
595 pub fn is_1(&self) -> bool {
596 *self == VBINT_A::_1
597 }
598}
599#[doc = "Field `VBINT` writer - VBUS Interrupt Status"]
600pub type VBINT_W<'a, const O: u8> = crate::BitWriter0C<'a, u16, INTSTS0_SPEC, VBINT_A, O>;
601impl<'a, const O: u8> VBINT_W<'a, O> {
602 #[doc = "VBUS interrupts are not generated."]
603 #[inline(always)]
604 pub fn _0(self) -> &'a mut W {
605 self.variant(VBINT_A::_0)
606 }
607 #[doc = "VBUS interrupts are generated."]
608 #[inline(always)]
609 pub fn _1(self) -> &'a mut W {
610 self.variant(VBINT_A::_1)
611 }
612}
613impl R {
614 #[doc = "Bits 0:2 - Control Transfer Stage"]
615 #[inline(always)]
616 pub fn ctsq(&self) -> CTSQ_R {
617 CTSQ_R::new((self.bits & 7) as u8)
618 }
619 #[doc = "Bit 3 - USB Request Reception"]
620 #[inline(always)]
621 pub fn valid(&self) -> VALID_R {
622 VALID_R::new(((self.bits >> 3) & 1) != 0)
623 }
624 #[doc = "Bits 4:6 - Device State"]
625 #[inline(always)]
626 pub fn dvsq(&self) -> DVSQ_R {
627 DVSQ_R::new(((self.bits >> 4) & 7) as u8)
628 }
629 #[doc = "Bit 7 - VBUS Input Status"]
630 #[inline(always)]
631 pub fn vbsts(&self) -> VBSTS_R {
632 VBSTS_R::new(((self.bits >> 7) & 1) != 0)
633 }
634 #[doc = "Bit 8 - Buffer Ready Interrupt Status"]
635 #[inline(always)]
636 pub fn brdy(&self) -> BRDY_R {
637 BRDY_R::new(((self.bits >> 8) & 1) != 0)
638 }
639 #[doc = "Bit 9 - Buffer Not Ready Interrupt Status"]
640 #[inline(always)]
641 pub fn nrdy(&self) -> NRDY_R {
642 NRDY_R::new(((self.bits >> 9) & 1) != 0)
643 }
644 #[doc = "Bit 10 - Buffer Empty Interrupt Status"]
645 #[inline(always)]
646 pub fn bemp(&self) -> BEMP_R {
647 BEMP_R::new(((self.bits >> 10) & 1) != 0)
648 }
649 #[doc = "Bit 11 - Control Transfer Stage Transition Interrupt Status"]
650 #[inline(always)]
651 pub fn ctrt(&self) -> CTRT_R {
652 CTRT_R::new(((self.bits >> 11) & 1) != 0)
653 }
654 #[doc = "Bit 12 - Device State Transition Interrupt Status"]
655 #[inline(always)]
656 pub fn dvst(&self) -> DVST_R {
657 DVST_R::new(((self.bits >> 12) & 1) != 0)
658 }
659 #[doc = "Bit 13 - Frame Number Refresh Interrupt Status"]
660 #[inline(always)]
661 pub fn sofr(&self) -> SOFR_R {
662 SOFR_R::new(((self.bits >> 13) & 1) != 0)
663 }
664 #[doc = "Bit 14 - Resume Interrupt Status"]
665 #[inline(always)]
666 pub fn resm(&self) -> RESM_R {
667 RESM_R::new(((self.bits >> 14) & 1) != 0)
668 }
669 #[doc = "Bit 15 - VBUS Interrupt Status"]
670 #[inline(always)]
671 pub fn vbint(&self) -> VBINT_R {
672 VBINT_R::new(((self.bits >> 15) & 1) != 0)
673 }
674}
675impl W {
676 #[doc = "Bit 3 - USB Request Reception"]
677 #[inline(always)]
678 #[must_use]
679 pub fn valid(&mut self) -> VALID_W<3> {
680 VALID_W::new(self)
681 }
682 #[doc = "Bit 11 - Control Transfer Stage Transition Interrupt Status"]
683 #[inline(always)]
684 #[must_use]
685 pub fn ctrt(&mut self) -> CTRT_W<11> {
686 CTRT_W::new(self)
687 }
688 #[doc = "Bit 12 - Device State Transition Interrupt Status"]
689 #[inline(always)]
690 #[must_use]
691 pub fn dvst(&mut self) -> DVST_W<12> {
692 DVST_W::new(self)
693 }
694 #[doc = "Bit 13 - Frame Number Refresh Interrupt Status"]
695 #[inline(always)]
696 #[must_use]
697 pub fn sofr(&mut self) -> SOFR_W<13> {
698 SOFR_W::new(self)
699 }
700 #[doc = "Bit 14 - Resume Interrupt Status"]
701 #[inline(always)]
702 #[must_use]
703 pub fn resm(&mut self) -> RESM_W<14> {
704 RESM_W::new(self)
705 }
706 #[doc = "Bit 15 - VBUS Interrupt Status"]
707 #[inline(always)]
708 #[must_use]
709 pub fn vbint(&mut self) -> VBINT_W<15> {
710 VBINT_W::new(self)
711 }
712 #[doc = "Writes raw bits to the register."]
713 #[inline(always)]
714 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
715 self.0.bits(bits);
716 self
717 }
718}
719#[doc = "Interrupt Status Register 0\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 [intsts0](index.html) module"]
720pub struct INTSTS0_SPEC;
721impl crate::RegisterSpec for INTSTS0_SPEC {
722 type Ux = u16;
723}
724#[doc = "`read()` method returns [intsts0::R](R) reader structure"]
725impl crate::Readable for INTSTS0_SPEC {
726 type Reader = R;
727}
728#[doc = "`write(|w| ..)` method takes [intsts0::W](W) writer structure"]
729impl crate::Writable for INTSTS0_SPEC {
730 type Writer = W;
731 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xf800;
732 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
733}
734#[doc = "`reset()` method sets INTSTS0 to value 0"]
735impl crate::Resettable for INTSTS0_SPEC {
736 const RESET_VALUE: Self::Ux = 0;
737}