efm32hg310_pac/usb/
daint.rs1#[doc = "Register `DAINT` reader"]
2pub struct R(crate::R<DAINT_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DAINT_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DAINT_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DAINT_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `INEPINT0` reader - IN Endpoint 0 Interrupt Bit"]
17pub type INEPINT0_R = crate::BitReader<bool>;
18#[doc = "Field `INEPINT1` reader - IN Endpoint 1 Interrupt Bit"]
19pub type INEPINT1_R = crate::BitReader<bool>;
20#[doc = "Field `INEPINT2` reader - IN Endpoint 2 Interrupt Bit"]
21pub type INEPINT2_R = crate::BitReader<bool>;
22#[doc = "Field `INEPINT3` reader - IN Endpoint 3 Interrupt Bit"]
23pub type INEPINT3_R = crate::BitReader<bool>;
24#[doc = "Field `OUTEPINT0` reader - OUT Endpoint 0 Interrupt Bit"]
25pub type OUTEPINT0_R = crate::BitReader<bool>;
26#[doc = "Field `OUTEPINT1` reader - OUT Endpoint 1 Interrupt Bit"]
27pub type OUTEPINT1_R = crate::BitReader<bool>;
28#[doc = "Field `OUTEPINT2` reader - OUT Endpoint 2 Interrupt Bit"]
29pub type OUTEPINT2_R = crate::BitReader<bool>;
30#[doc = "Field `OUTEPINT3` reader - OUT Endpoint 3 Interrupt Bit"]
31pub type OUTEPINT3_R = crate::BitReader<bool>;
32impl R {
33 #[doc = "Bit 0 - IN Endpoint 0 Interrupt Bit"]
34 #[inline(always)]
35 pub fn inepint0(&self) -> INEPINT0_R {
36 INEPINT0_R::new((self.bits & 1) != 0)
37 }
38 #[doc = "Bit 1 - IN Endpoint 1 Interrupt Bit"]
39 #[inline(always)]
40 pub fn inepint1(&self) -> INEPINT1_R {
41 INEPINT1_R::new(((self.bits >> 1) & 1) != 0)
42 }
43 #[doc = "Bit 2 - IN Endpoint 2 Interrupt Bit"]
44 #[inline(always)]
45 pub fn inepint2(&self) -> INEPINT2_R {
46 INEPINT2_R::new(((self.bits >> 2) & 1) != 0)
47 }
48 #[doc = "Bit 3 - IN Endpoint 3 Interrupt Bit"]
49 #[inline(always)]
50 pub fn inepint3(&self) -> INEPINT3_R {
51 INEPINT3_R::new(((self.bits >> 3) & 1) != 0)
52 }
53 #[doc = "Bit 16 - OUT Endpoint 0 Interrupt Bit"]
54 #[inline(always)]
55 pub fn outepint0(&self) -> OUTEPINT0_R {
56 OUTEPINT0_R::new(((self.bits >> 16) & 1) != 0)
57 }
58 #[doc = "Bit 17 - OUT Endpoint 1 Interrupt Bit"]
59 #[inline(always)]
60 pub fn outepint1(&self) -> OUTEPINT1_R {
61 OUTEPINT1_R::new(((self.bits >> 17) & 1) != 0)
62 }
63 #[doc = "Bit 18 - OUT Endpoint 2 Interrupt Bit"]
64 #[inline(always)]
65 pub fn outepint2(&self) -> OUTEPINT2_R {
66 OUTEPINT2_R::new(((self.bits >> 18) & 1) != 0)
67 }
68 #[doc = "Bit 19 - OUT Endpoint 3 Interrupt Bit"]
69 #[inline(always)]
70 pub fn outepint3(&self) -> OUTEPINT3_R {
71 OUTEPINT3_R::new(((self.bits >> 19) & 1) != 0)
72 }
73}
74#[doc = "Device All Endpoints Interrupt Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [daint](index.html) module"]
75pub struct DAINT_SPEC;
76impl crate::RegisterSpec for DAINT_SPEC {
77 type Ux = u32;
78}
79#[doc = "`read()` method returns [daint::R](R) reader structure"]
80impl crate::Readable for DAINT_SPEC {
81 type Reader = R;
82}
83#[doc = "`reset()` method sets DAINT to value 0"]
84impl crate::Resettable for DAINT_SPEC {
85 #[inline(always)]
86 fn reset_value() -> Self::Ux {
87 0
88 }
89}