mimxrt685s_pac/usbhsd/
intstat.rs1#[doc = "Register `INTSTAT` reader"]
2pub type R = crate::R<IntstatSpec>;
3#[doc = "Register `INTSTAT` writer"]
4pub type W = crate::W<IntstatSpec>;
5#[doc = "Field `EP0OUT` reader - Interrupt status register bit for the Control EP0 OUT direction."]
6pub type Ep0outR = crate::BitReader;
7#[doc = "Field `EP0OUT` writer - Interrupt status register bit for the Control EP0 OUT direction."]
8pub type Ep0outW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `EP0IN` reader - Interrupt status register bit for the Control EP0 IN direction."]
10pub type Ep0inR = crate::BitReader;
11#[doc = "Field `EP0IN` writer - Interrupt status register bit for the Control EP0 IN direction."]
12pub type Ep0inW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EP1OUT` reader - Interrupt status register bit for the EP1 OUT direction."]
14pub type Ep1outR = crate::BitReader;
15#[doc = "Field `EP1OUT` writer - Interrupt status register bit for the EP1 OUT direction."]
16pub type Ep1outW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EP1IN` reader - Interrupt status register bit for the EP1 IN direction."]
18pub type Ep1inR = crate::BitReader;
19#[doc = "Field `EP1IN` writer - Interrupt status register bit for the EP1 IN direction."]
20pub type Ep1inW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `EP2OUT` reader - Interrupt status register bit for the EP2 OUT direction."]
22pub type Ep2outR = crate::BitReader;
23#[doc = "Field `EP2OUT` writer - Interrupt status register bit for the EP2 OUT direction."]
24pub type Ep2outW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `EP2IN` reader - Interrupt status register bit for the EP2 IN direction."]
26pub type Ep2inR = crate::BitReader;
27#[doc = "Field `EP2IN` writer - Interrupt status register bit for the EP2 IN direction."]
28pub type Ep2inW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `EP3OUT` reader - Interrupt status register bit for the EP3 OUT direction."]
30pub type Ep3outR = crate::BitReader;
31#[doc = "Field `EP3OUT` writer - Interrupt status register bit for the EP3 OUT direction."]
32pub type Ep3outW<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `EP3IN` reader - Interrupt status register bit for the EP3 IN direction."]
34pub type Ep3inR = crate::BitReader;
35#[doc = "Field `EP3IN` writer - Interrupt status register bit for the EP3 IN direction."]
36pub type Ep3inW<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `EP4OUT` reader - Interrupt status register bit for the EP4 OUT direction."]
38pub type Ep4outR = crate::BitReader;
39#[doc = "Field `EP4OUT` writer - Interrupt status register bit for the EP4 OUT direction."]
40pub type Ep4outW<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `EP4IN` reader - Interrupt status register bit for the EP4 IN direction."]
42pub type Ep4inR = crate::BitReader;
43#[doc = "Field `EP4IN` writer - Interrupt status register bit for the EP4 IN direction."]
44pub type Ep4inW<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `EP5OUT` reader - Interrupt status register bit for the EP5 OUT direction."]
46pub type Ep5outR = crate::BitReader;
47#[doc = "Field `EP5OUT` writer - Interrupt status register bit for the EP5 OUT direction."]
48pub type Ep5outW<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `EP5IN` reader - Interrupt status register bit for the EP5 IN direction."]
50pub type Ep5inR = crate::BitReader;
51#[doc = "Field `EP5IN` writer - Interrupt status register bit for the EP5 IN direction."]
52pub type Ep5inW<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `FRAME_INT` reader - Frame interrupt."]
54pub type FrameIntR = crate::BitReader;
55#[doc = "Field `FRAME_INT` writer - Frame interrupt."]
56pub type FrameIntW<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `DEV_INT` reader - Device status interrupt."]
58pub type DevIntR = crate::BitReader;
59#[doc = "Field `DEV_INT` writer - Device status interrupt."]
60pub type DevIntW<'a, REG> = crate::BitWriter<'a, REG>;
61impl R {
62 #[doc = "Bit 0 - Interrupt status register bit for the Control EP0 OUT direction."]
63 #[inline(always)]
64 pub fn ep0out(&self) -> Ep0outR {
65 Ep0outR::new((self.bits & 1) != 0)
66 }
67 #[doc = "Bit 1 - Interrupt status register bit for the Control EP0 IN direction."]
68 #[inline(always)]
69 pub fn ep0in(&self) -> Ep0inR {
70 Ep0inR::new(((self.bits >> 1) & 1) != 0)
71 }
72 #[doc = "Bit 2 - Interrupt status register bit for the EP1 OUT direction."]
73 #[inline(always)]
74 pub fn ep1out(&self) -> Ep1outR {
75 Ep1outR::new(((self.bits >> 2) & 1) != 0)
76 }
77 #[doc = "Bit 3 - Interrupt status register bit for the EP1 IN direction."]
78 #[inline(always)]
79 pub fn ep1in(&self) -> Ep1inR {
80 Ep1inR::new(((self.bits >> 3) & 1) != 0)
81 }
82 #[doc = "Bit 4 - Interrupt status register bit for the EP2 OUT direction."]
83 #[inline(always)]
84 pub fn ep2out(&self) -> Ep2outR {
85 Ep2outR::new(((self.bits >> 4) & 1) != 0)
86 }
87 #[doc = "Bit 5 - Interrupt status register bit for the EP2 IN direction."]
88 #[inline(always)]
89 pub fn ep2in(&self) -> Ep2inR {
90 Ep2inR::new(((self.bits >> 5) & 1) != 0)
91 }
92 #[doc = "Bit 6 - Interrupt status register bit for the EP3 OUT direction."]
93 #[inline(always)]
94 pub fn ep3out(&self) -> Ep3outR {
95 Ep3outR::new(((self.bits >> 6) & 1) != 0)
96 }
97 #[doc = "Bit 7 - Interrupt status register bit for the EP3 IN direction."]
98 #[inline(always)]
99 pub fn ep3in(&self) -> Ep3inR {
100 Ep3inR::new(((self.bits >> 7) & 1) != 0)
101 }
102 #[doc = "Bit 8 - Interrupt status register bit for the EP4 OUT direction."]
103 #[inline(always)]
104 pub fn ep4out(&self) -> Ep4outR {
105 Ep4outR::new(((self.bits >> 8) & 1) != 0)
106 }
107 #[doc = "Bit 9 - Interrupt status register bit for the EP4 IN direction."]
108 #[inline(always)]
109 pub fn ep4in(&self) -> Ep4inR {
110 Ep4inR::new(((self.bits >> 9) & 1) != 0)
111 }
112 #[doc = "Bit 10 - Interrupt status register bit for the EP5 OUT direction."]
113 #[inline(always)]
114 pub fn ep5out(&self) -> Ep5outR {
115 Ep5outR::new(((self.bits >> 10) & 1) != 0)
116 }
117 #[doc = "Bit 11 - Interrupt status register bit for the EP5 IN direction."]
118 #[inline(always)]
119 pub fn ep5in(&self) -> Ep5inR {
120 Ep5inR::new(((self.bits >> 11) & 1) != 0)
121 }
122 #[doc = "Bit 30 - Frame interrupt."]
123 #[inline(always)]
124 pub fn frame_int(&self) -> FrameIntR {
125 FrameIntR::new(((self.bits >> 30) & 1) != 0)
126 }
127 #[doc = "Bit 31 - Device status interrupt."]
128 #[inline(always)]
129 pub fn dev_int(&self) -> DevIntR {
130 DevIntR::new(((self.bits >> 31) & 1) != 0)
131 }
132}
133#[cfg(feature = "debug")]
134impl core::fmt::Debug for R {
135 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
136 f.debug_struct("INTSTAT")
137 .field("ep0out", &self.ep0out())
138 .field("ep0in", &self.ep0in())
139 .field("ep1out", &self.ep1out())
140 .field("ep1in", &self.ep1in())
141 .field("ep2out", &self.ep2out())
142 .field("ep2in", &self.ep2in())
143 .field("ep3out", &self.ep3out())
144 .field("ep3in", &self.ep3in())
145 .field("ep4out", &self.ep4out())
146 .field("ep4in", &self.ep4in())
147 .field("ep5out", &self.ep5out())
148 .field("ep5in", &self.ep5in())
149 .field("frame_int", &self.frame_int())
150 .field("dev_int", &self.dev_int())
151 .finish()
152 }
153}
154impl W {
155 #[doc = "Bit 0 - Interrupt status register bit for the Control EP0 OUT direction."]
156 #[inline(always)]
157 pub fn ep0out(&mut self) -> Ep0outW<IntstatSpec> {
158 Ep0outW::new(self, 0)
159 }
160 #[doc = "Bit 1 - Interrupt status register bit for the Control EP0 IN direction."]
161 #[inline(always)]
162 pub fn ep0in(&mut self) -> Ep0inW<IntstatSpec> {
163 Ep0inW::new(self, 1)
164 }
165 #[doc = "Bit 2 - Interrupt status register bit for the EP1 OUT direction."]
166 #[inline(always)]
167 pub fn ep1out(&mut self) -> Ep1outW<IntstatSpec> {
168 Ep1outW::new(self, 2)
169 }
170 #[doc = "Bit 3 - Interrupt status register bit for the EP1 IN direction."]
171 #[inline(always)]
172 pub fn ep1in(&mut self) -> Ep1inW<IntstatSpec> {
173 Ep1inW::new(self, 3)
174 }
175 #[doc = "Bit 4 - Interrupt status register bit for the EP2 OUT direction."]
176 #[inline(always)]
177 pub fn ep2out(&mut self) -> Ep2outW<IntstatSpec> {
178 Ep2outW::new(self, 4)
179 }
180 #[doc = "Bit 5 - Interrupt status register bit for the EP2 IN direction."]
181 #[inline(always)]
182 pub fn ep2in(&mut self) -> Ep2inW<IntstatSpec> {
183 Ep2inW::new(self, 5)
184 }
185 #[doc = "Bit 6 - Interrupt status register bit for the EP3 OUT direction."]
186 #[inline(always)]
187 pub fn ep3out(&mut self) -> Ep3outW<IntstatSpec> {
188 Ep3outW::new(self, 6)
189 }
190 #[doc = "Bit 7 - Interrupt status register bit for the EP3 IN direction."]
191 #[inline(always)]
192 pub fn ep3in(&mut self) -> Ep3inW<IntstatSpec> {
193 Ep3inW::new(self, 7)
194 }
195 #[doc = "Bit 8 - Interrupt status register bit for the EP4 OUT direction."]
196 #[inline(always)]
197 pub fn ep4out(&mut self) -> Ep4outW<IntstatSpec> {
198 Ep4outW::new(self, 8)
199 }
200 #[doc = "Bit 9 - Interrupt status register bit for the EP4 IN direction."]
201 #[inline(always)]
202 pub fn ep4in(&mut self) -> Ep4inW<IntstatSpec> {
203 Ep4inW::new(self, 9)
204 }
205 #[doc = "Bit 10 - Interrupt status register bit for the EP5 OUT direction."]
206 #[inline(always)]
207 pub fn ep5out(&mut self) -> Ep5outW<IntstatSpec> {
208 Ep5outW::new(self, 10)
209 }
210 #[doc = "Bit 11 - Interrupt status register bit for the EP5 IN direction."]
211 #[inline(always)]
212 pub fn ep5in(&mut self) -> Ep5inW<IntstatSpec> {
213 Ep5inW::new(self, 11)
214 }
215 #[doc = "Bit 30 - Frame interrupt."]
216 #[inline(always)]
217 pub fn frame_int(&mut self) -> FrameIntW<IntstatSpec> {
218 FrameIntW::new(self, 30)
219 }
220 #[doc = "Bit 31 - Device status interrupt."]
221 #[inline(always)]
222 pub fn dev_int(&mut self) -> DevIntW<IntstatSpec> {
223 DevIntW::new(self, 31)
224 }
225}
226#[doc = "USB interrupt status register\n\nYou can [`read`](crate::Reg::read) this register and get [`intstat::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intstat::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
227pub struct IntstatSpec;
228impl crate::RegisterSpec for IntstatSpec {
229 type Ux = u32;
230}
231#[doc = "`read()` method returns [`intstat::R`](R) reader structure"]
232impl crate::Readable for IntstatSpec {}
233#[doc = "`write(|w| ..)` method takes [`intstat::W`](W) writer structure"]
234impl crate::Writable for IntstatSpec {
235 type Safety = crate::Unsafe;
236 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
237 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
238}
239#[doc = "`reset()` method sets INTSTAT to value 0"]
240impl crate::Resettable for IntstatSpec {
241 const RESET_VALUE: u32 = 0;
242}