atsams70j21/usbhs/
usbhs_hstpip.rs1#[doc = "Register `USBHS_HSTPIP` reader"]
2pub struct R(crate::R<USBHS_HSTPIP_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<USBHS_HSTPIP_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<USBHS_HSTPIP_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<USBHS_HSTPIP_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `USBHS_HSTPIP` writer"]
17pub struct W(crate::W<USBHS_HSTPIP_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<USBHS_HSTPIP_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<USBHS_HSTPIP_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<USBHS_HSTPIP_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `PEN0` reader - Pipe 0 Enable"]
38pub struct PEN0_R(crate::FieldReader<bool, bool>);
39impl PEN0_R {
40 #[inline(always)]
41 pub(crate) fn new(bits: bool) -> Self {
42 PEN0_R(crate::FieldReader::new(bits))
43 }
44}
45impl core::ops::Deref for PEN0_R {
46 type Target = crate::FieldReader<bool, bool>;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 &self.0
50 }
51}
52#[doc = "Field `PEN0` writer - Pipe 0 Enable"]
53pub struct PEN0_W<'a> {
54 w: &'a mut W,
55}
56impl<'a> PEN0_W<'a> {
57 #[doc = r"Sets the field bit"]
58 #[inline(always)]
59 pub fn set_bit(self) -> &'a mut W {
60 self.bit(true)
61 }
62 #[doc = r"Clears the field bit"]
63 #[inline(always)]
64 pub fn clear_bit(self) -> &'a mut W {
65 self.bit(false)
66 }
67 #[doc = r"Writes raw bits to the field"]
68 #[inline(always)]
69 pub fn bit(self, value: bool) -> &'a mut W {
70 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
71 self.w
72 }
73}
74#[doc = "Field `PEN1` reader - Pipe 1 Enable"]
75pub struct PEN1_R(crate::FieldReader<bool, bool>);
76impl PEN1_R {
77 #[inline(always)]
78 pub(crate) fn new(bits: bool) -> Self {
79 PEN1_R(crate::FieldReader::new(bits))
80 }
81}
82impl core::ops::Deref for PEN1_R {
83 type Target = crate::FieldReader<bool, bool>;
84 #[inline(always)]
85 fn deref(&self) -> &Self::Target {
86 &self.0
87 }
88}
89#[doc = "Field `PEN1` writer - Pipe 1 Enable"]
90pub struct PEN1_W<'a> {
91 w: &'a mut W,
92}
93impl<'a> PEN1_W<'a> {
94 #[doc = r"Sets the field bit"]
95 #[inline(always)]
96 pub fn set_bit(self) -> &'a mut W {
97 self.bit(true)
98 }
99 #[doc = r"Clears the field bit"]
100 #[inline(always)]
101 pub fn clear_bit(self) -> &'a mut W {
102 self.bit(false)
103 }
104 #[doc = r"Writes raw bits to the field"]
105 #[inline(always)]
106 pub fn bit(self, value: bool) -> &'a mut W {
107 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
108 self.w
109 }
110}
111#[doc = "Field `PEN2` reader - Pipe 2 Enable"]
112pub struct PEN2_R(crate::FieldReader<bool, bool>);
113impl PEN2_R {
114 #[inline(always)]
115 pub(crate) fn new(bits: bool) -> Self {
116 PEN2_R(crate::FieldReader::new(bits))
117 }
118}
119impl core::ops::Deref for PEN2_R {
120 type Target = crate::FieldReader<bool, bool>;
121 #[inline(always)]
122 fn deref(&self) -> &Self::Target {
123 &self.0
124 }
125}
126#[doc = "Field `PEN2` writer - Pipe 2 Enable"]
127pub struct PEN2_W<'a> {
128 w: &'a mut W,
129}
130impl<'a> PEN2_W<'a> {
131 #[doc = r"Sets the field bit"]
132 #[inline(always)]
133 pub fn set_bit(self) -> &'a mut W {
134 self.bit(true)
135 }
136 #[doc = r"Clears the field bit"]
137 #[inline(always)]
138 pub fn clear_bit(self) -> &'a mut W {
139 self.bit(false)
140 }
141 #[doc = r"Writes raw bits to the field"]
142 #[inline(always)]
143 pub fn bit(self, value: bool) -> &'a mut W {
144 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
145 self.w
146 }
147}
148#[doc = "Field `PEN3` reader - Pipe 3 Enable"]
149pub struct PEN3_R(crate::FieldReader<bool, bool>);
150impl PEN3_R {
151 #[inline(always)]
152 pub(crate) fn new(bits: bool) -> Self {
153 PEN3_R(crate::FieldReader::new(bits))
154 }
155}
156impl core::ops::Deref for PEN3_R {
157 type Target = crate::FieldReader<bool, bool>;
158 #[inline(always)]
159 fn deref(&self) -> &Self::Target {
160 &self.0
161 }
162}
163#[doc = "Field `PEN3` writer - Pipe 3 Enable"]
164pub struct PEN3_W<'a> {
165 w: &'a mut W,
166}
167impl<'a> PEN3_W<'a> {
168 #[doc = r"Sets the field bit"]
169 #[inline(always)]
170 pub fn set_bit(self) -> &'a mut W {
171 self.bit(true)
172 }
173 #[doc = r"Clears the field bit"]
174 #[inline(always)]
175 pub fn clear_bit(self) -> &'a mut W {
176 self.bit(false)
177 }
178 #[doc = r"Writes raw bits to the field"]
179 #[inline(always)]
180 pub fn bit(self, value: bool) -> &'a mut W {
181 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
182 self.w
183 }
184}
185#[doc = "Field `PEN4` reader - Pipe 4 Enable"]
186pub struct PEN4_R(crate::FieldReader<bool, bool>);
187impl PEN4_R {
188 #[inline(always)]
189 pub(crate) fn new(bits: bool) -> Self {
190 PEN4_R(crate::FieldReader::new(bits))
191 }
192}
193impl core::ops::Deref for PEN4_R {
194 type Target = crate::FieldReader<bool, bool>;
195 #[inline(always)]
196 fn deref(&self) -> &Self::Target {
197 &self.0
198 }
199}
200#[doc = "Field `PEN4` writer - Pipe 4 Enable"]
201pub struct PEN4_W<'a> {
202 w: &'a mut W,
203}
204impl<'a> PEN4_W<'a> {
205 #[doc = r"Sets the field bit"]
206 #[inline(always)]
207 pub fn set_bit(self) -> &'a mut W {
208 self.bit(true)
209 }
210 #[doc = r"Clears the field bit"]
211 #[inline(always)]
212 pub fn clear_bit(self) -> &'a mut W {
213 self.bit(false)
214 }
215 #[doc = r"Writes raw bits to the field"]
216 #[inline(always)]
217 pub fn bit(self, value: bool) -> &'a mut W {
218 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
219 self.w
220 }
221}
222#[doc = "Field `PEN5` reader - Pipe 5 Enable"]
223pub struct PEN5_R(crate::FieldReader<bool, bool>);
224impl PEN5_R {
225 #[inline(always)]
226 pub(crate) fn new(bits: bool) -> Self {
227 PEN5_R(crate::FieldReader::new(bits))
228 }
229}
230impl core::ops::Deref for PEN5_R {
231 type Target = crate::FieldReader<bool, bool>;
232 #[inline(always)]
233 fn deref(&self) -> &Self::Target {
234 &self.0
235 }
236}
237#[doc = "Field `PEN5` writer - Pipe 5 Enable"]
238pub struct PEN5_W<'a> {
239 w: &'a mut W,
240}
241impl<'a> PEN5_W<'a> {
242 #[doc = r"Sets the field bit"]
243 #[inline(always)]
244 pub fn set_bit(self) -> &'a mut W {
245 self.bit(true)
246 }
247 #[doc = r"Clears the field bit"]
248 #[inline(always)]
249 pub fn clear_bit(self) -> &'a mut W {
250 self.bit(false)
251 }
252 #[doc = r"Writes raw bits to the field"]
253 #[inline(always)]
254 pub fn bit(self, value: bool) -> &'a mut W {
255 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
256 self.w
257 }
258}
259#[doc = "Field `PEN6` reader - Pipe 6 Enable"]
260pub struct PEN6_R(crate::FieldReader<bool, bool>);
261impl PEN6_R {
262 #[inline(always)]
263 pub(crate) fn new(bits: bool) -> Self {
264 PEN6_R(crate::FieldReader::new(bits))
265 }
266}
267impl core::ops::Deref for PEN6_R {
268 type Target = crate::FieldReader<bool, bool>;
269 #[inline(always)]
270 fn deref(&self) -> &Self::Target {
271 &self.0
272 }
273}
274#[doc = "Field `PEN6` writer - Pipe 6 Enable"]
275pub struct PEN6_W<'a> {
276 w: &'a mut W,
277}
278impl<'a> PEN6_W<'a> {
279 #[doc = r"Sets the field bit"]
280 #[inline(always)]
281 pub fn set_bit(self) -> &'a mut W {
282 self.bit(true)
283 }
284 #[doc = r"Clears the field bit"]
285 #[inline(always)]
286 pub fn clear_bit(self) -> &'a mut W {
287 self.bit(false)
288 }
289 #[doc = r"Writes raw bits to the field"]
290 #[inline(always)]
291 pub fn bit(self, value: bool) -> &'a mut W {
292 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
293 self.w
294 }
295}
296#[doc = "Field `PEN7` reader - Pipe 7 Enable"]
297pub struct PEN7_R(crate::FieldReader<bool, bool>);
298impl PEN7_R {
299 #[inline(always)]
300 pub(crate) fn new(bits: bool) -> Self {
301 PEN7_R(crate::FieldReader::new(bits))
302 }
303}
304impl core::ops::Deref for PEN7_R {
305 type Target = crate::FieldReader<bool, bool>;
306 #[inline(always)]
307 fn deref(&self) -> &Self::Target {
308 &self.0
309 }
310}
311#[doc = "Field `PEN7` writer - Pipe 7 Enable"]
312pub struct PEN7_W<'a> {
313 w: &'a mut W,
314}
315impl<'a> PEN7_W<'a> {
316 #[doc = r"Sets the field bit"]
317 #[inline(always)]
318 pub fn set_bit(self) -> &'a mut W {
319 self.bit(true)
320 }
321 #[doc = r"Clears the field bit"]
322 #[inline(always)]
323 pub fn clear_bit(self) -> &'a mut W {
324 self.bit(false)
325 }
326 #[doc = r"Writes raw bits to the field"]
327 #[inline(always)]
328 pub fn bit(self, value: bool) -> &'a mut W {
329 self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
330 self.w
331 }
332}
333#[doc = "Field `PEN8` reader - Pipe 8 Enable"]
334pub struct PEN8_R(crate::FieldReader<bool, bool>);
335impl PEN8_R {
336 #[inline(always)]
337 pub(crate) fn new(bits: bool) -> Self {
338 PEN8_R(crate::FieldReader::new(bits))
339 }
340}
341impl core::ops::Deref for PEN8_R {
342 type Target = crate::FieldReader<bool, bool>;
343 #[inline(always)]
344 fn deref(&self) -> &Self::Target {
345 &self.0
346 }
347}
348#[doc = "Field `PEN8` writer - Pipe 8 Enable"]
349pub struct PEN8_W<'a> {
350 w: &'a mut W,
351}
352impl<'a> PEN8_W<'a> {
353 #[doc = r"Sets the field bit"]
354 #[inline(always)]
355 pub fn set_bit(self) -> &'a mut W {
356 self.bit(true)
357 }
358 #[doc = r"Clears the field bit"]
359 #[inline(always)]
360 pub fn clear_bit(self) -> &'a mut W {
361 self.bit(false)
362 }
363 #[doc = r"Writes raw bits to the field"]
364 #[inline(always)]
365 pub fn bit(self, value: bool) -> &'a mut W {
366 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
367 self.w
368 }
369}
370#[doc = "Field `PRST0` reader - Pipe 0 Reset"]
371pub struct PRST0_R(crate::FieldReader<bool, bool>);
372impl PRST0_R {
373 #[inline(always)]
374 pub(crate) fn new(bits: bool) -> Self {
375 PRST0_R(crate::FieldReader::new(bits))
376 }
377}
378impl core::ops::Deref for PRST0_R {
379 type Target = crate::FieldReader<bool, bool>;
380 #[inline(always)]
381 fn deref(&self) -> &Self::Target {
382 &self.0
383 }
384}
385#[doc = "Field `PRST0` writer - Pipe 0 Reset"]
386pub struct PRST0_W<'a> {
387 w: &'a mut W,
388}
389impl<'a> PRST0_W<'a> {
390 #[doc = r"Sets the field bit"]
391 #[inline(always)]
392 pub fn set_bit(self) -> &'a mut W {
393 self.bit(true)
394 }
395 #[doc = r"Clears the field bit"]
396 #[inline(always)]
397 pub fn clear_bit(self) -> &'a mut W {
398 self.bit(false)
399 }
400 #[doc = r"Writes raw bits to the field"]
401 #[inline(always)]
402 pub fn bit(self, value: bool) -> &'a mut W {
403 self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
404 self.w
405 }
406}
407#[doc = "Field `PRST1` reader - Pipe 1 Reset"]
408pub struct PRST1_R(crate::FieldReader<bool, bool>);
409impl PRST1_R {
410 #[inline(always)]
411 pub(crate) fn new(bits: bool) -> Self {
412 PRST1_R(crate::FieldReader::new(bits))
413 }
414}
415impl core::ops::Deref for PRST1_R {
416 type Target = crate::FieldReader<bool, bool>;
417 #[inline(always)]
418 fn deref(&self) -> &Self::Target {
419 &self.0
420 }
421}
422#[doc = "Field `PRST1` writer - Pipe 1 Reset"]
423pub struct PRST1_W<'a> {
424 w: &'a mut W,
425}
426impl<'a> PRST1_W<'a> {
427 #[doc = r"Sets the field bit"]
428 #[inline(always)]
429 pub fn set_bit(self) -> &'a mut W {
430 self.bit(true)
431 }
432 #[doc = r"Clears the field bit"]
433 #[inline(always)]
434 pub fn clear_bit(self) -> &'a mut W {
435 self.bit(false)
436 }
437 #[doc = r"Writes raw bits to the field"]
438 #[inline(always)]
439 pub fn bit(self, value: bool) -> &'a mut W {
440 self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
441 self.w
442 }
443}
444#[doc = "Field `PRST2` reader - Pipe 2 Reset"]
445pub struct PRST2_R(crate::FieldReader<bool, bool>);
446impl PRST2_R {
447 #[inline(always)]
448 pub(crate) fn new(bits: bool) -> Self {
449 PRST2_R(crate::FieldReader::new(bits))
450 }
451}
452impl core::ops::Deref for PRST2_R {
453 type Target = crate::FieldReader<bool, bool>;
454 #[inline(always)]
455 fn deref(&self) -> &Self::Target {
456 &self.0
457 }
458}
459#[doc = "Field `PRST2` writer - Pipe 2 Reset"]
460pub struct PRST2_W<'a> {
461 w: &'a mut W,
462}
463impl<'a> PRST2_W<'a> {
464 #[doc = r"Sets the field bit"]
465 #[inline(always)]
466 pub fn set_bit(self) -> &'a mut W {
467 self.bit(true)
468 }
469 #[doc = r"Clears the field bit"]
470 #[inline(always)]
471 pub fn clear_bit(self) -> &'a mut W {
472 self.bit(false)
473 }
474 #[doc = r"Writes raw bits to the field"]
475 #[inline(always)]
476 pub fn bit(self, value: bool) -> &'a mut W {
477 self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
478 self.w
479 }
480}
481#[doc = "Field `PRST3` reader - Pipe 3 Reset"]
482pub struct PRST3_R(crate::FieldReader<bool, bool>);
483impl PRST3_R {
484 #[inline(always)]
485 pub(crate) fn new(bits: bool) -> Self {
486 PRST3_R(crate::FieldReader::new(bits))
487 }
488}
489impl core::ops::Deref for PRST3_R {
490 type Target = crate::FieldReader<bool, bool>;
491 #[inline(always)]
492 fn deref(&self) -> &Self::Target {
493 &self.0
494 }
495}
496#[doc = "Field `PRST3` writer - Pipe 3 Reset"]
497pub struct PRST3_W<'a> {
498 w: &'a mut W,
499}
500impl<'a> PRST3_W<'a> {
501 #[doc = r"Sets the field bit"]
502 #[inline(always)]
503 pub fn set_bit(self) -> &'a mut W {
504 self.bit(true)
505 }
506 #[doc = r"Clears the field bit"]
507 #[inline(always)]
508 pub fn clear_bit(self) -> &'a mut W {
509 self.bit(false)
510 }
511 #[doc = r"Writes raw bits to the field"]
512 #[inline(always)]
513 pub fn bit(self, value: bool) -> &'a mut W {
514 self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
515 self.w
516 }
517}
518#[doc = "Field `PRST4` reader - Pipe 4 Reset"]
519pub struct PRST4_R(crate::FieldReader<bool, bool>);
520impl PRST4_R {
521 #[inline(always)]
522 pub(crate) fn new(bits: bool) -> Self {
523 PRST4_R(crate::FieldReader::new(bits))
524 }
525}
526impl core::ops::Deref for PRST4_R {
527 type Target = crate::FieldReader<bool, bool>;
528 #[inline(always)]
529 fn deref(&self) -> &Self::Target {
530 &self.0
531 }
532}
533#[doc = "Field `PRST4` writer - Pipe 4 Reset"]
534pub struct PRST4_W<'a> {
535 w: &'a mut W,
536}
537impl<'a> PRST4_W<'a> {
538 #[doc = r"Sets the field bit"]
539 #[inline(always)]
540 pub fn set_bit(self) -> &'a mut W {
541 self.bit(true)
542 }
543 #[doc = r"Clears the field bit"]
544 #[inline(always)]
545 pub fn clear_bit(self) -> &'a mut W {
546 self.bit(false)
547 }
548 #[doc = r"Writes raw bits to the field"]
549 #[inline(always)]
550 pub fn bit(self, value: bool) -> &'a mut W {
551 self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20);
552 self.w
553 }
554}
555#[doc = "Field `PRST5` reader - Pipe 5 Reset"]
556pub struct PRST5_R(crate::FieldReader<bool, bool>);
557impl PRST5_R {
558 #[inline(always)]
559 pub(crate) fn new(bits: bool) -> Self {
560 PRST5_R(crate::FieldReader::new(bits))
561 }
562}
563impl core::ops::Deref for PRST5_R {
564 type Target = crate::FieldReader<bool, bool>;
565 #[inline(always)]
566 fn deref(&self) -> &Self::Target {
567 &self.0
568 }
569}
570#[doc = "Field `PRST5` writer - Pipe 5 Reset"]
571pub struct PRST5_W<'a> {
572 w: &'a mut W,
573}
574impl<'a> PRST5_W<'a> {
575 #[doc = r"Sets the field bit"]
576 #[inline(always)]
577 pub fn set_bit(self) -> &'a mut W {
578 self.bit(true)
579 }
580 #[doc = r"Clears the field bit"]
581 #[inline(always)]
582 pub fn clear_bit(self) -> &'a mut W {
583 self.bit(false)
584 }
585 #[doc = r"Writes raw bits to the field"]
586 #[inline(always)]
587 pub fn bit(self, value: bool) -> &'a mut W {
588 self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21);
589 self.w
590 }
591}
592#[doc = "Field `PRST6` reader - Pipe 6 Reset"]
593pub struct PRST6_R(crate::FieldReader<bool, bool>);
594impl PRST6_R {
595 #[inline(always)]
596 pub(crate) fn new(bits: bool) -> Self {
597 PRST6_R(crate::FieldReader::new(bits))
598 }
599}
600impl core::ops::Deref for PRST6_R {
601 type Target = crate::FieldReader<bool, bool>;
602 #[inline(always)]
603 fn deref(&self) -> &Self::Target {
604 &self.0
605 }
606}
607#[doc = "Field `PRST6` writer - Pipe 6 Reset"]
608pub struct PRST6_W<'a> {
609 w: &'a mut W,
610}
611impl<'a> PRST6_W<'a> {
612 #[doc = r"Sets the field bit"]
613 #[inline(always)]
614 pub fn set_bit(self) -> &'a mut W {
615 self.bit(true)
616 }
617 #[doc = r"Clears the field bit"]
618 #[inline(always)]
619 pub fn clear_bit(self) -> &'a mut W {
620 self.bit(false)
621 }
622 #[doc = r"Writes raw bits to the field"]
623 #[inline(always)]
624 pub fn bit(self, value: bool) -> &'a mut W {
625 self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22);
626 self.w
627 }
628}
629#[doc = "Field `PRST7` reader - Pipe 7 Reset"]
630pub struct PRST7_R(crate::FieldReader<bool, bool>);
631impl PRST7_R {
632 #[inline(always)]
633 pub(crate) fn new(bits: bool) -> Self {
634 PRST7_R(crate::FieldReader::new(bits))
635 }
636}
637impl core::ops::Deref for PRST7_R {
638 type Target = crate::FieldReader<bool, bool>;
639 #[inline(always)]
640 fn deref(&self) -> &Self::Target {
641 &self.0
642 }
643}
644#[doc = "Field `PRST7` writer - Pipe 7 Reset"]
645pub struct PRST7_W<'a> {
646 w: &'a mut W,
647}
648impl<'a> PRST7_W<'a> {
649 #[doc = r"Sets the field bit"]
650 #[inline(always)]
651 pub fn set_bit(self) -> &'a mut W {
652 self.bit(true)
653 }
654 #[doc = r"Clears the field bit"]
655 #[inline(always)]
656 pub fn clear_bit(self) -> &'a mut W {
657 self.bit(false)
658 }
659 #[doc = r"Writes raw bits to the field"]
660 #[inline(always)]
661 pub fn bit(self, value: bool) -> &'a mut W {
662 self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
663 self.w
664 }
665}
666#[doc = "Field `PRST8` reader - Pipe 8 Reset"]
667pub struct PRST8_R(crate::FieldReader<bool, bool>);
668impl PRST8_R {
669 #[inline(always)]
670 pub(crate) fn new(bits: bool) -> Self {
671 PRST8_R(crate::FieldReader::new(bits))
672 }
673}
674impl core::ops::Deref for PRST8_R {
675 type Target = crate::FieldReader<bool, bool>;
676 #[inline(always)]
677 fn deref(&self) -> &Self::Target {
678 &self.0
679 }
680}
681#[doc = "Field `PRST8` writer - Pipe 8 Reset"]
682pub struct PRST8_W<'a> {
683 w: &'a mut W,
684}
685impl<'a> PRST8_W<'a> {
686 #[doc = r"Sets the field bit"]
687 #[inline(always)]
688 pub fn set_bit(self) -> &'a mut W {
689 self.bit(true)
690 }
691 #[doc = r"Clears the field bit"]
692 #[inline(always)]
693 pub fn clear_bit(self) -> &'a mut W {
694 self.bit(false)
695 }
696 #[doc = r"Writes raw bits to the field"]
697 #[inline(always)]
698 pub fn bit(self, value: bool) -> &'a mut W {
699 self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
700 self.w
701 }
702}
703impl R {
704 #[doc = "Bit 0 - Pipe 0 Enable"]
705 #[inline(always)]
706 pub fn pen0(&self) -> PEN0_R {
707 PEN0_R::new((self.bits & 0x01) != 0)
708 }
709 #[doc = "Bit 1 - Pipe 1 Enable"]
710 #[inline(always)]
711 pub fn pen1(&self) -> PEN1_R {
712 PEN1_R::new(((self.bits >> 1) & 0x01) != 0)
713 }
714 #[doc = "Bit 2 - Pipe 2 Enable"]
715 #[inline(always)]
716 pub fn pen2(&self) -> PEN2_R {
717 PEN2_R::new(((self.bits >> 2) & 0x01) != 0)
718 }
719 #[doc = "Bit 3 - Pipe 3 Enable"]
720 #[inline(always)]
721 pub fn pen3(&self) -> PEN3_R {
722 PEN3_R::new(((self.bits >> 3) & 0x01) != 0)
723 }
724 #[doc = "Bit 4 - Pipe 4 Enable"]
725 #[inline(always)]
726 pub fn pen4(&self) -> PEN4_R {
727 PEN4_R::new(((self.bits >> 4) & 0x01) != 0)
728 }
729 #[doc = "Bit 5 - Pipe 5 Enable"]
730 #[inline(always)]
731 pub fn pen5(&self) -> PEN5_R {
732 PEN5_R::new(((self.bits >> 5) & 0x01) != 0)
733 }
734 #[doc = "Bit 6 - Pipe 6 Enable"]
735 #[inline(always)]
736 pub fn pen6(&self) -> PEN6_R {
737 PEN6_R::new(((self.bits >> 6) & 0x01) != 0)
738 }
739 #[doc = "Bit 7 - Pipe 7 Enable"]
740 #[inline(always)]
741 pub fn pen7(&self) -> PEN7_R {
742 PEN7_R::new(((self.bits >> 7) & 0x01) != 0)
743 }
744 #[doc = "Bit 8 - Pipe 8 Enable"]
745 #[inline(always)]
746 pub fn pen8(&self) -> PEN8_R {
747 PEN8_R::new(((self.bits >> 8) & 0x01) != 0)
748 }
749 #[doc = "Bit 16 - Pipe 0 Reset"]
750 #[inline(always)]
751 pub fn prst0(&self) -> PRST0_R {
752 PRST0_R::new(((self.bits >> 16) & 0x01) != 0)
753 }
754 #[doc = "Bit 17 - Pipe 1 Reset"]
755 #[inline(always)]
756 pub fn prst1(&self) -> PRST1_R {
757 PRST1_R::new(((self.bits >> 17) & 0x01) != 0)
758 }
759 #[doc = "Bit 18 - Pipe 2 Reset"]
760 #[inline(always)]
761 pub fn prst2(&self) -> PRST2_R {
762 PRST2_R::new(((self.bits >> 18) & 0x01) != 0)
763 }
764 #[doc = "Bit 19 - Pipe 3 Reset"]
765 #[inline(always)]
766 pub fn prst3(&self) -> PRST3_R {
767 PRST3_R::new(((self.bits >> 19) & 0x01) != 0)
768 }
769 #[doc = "Bit 20 - Pipe 4 Reset"]
770 #[inline(always)]
771 pub fn prst4(&self) -> PRST4_R {
772 PRST4_R::new(((self.bits >> 20) & 0x01) != 0)
773 }
774 #[doc = "Bit 21 - Pipe 5 Reset"]
775 #[inline(always)]
776 pub fn prst5(&self) -> PRST5_R {
777 PRST5_R::new(((self.bits >> 21) & 0x01) != 0)
778 }
779 #[doc = "Bit 22 - Pipe 6 Reset"]
780 #[inline(always)]
781 pub fn prst6(&self) -> PRST6_R {
782 PRST6_R::new(((self.bits >> 22) & 0x01) != 0)
783 }
784 #[doc = "Bit 23 - Pipe 7 Reset"]
785 #[inline(always)]
786 pub fn prst7(&self) -> PRST7_R {
787 PRST7_R::new(((self.bits >> 23) & 0x01) != 0)
788 }
789 #[doc = "Bit 24 - Pipe 8 Reset"]
790 #[inline(always)]
791 pub fn prst8(&self) -> PRST8_R {
792 PRST8_R::new(((self.bits >> 24) & 0x01) != 0)
793 }
794}
795impl W {
796 #[doc = "Bit 0 - Pipe 0 Enable"]
797 #[inline(always)]
798 pub fn pen0(&mut self) -> PEN0_W {
799 PEN0_W { w: self }
800 }
801 #[doc = "Bit 1 - Pipe 1 Enable"]
802 #[inline(always)]
803 pub fn pen1(&mut self) -> PEN1_W {
804 PEN1_W { w: self }
805 }
806 #[doc = "Bit 2 - Pipe 2 Enable"]
807 #[inline(always)]
808 pub fn pen2(&mut self) -> PEN2_W {
809 PEN2_W { w: self }
810 }
811 #[doc = "Bit 3 - Pipe 3 Enable"]
812 #[inline(always)]
813 pub fn pen3(&mut self) -> PEN3_W {
814 PEN3_W { w: self }
815 }
816 #[doc = "Bit 4 - Pipe 4 Enable"]
817 #[inline(always)]
818 pub fn pen4(&mut self) -> PEN4_W {
819 PEN4_W { w: self }
820 }
821 #[doc = "Bit 5 - Pipe 5 Enable"]
822 #[inline(always)]
823 pub fn pen5(&mut self) -> PEN5_W {
824 PEN5_W { w: self }
825 }
826 #[doc = "Bit 6 - Pipe 6 Enable"]
827 #[inline(always)]
828 pub fn pen6(&mut self) -> PEN6_W {
829 PEN6_W { w: self }
830 }
831 #[doc = "Bit 7 - Pipe 7 Enable"]
832 #[inline(always)]
833 pub fn pen7(&mut self) -> PEN7_W {
834 PEN7_W { w: self }
835 }
836 #[doc = "Bit 8 - Pipe 8 Enable"]
837 #[inline(always)]
838 pub fn pen8(&mut self) -> PEN8_W {
839 PEN8_W { w: self }
840 }
841 #[doc = "Bit 16 - Pipe 0 Reset"]
842 #[inline(always)]
843 pub fn prst0(&mut self) -> PRST0_W {
844 PRST0_W { w: self }
845 }
846 #[doc = "Bit 17 - Pipe 1 Reset"]
847 #[inline(always)]
848 pub fn prst1(&mut self) -> PRST1_W {
849 PRST1_W { w: self }
850 }
851 #[doc = "Bit 18 - Pipe 2 Reset"]
852 #[inline(always)]
853 pub fn prst2(&mut self) -> PRST2_W {
854 PRST2_W { w: self }
855 }
856 #[doc = "Bit 19 - Pipe 3 Reset"]
857 #[inline(always)]
858 pub fn prst3(&mut self) -> PRST3_W {
859 PRST3_W { w: self }
860 }
861 #[doc = "Bit 20 - Pipe 4 Reset"]
862 #[inline(always)]
863 pub fn prst4(&mut self) -> PRST4_W {
864 PRST4_W { w: self }
865 }
866 #[doc = "Bit 21 - Pipe 5 Reset"]
867 #[inline(always)]
868 pub fn prst5(&mut self) -> PRST5_W {
869 PRST5_W { w: self }
870 }
871 #[doc = "Bit 22 - Pipe 6 Reset"]
872 #[inline(always)]
873 pub fn prst6(&mut self) -> PRST6_W {
874 PRST6_W { w: self }
875 }
876 #[doc = "Bit 23 - Pipe 7 Reset"]
877 #[inline(always)]
878 pub fn prst7(&mut self) -> PRST7_W {
879 PRST7_W { w: self }
880 }
881 #[doc = "Bit 24 - Pipe 8 Reset"]
882 #[inline(always)]
883 pub fn prst8(&mut self) -> PRST8_W {
884 PRST8_W { w: self }
885 }
886 #[doc = "Writes raw bits to the register."]
887 #[inline(always)]
888 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
889 self.0.bits(bits);
890 self
891 }
892}
893#[doc = "Host Pipe 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 [usbhs_hstpip](index.html) module"]
894pub struct USBHS_HSTPIP_SPEC;
895impl crate::RegisterSpec for USBHS_HSTPIP_SPEC {
896 type Ux = u32;
897}
898#[doc = "`read()` method returns [usbhs_hstpip::R](R) reader structure"]
899impl crate::Readable for USBHS_HSTPIP_SPEC {
900 type Reader = R;
901}
902#[doc = "`write(|w| ..)` method takes [usbhs_hstpip::W](W) writer structure"]
903impl crate::Writable for USBHS_HSTPIP_SPEC {
904 type Writer = W;
905}
906#[doc = "`reset()` method sets USBHS_HSTPIP to value 0"]
907impl crate::Resettable for USBHS_HSTPIP_SPEC {
908 #[inline(always)]
909 fn reset_value() -> Self::Ux {
910 0
911 }
912}