atsams70n21/usbhs/
usbhs_deveptimr.rs1#[doc = "Register `USBHS_DEVEPTIMR[%s]` reader"]
2pub struct R(crate::R<USBHS_DEVEPTIMR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<USBHS_DEVEPTIMR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<USBHS_DEVEPTIMR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<USBHS_DEVEPTIMR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `TXINE` reader - Transmitted IN Data Interrupt"]
17pub struct TXINE_R(crate::FieldReader<bool, bool>);
18impl TXINE_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 TXINE_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for TXINE_R {
25 type Target = crate::FieldReader<bool, bool>;
26 #[inline(always)]
27 fn deref(&self) -> &Self::Target {
28 &self.0
29 }
30}
31#[doc = "Field `RXOUTE` reader - Received OUT Data Interrupt"]
32pub struct RXOUTE_R(crate::FieldReader<bool, bool>);
33impl RXOUTE_R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 RXOUTE_R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for RXOUTE_R {
40 type Target = crate::FieldReader<bool, bool>;
41 #[inline(always)]
42 fn deref(&self) -> &Self::Target {
43 &self.0
44 }
45}
46#[doc = "Field `RXSTPE` reader - Received SETUP Interrupt"]
47pub struct RXSTPE_R(crate::FieldReader<bool, bool>);
48impl RXSTPE_R {
49 #[inline(always)]
50 pub(crate) fn new(bits: bool) -> Self {
51 RXSTPE_R(crate::FieldReader::new(bits))
52 }
53}
54impl core::ops::Deref for RXSTPE_R {
55 type Target = crate::FieldReader<bool, bool>;
56 #[inline(always)]
57 fn deref(&self) -> &Self::Target {
58 &self.0
59 }
60}
61#[doc = "Field `NAKOUTE` reader - NAKed OUT Interrupt"]
62pub struct NAKOUTE_R(crate::FieldReader<bool, bool>);
63impl NAKOUTE_R {
64 #[inline(always)]
65 pub(crate) fn new(bits: bool) -> Self {
66 NAKOUTE_R(crate::FieldReader::new(bits))
67 }
68}
69impl core::ops::Deref for NAKOUTE_R {
70 type Target = crate::FieldReader<bool, bool>;
71 #[inline(always)]
72 fn deref(&self) -> &Self::Target {
73 &self.0
74 }
75}
76#[doc = "Field `NAKINE` reader - NAKed IN Interrupt"]
77pub struct NAKINE_R(crate::FieldReader<bool, bool>);
78impl NAKINE_R {
79 #[inline(always)]
80 pub(crate) fn new(bits: bool) -> Self {
81 NAKINE_R(crate::FieldReader::new(bits))
82 }
83}
84impl core::ops::Deref for NAKINE_R {
85 type Target = crate::FieldReader<bool, bool>;
86 #[inline(always)]
87 fn deref(&self) -> &Self::Target {
88 &self.0
89 }
90}
91#[doc = "Field `OVERFE` reader - Overflow Interrupt"]
92pub struct OVERFE_R(crate::FieldReader<bool, bool>);
93impl OVERFE_R {
94 #[inline(always)]
95 pub(crate) fn new(bits: bool) -> Self {
96 OVERFE_R(crate::FieldReader::new(bits))
97 }
98}
99impl core::ops::Deref for OVERFE_R {
100 type Target = crate::FieldReader<bool, bool>;
101 #[inline(always)]
102 fn deref(&self) -> &Self::Target {
103 &self.0
104 }
105}
106#[doc = "Field `STALLEDE` reader - STALLed Interrupt"]
107pub struct STALLEDE_R(crate::FieldReader<bool, bool>);
108impl STALLEDE_R {
109 #[inline(always)]
110 pub(crate) fn new(bits: bool) -> Self {
111 STALLEDE_R(crate::FieldReader::new(bits))
112 }
113}
114impl core::ops::Deref for STALLEDE_R {
115 type Target = crate::FieldReader<bool, bool>;
116 #[inline(always)]
117 fn deref(&self) -> &Self::Target {
118 &self.0
119 }
120}
121#[doc = "Field `SHORTPACKETE` reader - Short Packet Interrupt"]
122pub struct SHORTPACKETE_R(crate::FieldReader<bool, bool>);
123impl SHORTPACKETE_R {
124 #[inline(always)]
125 pub(crate) fn new(bits: bool) -> Self {
126 SHORTPACKETE_R(crate::FieldReader::new(bits))
127 }
128}
129impl core::ops::Deref for SHORTPACKETE_R {
130 type Target = crate::FieldReader<bool, bool>;
131 #[inline(always)]
132 fn deref(&self) -> &Self::Target {
133 &self.0
134 }
135}
136#[doc = "Field `NBUSYBKE` reader - Number of Busy Banks Interrupt"]
137pub struct NBUSYBKE_R(crate::FieldReader<bool, bool>);
138impl NBUSYBKE_R {
139 #[inline(always)]
140 pub(crate) fn new(bits: bool) -> Self {
141 NBUSYBKE_R(crate::FieldReader::new(bits))
142 }
143}
144impl core::ops::Deref for NBUSYBKE_R {
145 type Target = crate::FieldReader<bool, bool>;
146 #[inline(always)]
147 fn deref(&self) -> &Self::Target {
148 &self.0
149 }
150}
151#[doc = "Field `KILLBK` reader - Kill IN Bank"]
152pub struct KILLBK_R(crate::FieldReader<bool, bool>);
153impl KILLBK_R {
154 #[inline(always)]
155 pub(crate) fn new(bits: bool) -> Self {
156 KILLBK_R(crate::FieldReader::new(bits))
157 }
158}
159impl core::ops::Deref for KILLBK_R {
160 type Target = crate::FieldReader<bool, bool>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `FIFOCON` reader - FIFO Control"]
167pub struct FIFOCON_R(crate::FieldReader<bool, bool>);
168impl FIFOCON_R {
169 #[inline(always)]
170 pub(crate) fn new(bits: bool) -> Self {
171 FIFOCON_R(crate::FieldReader::new(bits))
172 }
173}
174impl core::ops::Deref for FIFOCON_R {
175 type Target = crate::FieldReader<bool, bool>;
176 #[inline(always)]
177 fn deref(&self) -> &Self::Target {
178 &self.0
179 }
180}
181#[doc = "Field `EPDISHDMA` reader - Endpoint Interrupts Disable HDMA Request"]
182pub struct EPDISHDMA_R(crate::FieldReader<bool, bool>);
183impl EPDISHDMA_R {
184 #[inline(always)]
185 pub(crate) fn new(bits: bool) -> Self {
186 EPDISHDMA_R(crate::FieldReader::new(bits))
187 }
188}
189impl core::ops::Deref for EPDISHDMA_R {
190 type Target = crate::FieldReader<bool, bool>;
191 #[inline(always)]
192 fn deref(&self) -> &Self::Target {
193 &self.0
194 }
195}
196#[doc = "Field `NYETDIS` reader - NYET Token Disable"]
197pub struct NYETDIS_R(crate::FieldReader<bool, bool>);
198impl NYETDIS_R {
199 #[inline(always)]
200 pub(crate) fn new(bits: bool) -> Self {
201 NYETDIS_R(crate::FieldReader::new(bits))
202 }
203}
204impl core::ops::Deref for NYETDIS_R {
205 type Target = crate::FieldReader<bool, bool>;
206 #[inline(always)]
207 fn deref(&self) -> &Self::Target {
208 &self.0
209 }
210}
211#[doc = "Field `RSTDT` reader - Reset Data Toggle"]
212pub struct RSTDT_R(crate::FieldReader<bool, bool>);
213impl RSTDT_R {
214 #[inline(always)]
215 pub(crate) fn new(bits: bool) -> Self {
216 RSTDT_R(crate::FieldReader::new(bits))
217 }
218}
219impl core::ops::Deref for RSTDT_R {
220 type Target = crate::FieldReader<bool, bool>;
221 #[inline(always)]
222 fn deref(&self) -> &Self::Target {
223 &self.0
224 }
225}
226#[doc = "Field `STALLRQ` reader - STALL Request"]
227pub struct STALLRQ_R(crate::FieldReader<bool, bool>);
228impl STALLRQ_R {
229 #[inline(always)]
230 pub(crate) fn new(bits: bool) -> Self {
231 STALLRQ_R(crate::FieldReader::new(bits))
232 }
233}
234impl core::ops::Deref for STALLRQ_R {
235 type Target = crate::FieldReader<bool, bool>;
236 #[inline(always)]
237 fn deref(&self) -> &Self::Target {
238 &self.0
239 }
240}
241impl R {
242 #[doc = "Bit 0 - Transmitted IN Data Interrupt"]
243 #[inline(always)]
244 pub fn txine(&self) -> TXINE_R {
245 TXINE_R::new((self.bits & 0x01) != 0)
246 }
247 #[doc = "Bit 1 - Received OUT Data Interrupt"]
248 #[inline(always)]
249 pub fn rxoute(&self) -> RXOUTE_R {
250 RXOUTE_R::new(((self.bits >> 1) & 0x01) != 0)
251 }
252 #[doc = "Bit 2 - Received SETUP Interrupt"]
253 #[inline(always)]
254 pub fn rxstpe(&self) -> RXSTPE_R {
255 RXSTPE_R::new(((self.bits >> 2) & 0x01) != 0)
256 }
257 #[doc = "Bit 3 - NAKed OUT Interrupt"]
258 #[inline(always)]
259 pub fn nakoute(&self) -> NAKOUTE_R {
260 NAKOUTE_R::new(((self.bits >> 3) & 0x01) != 0)
261 }
262 #[doc = "Bit 4 - NAKed IN Interrupt"]
263 #[inline(always)]
264 pub fn nakine(&self) -> NAKINE_R {
265 NAKINE_R::new(((self.bits >> 4) & 0x01) != 0)
266 }
267 #[doc = "Bit 5 - Overflow Interrupt"]
268 #[inline(always)]
269 pub fn overfe(&self) -> OVERFE_R {
270 OVERFE_R::new(((self.bits >> 5) & 0x01) != 0)
271 }
272 #[doc = "Bit 6 - STALLed Interrupt"]
273 #[inline(always)]
274 pub fn stallede(&self) -> STALLEDE_R {
275 STALLEDE_R::new(((self.bits >> 6) & 0x01) != 0)
276 }
277 #[doc = "Bit 7 - Short Packet Interrupt"]
278 #[inline(always)]
279 pub fn shortpackete(&self) -> SHORTPACKETE_R {
280 SHORTPACKETE_R::new(((self.bits >> 7) & 0x01) != 0)
281 }
282 #[doc = "Bit 12 - Number of Busy Banks Interrupt"]
283 #[inline(always)]
284 pub fn nbusybke(&self) -> NBUSYBKE_R {
285 NBUSYBKE_R::new(((self.bits >> 12) & 0x01) != 0)
286 }
287 #[doc = "Bit 13 - Kill IN Bank"]
288 #[inline(always)]
289 pub fn killbk(&self) -> KILLBK_R {
290 KILLBK_R::new(((self.bits >> 13) & 0x01) != 0)
291 }
292 #[doc = "Bit 14 - FIFO Control"]
293 #[inline(always)]
294 pub fn fifocon(&self) -> FIFOCON_R {
295 FIFOCON_R::new(((self.bits >> 14) & 0x01) != 0)
296 }
297 #[doc = "Bit 16 - Endpoint Interrupts Disable HDMA Request"]
298 #[inline(always)]
299 pub fn epdishdma(&self) -> EPDISHDMA_R {
300 EPDISHDMA_R::new(((self.bits >> 16) & 0x01) != 0)
301 }
302 #[doc = "Bit 17 - NYET Token Disable"]
303 #[inline(always)]
304 pub fn nyetdis(&self) -> NYETDIS_R {
305 NYETDIS_R::new(((self.bits >> 17) & 0x01) != 0)
306 }
307 #[doc = "Bit 18 - Reset Data Toggle"]
308 #[inline(always)]
309 pub fn rstdt(&self) -> RSTDT_R {
310 RSTDT_R::new(((self.bits >> 18) & 0x01) != 0)
311 }
312 #[doc = "Bit 19 - STALL Request"]
313 #[inline(always)]
314 pub fn stallrq(&self) -> STALLRQ_R {
315 STALLRQ_R::new(((self.bits >> 19) & 0x01) != 0)
316 }
317}
318#[doc = "Device Endpoint Mask Register (n = 0) 0\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 [usbhs_deveptimr](index.html) module"]
319pub struct USBHS_DEVEPTIMR_SPEC;
320impl crate::RegisterSpec for USBHS_DEVEPTIMR_SPEC {
321 type Ux = u32;
322}
323#[doc = "`read()` method returns [usbhs_deveptimr::R](R) reader structure"]
324impl crate::Readable for USBHS_DEVEPTIMR_SPEC {
325 type Reader = R;
326}
327#[doc = "`reset()` method sets USBHS_DEVEPTIMR[%s]
328to value 0"]
329impl crate::Resettable for USBHS_DEVEPTIMR_SPEC {
330 #[inline(always)]
331 fn reset_value() -> Self::Ux {
332 0
333 }
334}