1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7 bits: u32,
8}
9impl super::EPR {
10 #[doc = r" Modifies the contents of the register"]
11 #[inline]
12 pub fn modify<F>(&self, f: F)
13 where
14 for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15 {
16 let bits = self.register.get();
17 let r = R { bits: bits };
18 let mut w = W { bits: bits };
19 f(&r, &mut w);
20 self.register.set(w.bits);
21 }
22 #[doc = r" Reads the contents of the register"]
23 #[inline]
24 pub fn read(&self) -> R {
25 R {
26 bits: self.register.get(),
27 }
28 }
29 #[doc = r" Writes to the register"]
30 #[inline]
31 pub fn write<F>(&self, f: F)
32 where
33 F: FnOnce(&mut W) -> &mut W,
34 {
35 let mut w = W::reset_value();
36 f(&mut w);
37 self.register.set(w.bits);
38 }
39 #[doc = r" Writes the reset value to the register"]
40 #[inline]
41 pub fn reset(&self) {
42 self.write(|w| w)
43 }
44}
45#[doc = r" Value of the field"]
46pub struct EAR {
47 bits: u8,
48}
49impl EAR {
50 #[doc = r" Value of the field as raw bits"]
51 #[inline]
52 pub fn bits(&self) -> u8 {
53 self.bits
54 }
55}
56#[doc = "Possible values of the field `STAT_TX`"]
57#[derive(Clone, Copy, Debug, PartialEq)]
58pub enum STAT_TXR {
59 #[doc = "all transmission requests addressed to this endpoint are ignored"]
60 DISABLED,
61 #[doc = "the endpoint is stalled and all transmission requests result in a STALL handshake"]
62 STALL,
63 #[doc = "the endpoint is naked and all transmission requests result in a NAK handshake"]
64 NAK,
65 #[doc = "this endpoint is enabled for transmission"]
66 VALID,
67}
68impl STAT_TXR {
69 #[doc = r" Value of the field as raw bits"]
70 #[inline]
71 pub fn bits(&self) -> u8 {
72 match *self {
73 STAT_TXR::DISABLED => 0,
74 STAT_TXR::STALL => 1,
75 STAT_TXR::NAK => 2,
76 STAT_TXR::VALID => 3,
77 }
78 }
79 #[allow(missing_docs)]
80 #[doc(hidden)]
81 #[inline]
82 pub fn _from(value: u8) -> STAT_TXR {
83 match value {
84 0 => STAT_TXR::DISABLED,
85 1 => STAT_TXR::STALL,
86 2 => STAT_TXR::NAK,
87 3 => STAT_TXR::VALID,
88 _ => unreachable!(),
89 }
90 }
91 #[doc = "Checks if the value of the field is `DISABLED`"]
92 #[inline]
93 pub fn is_disabled(&self) -> bool {
94 *self == STAT_TXR::DISABLED
95 }
96 #[doc = "Checks if the value of the field is `STALL`"]
97 #[inline]
98 pub fn is_stall(&self) -> bool {
99 *self == STAT_TXR::STALL
100 }
101 #[doc = "Checks if the value of the field is `NAK`"]
102 #[inline]
103 pub fn is_nak(&self) -> bool {
104 *self == STAT_TXR::NAK
105 }
106 #[doc = "Checks if the value of the field is `VALID`"]
107 #[inline]
108 pub fn is_valid(&self) -> bool {
109 *self == STAT_TXR::VALID
110 }
111}
112#[doc = r" Value of the field"]
113pub struct DTOG_TXR {
114 bits: bool,
115}
116impl DTOG_TXR {
117 #[doc = r" Value of the field as raw bits"]
118 #[inline]
119 pub fn bit(&self) -> bool {
120 self.bits
121 }
122 #[doc = r" Returns `true` if the bit is clear (0)"]
123 #[inline]
124 pub fn bit_is_clear(&self) -> bool {
125 !self.bit()
126 }
127 #[doc = r" Returns `true` if the bit is set (1)"]
128 #[inline]
129 pub fn bit_is_set(&self) -> bool {
130 self.bit()
131 }
132}
133#[doc = r" Value of the field"]
134pub struct CTR_TXR {
135 bits: bool,
136}
137impl CTR_TXR {
138 #[doc = r" Value of the field as raw bits"]
139 #[inline]
140 pub fn bit(&self) -> bool {
141 self.bits
142 }
143 #[doc = r" Returns `true` if the bit is clear (0)"]
144 #[inline]
145 pub fn bit_is_clear(&self) -> bool {
146 !self.bit()
147 }
148 #[doc = r" Returns `true` if the bit is set (1)"]
149 #[inline]
150 pub fn bit_is_set(&self) -> bool {
151 self.bit()
152 }
153}
154#[doc = r" Value of the field"]
155pub struct EP_KINDR {
156 bits: bool,
157}
158impl EP_KINDR {
159 #[doc = r" Value of the field as raw bits"]
160 #[inline]
161 pub fn bit(&self) -> bool {
162 self.bits
163 }
164 #[doc = r" Returns `true` if the bit is clear (0)"]
165 #[inline]
166 pub fn bit_is_clear(&self) -> bool {
167 !self.bit()
168 }
169 #[doc = r" Returns `true` if the bit is set (1)"]
170 #[inline]
171 pub fn bit_is_set(&self) -> bool {
172 self.bit()
173 }
174}
175#[doc = "Possible values of the field `EP_TYPE`"]
176#[derive(Clone, Copy, Debug, PartialEq)]
177pub enum EP_TYPER {
178 #[doc = "Bulk endpoint"]
179 BULK,
180 #[doc = "Control endpoint"]
181 CONTROL,
182 #[doc = "Iso endpoint"]
183 ISO,
184 #[doc = "Interrupt endpoint"]
185 INTERRUPT,
186}
187impl EP_TYPER {
188 #[doc = r" Value of the field as raw bits"]
189 #[inline]
190 pub fn bits(&self) -> u8 {
191 match *self {
192 EP_TYPER::BULK => 0,
193 EP_TYPER::CONTROL => 1,
194 EP_TYPER::ISO => 2,
195 EP_TYPER::INTERRUPT => 3,
196 }
197 }
198 #[allow(missing_docs)]
199 #[doc(hidden)]
200 #[inline]
201 pub fn _from(value: u8) -> EP_TYPER {
202 match value {
203 0 => EP_TYPER::BULK,
204 1 => EP_TYPER::CONTROL,
205 2 => EP_TYPER::ISO,
206 3 => EP_TYPER::INTERRUPT,
207 _ => unreachable!(),
208 }
209 }
210 #[doc = "Checks if the value of the field is `BULK`"]
211 #[inline]
212 pub fn is_bulk(&self) -> bool {
213 *self == EP_TYPER::BULK
214 }
215 #[doc = "Checks if the value of the field is `CONTROL`"]
216 #[inline]
217 pub fn is_control(&self) -> bool {
218 *self == EP_TYPER::CONTROL
219 }
220 #[doc = "Checks if the value of the field is `ISO`"]
221 #[inline]
222 pub fn is_iso(&self) -> bool {
223 *self == EP_TYPER::ISO
224 }
225 #[doc = "Checks if the value of the field is `INTERRUPT`"]
226 #[inline]
227 pub fn is_interrupt(&self) -> bool {
228 *self == EP_TYPER::INTERRUPT
229 }
230}
231#[doc = r" Value of the field"]
232pub struct SETUPR {
233 bits: bool,
234}
235impl SETUPR {
236 #[doc = r" Value of the field as raw bits"]
237 #[inline]
238 pub fn bit(&self) -> bool {
239 self.bits
240 }
241 #[doc = r" Returns `true` if the bit is clear (0)"]
242 #[inline]
243 pub fn bit_is_clear(&self) -> bool {
244 !self.bit()
245 }
246 #[doc = r" Returns `true` if the bit is set (1)"]
247 #[inline]
248 pub fn bit_is_set(&self) -> bool {
249 self.bit()
250 }
251}
252#[doc = "Possible values of the field `STAT_RX`"]
253#[derive(Clone, Copy, Debug, PartialEq)]
254pub enum STAT_RXR {
255 #[doc = "all reception requests addressed to this endpoint are ignored"]
256 DISABLED,
257 #[doc = "the endpoint is stalled and all reception requests result in a STALL handshake"]
258 STALL,
259 #[doc = "the endpoint is naked and all reception requests result in a NAK handshake"]
260 NAK,
261 #[doc = "this endpoint is enabled for reception"]
262 VALID,
263}
264impl STAT_RXR {
265 #[doc = r" Value of the field as raw bits"]
266 #[inline]
267 pub fn bits(&self) -> u8 {
268 match *self {
269 STAT_RXR::DISABLED => 0,
270 STAT_RXR::STALL => 1,
271 STAT_RXR::NAK => 2,
272 STAT_RXR::VALID => 3,
273 }
274 }
275 #[allow(missing_docs)]
276 #[doc(hidden)]
277 #[inline]
278 pub fn _from(value: u8) -> STAT_RXR {
279 match value {
280 0 => STAT_RXR::DISABLED,
281 1 => STAT_RXR::STALL,
282 2 => STAT_RXR::NAK,
283 3 => STAT_RXR::VALID,
284 _ => unreachable!(),
285 }
286 }
287 #[doc = "Checks if the value of the field is `DISABLED`"]
288 #[inline]
289 pub fn is_disabled(&self) -> bool {
290 *self == STAT_RXR::DISABLED
291 }
292 #[doc = "Checks if the value of the field is `STALL`"]
293 #[inline]
294 pub fn is_stall(&self) -> bool {
295 *self == STAT_RXR::STALL
296 }
297 #[doc = "Checks if the value of the field is `NAK`"]
298 #[inline]
299 pub fn is_nak(&self) -> bool {
300 *self == STAT_RXR::NAK
301 }
302 #[doc = "Checks if the value of the field is `VALID`"]
303 #[inline]
304 pub fn is_valid(&self) -> bool {
305 *self == STAT_RXR::VALID
306 }
307}
308#[doc = r" Value of the field"]
309pub struct DTOG_RXR {
310 bits: bool,
311}
312impl DTOG_RXR {
313 #[doc = r" Value of the field as raw bits"]
314 #[inline]
315 pub fn bit(&self) -> bool {
316 self.bits
317 }
318 #[doc = r" Returns `true` if the bit is clear (0)"]
319 #[inline]
320 pub fn bit_is_clear(&self) -> bool {
321 !self.bit()
322 }
323 #[doc = r" Returns `true` if the bit is set (1)"]
324 #[inline]
325 pub fn bit_is_set(&self) -> bool {
326 self.bit()
327 }
328}
329#[doc = r" Value of the field"]
330pub struct CTR_RXR {
331 bits: bool,
332}
333impl CTR_RXR {
334 #[doc = r" Value of the field as raw bits"]
335 #[inline]
336 pub fn bit(&self) -> bool {
337 self.bits
338 }
339 #[doc = r" Returns `true` if the bit is clear (0)"]
340 #[inline]
341 pub fn bit_is_clear(&self) -> bool {
342 !self.bit()
343 }
344 #[doc = r" Returns `true` if the bit is set (1)"]
345 #[inline]
346 pub fn bit_is_set(&self) -> bool {
347 self.bit()
348 }
349}
350#[doc = r" Proxy"]
351pub struct _EAW<'a> {
352 w: &'a mut W,
353}
354impl<'a> _EAW<'a> {
355 #[doc = r" Writes raw bits to the field"]
356 #[inline]
357 pub fn bits(self, value: u8) -> &'a mut W {
358 const MASK: u8 = 15;
359 const OFFSET: u8 = 0;
360 self.w.bits &= !((MASK as u32) << OFFSET);
361 self.w.bits |= ((value & MASK) as u32) << OFFSET;
362 self.w
363 }
364}
365#[doc = "Values that can be written to the field `STAT_TX`"]
366pub enum STAT_TXW {
367 #[doc = "all transmission requests addressed to this endpoint are ignored"]
368 DISABLED,
369 #[doc = "the endpoint is stalled and all transmission requests result in a STALL handshake"]
370 STALL,
371 #[doc = "the endpoint is naked and all transmission requests result in a NAK handshake"]
372 NAK,
373 #[doc = "this endpoint is enabled for transmission"]
374 VALID,
375}
376impl STAT_TXW {
377 #[allow(missing_docs)]
378 #[doc(hidden)]
379 #[inline]
380 pub fn _bits(&self) -> u8 {
381 match *self {
382 STAT_TXW::DISABLED => 0,
383 STAT_TXW::STALL => 1,
384 STAT_TXW::NAK => 2,
385 STAT_TXW::VALID => 3,
386 }
387 }
388}
389#[doc = r" Proxy"]
390pub struct _STAT_TXW<'a> {
391 w: &'a mut W,
392}
393impl<'a> _STAT_TXW<'a> {
394 #[doc = r" Writes `variant` to the field"]
395 #[inline]
396 pub fn variant(self, variant: STAT_TXW) -> &'a mut W {
397 {
398 self.bits(variant._bits())
399 }
400 }
401 #[doc = "all transmission requests addressed to this endpoint are ignored"]
402 #[inline]
403 pub fn disabled(self) -> &'a mut W {
404 self.variant(STAT_TXW::DISABLED)
405 }
406 #[doc = "the endpoint is stalled and all transmission requests result in a STALL handshake"]
407 #[inline]
408 pub fn stall(self) -> &'a mut W {
409 self.variant(STAT_TXW::STALL)
410 }
411 #[doc = "the endpoint is naked and all transmission requests result in a NAK handshake"]
412 #[inline]
413 pub fn nak(self) -> &'a mut W {
414 self.variant(STAT_TXW::NAK)
415 }
416 #[doc = "this endpoint is enabled for transmission"]
417 #[inline]
418 pub fn valid(self) -> &'a mut W {
419 self.variant(STAT_TXW::VALID)
420 }
421 #[doc = r" Writes raw bits to the field"]
422 #[inline]
423 pub fn bits(self, value: u8) -> &'a mut W {
424 const MASK: u8 = 3;
425 const OFFSET: u8 = 4;
426 self.w.bits &= !((MASK as u32) << OFFSET);
427 self.w.bits |= ((value & MASK) as u32) << OFFSET;
428 self.w
429 }
430}
431#[doc = r" Proxy"]
432pub struct _DTOG_TXW<'a> {
433 w: &'a mut W,
434}
435impl<'a> _DTOG_TXW<'a> {
436 #[doc = r" Sets the field bit"]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r" Clears the field bit"]
441 pub fn clear_bit(self) -> &'a mut W {
442 self.bit(false)
443 }
444 #[doc = r" Writes raw bits to the field"]
445 #[inline]
446 pub fn bit(self, value: bool) -> &'a mut W {
447 const MASK: bool = true;
448 const OFFSET: u8 = 6;
449 self.w.bits &= !((MASK as u32) << OFFSET);
450 self.w.bits |= ((value & MASK) as u32) << OFFSET;
451 self.w
452 }
453}
454#[doc = r" Proxy"]
455pub struct _CTR_TXW<'a> {
456 w: &'a mut W,
457}
458impl<'a> _CTR_TXW<'a> {
459 #[doc = r" Sets the field bit"]
460 pub fn set_bit(self) -> &'a mut W {
461 self.bit(true)
462 }
463 #[doc = r" Clears the field bit"]
464 pub fn clear_bit(self) -> &'a mut W {
465 self.bit(false)
466 }
467 #[doc = r" Writes raw bits to the field"]
468 #[inline]
469 pub fn bit(self, value: bool) -> &'a mut W {
470 const MASK: bool = true;
471 const OFFSET: u8 = 7;
472 self.w.bits &= !((MASK as u32) << OFFSET);
473 self.w.bits |= ((value & MASK) as u32) << OFFSET;
474 self.w
475 }
476}
477#[doc = r" Proxy"]
478pub struct _EP_KINDW<'a> {
479 w: &'a mut W,
480}
481impl<'a> _EP_KINDW<'a> {
482 #[doc = r" Sets the field bit"]
483 pub fn set_bit(self) -> &'a mut W {
484 self.bit(true)
485 }
486 #[doc = r" Clears the field bit"]
487 pub fn clear_bit(self) -> &'a mut W {
488 self.bit(false)
489 }
490 #[doc = r" Writes raw bits to the field"]
491 #[inline]
492 pub fn bit(self, value: bool) -> &'a mut W {
493 const MASK: bool = true;
494 const OFFSET: u8 = 8;
495 self.w.bits &= !((MASK as u32) << OFFSET);
496 self.w.bits |= ((value & MASK) as u32) << OFFSET;
497 self.w
498 }
499}
500#[doc = "Values that can be written to the field `EP_TYPE`"]
501pub enum EP_TYPEW {
502 #[doc = "Bulk endpoint"]
503 BULK,
504 #[doc = "Control endpoint"]
505 CONTROL,
506 #[doc = "Iso endpoint"]
507 ISO,
508 #[doc = "Interrupt endpoint"]
509 INTERRUPT,
510}
511impl EP_TYPEW {
512 #[allow(missing_docs)]
513 #[doc(hidden)]
514 #[inline]
515 pub fn _bits(&self) -> u8 {
516 match *self {
517 EP_TYPEW::BULK => 0,
518 EP_TYPEW::CONTROL => 1,
519 EP_TYPEW::ISO => 2,
520 EP_TYPEW::INTERRUPT => 3,
521 }
522 }
523}
524#[doc = r" Proxy"]
525pub struct _EP_TYPEW<'a> {
526 w: &'a mut W,
527}
528impl<'a> _EP_TYPEW<'a> {
529 #[doc = r" Writes `variant` to the field"]
530 #[inline]
531 pub fn variant(self, variant: EP_TYPEW) -> &'a mut W {
532 {
533 self.bits(variant._bits())
534 }
535 }
536 #[doc = "Bulk endpoint"]
537 #[inline]
538 pub fn bulk(self) -> &'a mut W {
539 self.variant(EP_TYPEW::BULK)
540 }
541 #[doc = "Control endpoint"]
542 #[inline]
543 pub fn control(self) -> &'a mut W {
544 self.variant(EP_TYPEW::CONTROL)
545 }
546 #[doc = "Iso endpoint"]
547 #[inline]
548 pub fn iso(self) -> &'a mut W {
549 self.variant(EP_TYPEW::ISO)
550 }
551 #[doc = "Interrupt endpoint"]
552 #[inline]
553 pub fn interrupt(self) -> &'a mut W {
554 self.variant(EP_TYPEW::INTERRUPT)
555 }
556 #[doc = r" Writes raw bits to the field"]
557 #[inline]
558 pub fn bits(self, value: u8) -> &'a mut W {
559 const MASK: u8 = 3;
560 const OFFSET: u8 = 9;
561 self.w.bits &= !((MASK as u32) << OFFSET);
562 self.w.bits |= ((value & MASK) as u32) << OFFSET;
563 self.w
564 }
565}
566#[doc = r" Proxy"]
567pub struct _SETUPW<'a> {
568 w: &'a mut W,
569}
570impl<'a> _SETUPW<'a> {
571 #[doc = r" Sets the field bit"]
572 pub fn set_bit(self) -> &'a mut W {
573 self.bit(true)
574 }
575 #[doc = r" Clears the field bit"]
576 pub fn clear_bit(self) -> &'a mut W {
577 self.bit(false)
578 }
579 #[doc = r" Writes raw bits to the field"]
580 #[inline]
581 pub fn bit(self, value: bool) -> &'a mut W {
582 const MASK: bool = true;
583 const OFFSET: u8 = 11;
584 self.w.bits &= !((MASK as u32) << OFFSET);
585 self.w.bits |= ((value & MASK) as u32) << OFFSET;
586 self.w
587 }
588}
589#[doc = "Values that can be written to the field `STAT_RX`"]
590pub enum STAT_RXW {
591 #[doc = "all reception requests addressed to this endpoint are ignored"]
592 DISABLED,
593 #[doc = "the endpoint is stalled and all reception requests result in a STALL handshake"]
594 STALL,
595 #[doc = "the endpoint is naked and all reception requests result in a NAK handshake"]
596 NAK,
597 #[doc = "this endpoint is enabled for reception"]
598 VALID,
599}
600impl STAT_RXW {
601 #[allow(missing_docs)]
602 #[doc(hidden)]
603 #[inline]
604 pub fn _bits(&self) -> u8 {
605 match *self {
606 STAT_RXW::DISABLED => 0,
607 STAT_RXW::STALL => 1,
608 STAT_RXW::NAK => 2,
609 STAT_RXW::VALID => 3,
610 }
611 }
612}
613#[doc = r" Proxy"]
614pub struct _STAT_RXW<'a> {
615 w: &'a mut W,
616}
617impl<'a> _STAT_RXW<'a> {
618 #[doc = r" Writes `variant` to the field"]
619 #[inline]
620 pub fn variant(self, variant: STAT_RXW) -> &'a mut W {
621 {
622 self.bits(variant._bits())
623 }
624 }
625 #[doc = "all reception requests addressed to this endpoint are ignored"]
626 #[inline]
627 pub fn disabled(self) -> &'a mut W {
628 self.variant(STAT_RXW::DISABLED)
629 }
630 #[doc = "the endpoint is stalled and all reception requests result in a STALL handshake"]
631 #[inline]
632 pub fn stall(self) -> &'a mut W {
633 self.variant(STAT_RXW::STALL)
634 }
635 #[doc = "the endpoint is naked and all reception requests result in a NAK handshake"]
636 #[inline]
637 pub fn nak(self) -> &'a mut W {
638 self.variant(STAT_RXW::NAK)
639 }
640 #[doc = "this endpoint is enabled for reception"]
641 #[inline]
642 pub fn valid(self) -> &'a mut W {
643 self.variant(STAT_RXW::VALID)
644 }
645 #[doc = r" Writes raw bits to the field"]
646 #[inline]
647 pub fn bits(self, value: u8) -> &'a mut W {
648 const MASK: u8 = 3;
649 const OFFSET: u8 = 12;
650 self.w.bits &= !((MASK as u32) << OFFSET);
651 self.w.bits |= ((value & MASK) as u32) << OFFSET;
652 self.w
653 }
654}
655#[doc = r" Proxy"]
656pub struct _DTOG_RXW<'a> {
657 w: &'a mut W,
658}
659impl<'a> _DTOG_RXW<'a> {
660 #[doc = r" Sets the field bit"]
661 pub fn set_bit(self) -> &'a mut W {
662 self.bit(true)
663 }
664 #[doc = r" Clears the field bit"]
665 pub fn clear_bit(self) -> &'a mut W {
666 self.bit(false)
667 }
668 #[doc = r" Writes raw bits to the field"]
669 #[inline]
670 pub fn bit(self, value: bool) -> &'a mut W {
671 const MASK: bool = true;
672 const OFFSET: u8 = 14;
673 self.w.bits &= !((MASK as u32) << OFFSET);
674 self.w.bits |= ((value & MASK) as u32) << OFFSET;
675 self.w
676 }
677}
678#[doc = r" Proxy"]
679pub struct _CTR_RXW<'a> {
680 w: &'a mut W,
681}
682impl<'a> _CTR_RXW<'a> {
683 #[doc = r" Sets the field bit"]
684 pub fn set_bit(self) -> &'a mut W {
685 self.bit(true)
686 }
687 #[doc = r" Clears the field bit"]
688 pub fn clear_bit(self) -> &'a mut W {
689 self.bit(false)
690 }
691 #[doc = r" Writes raw bits to the field"]
692 #[inline]
693 pub fn bit(self, value: bool) -> &'a mut W {
694 const MASK: bool = true;
695 const OFFSET: u8 = 15;
696 self.w.bits &= !((MASK as u32) << OFFSET);
697 self.w.bits |= ((value & MASK) as u32) << OFFSET;
698 self.w
699 }
700}
701impl R {
702 #[doc = r" Value of the register as raw bits"]
703 #[inline]
704 pub fn bits(&self) -> u32 {
705 self.bits
706 }
707 #[doc = "Bits 0:3 - Endpoint address"]
708 #[inline]
709 pub fn ea(&self) -> EAR {
710 let bits = {
711 const MASK: u8 = 15;
712 const OFFSET: u8 = 0;
713 ((self.bits >> OFFSET) & MASK as u32) as u8
714 };
715 EAR { bits }
716 }
717 #[doc = "Bits 4:5 - Status bits, for transmission transfers"]
718 #[inline]
719 pub fn stat_tx(&self) -> STAT_TXR {
720 STAT_TXR::_from({
721 const MASK: u8 = 3;
722 const OFFSET: u8 = 4;
723 ((self.bits >> OFFSET) & MASK as u32) as u8
724 })
725 }
726 #[doc = "Bit 6 - Data Toggle, for transmission transfers"]
727 #[inline]
728 pub fn dtog_tx(&self) -> DTOG_TXR {
729 let bits = {
730 const MASK: bool = true;
731 const OFFSET: u8 = 6;
732 ((self.bits >> OFFSET) & MASK as u32) != 0
733 };
734 DTOG_TXR { bits }
735 }
736 #[doc = "Bit 7 - Correct Transfer for transmission"]
737 #[inline]
738 pub fn ctr_tx(&self) -> CTR_TXR {
739 let bits = {
740 const MASK: bool = true;
741 const OFFSET: u8 = 7;
742 ((self.bits >> OFFSET) & MASK as u32) != 0
743 };
744 CTR_TXR { bits }
745 }
746 #[doc = "Bit 8 - Endpoint kind"]
747 #[inline]
748 pub fn ep_kind(&self) -> EP_KINDR {
749 let bits = {
750 const MASK: bool = true;
751 const OFFSET: u8 = 8;
752 ((self.bits >> OFFSET) & MASK as u32) != 0
753 };
754 EP_KINDR { bits }
755 }
756 #[doc = "Bits 9:10 - Endpoint type"]
757 #[inline]
758 pub fn ep_type(&self) -> EP_TYPER {
759 EP_TYPER::_from({
760 const MASK: u8 = 3;
761 const OFFSET: u8 = 9;
762 ((self.bits >> OFFSET) & MASK as u32) as u8
763 })
764 }
765 #[doc = "Bit 11 - Setup transaction completed"]
766 #[inline]
767 pub fn setup(&self) -> SETUPR {
768 let bits = {
769 const MASK: bool = true;
770 const OFFSET: u8 = 11;
771 ((self.bits >> OFFSET) & MASK as u32) != 0
772 };
773 SETUPR { bits }
774 }
775 #[doc = "Bits 12:13 - Status bits, for reception transfers"]
776 #[inline]
777 pub fn stat_rx(&self) -> STAT_RXR {
778 STAT_RXR::_from({
779 const MASK: u8 = 3;
780 const OFFSET: u8 = 12;
781 ((self.bits >> OFFSET) & MASK as u32) as u8
782 })
783 }
784 #[doc = "Bit 14 - Data Toggle, for reception transfers"]
785 #[inline]
786 pub fn dtog_rx(&self) -> DTOG_RXR {
787 let bits = {
788 const MASK: bool = true;
789 const OFFSET: u8 = 14;
790 ((self.bits >> OFFSET) & MASK as u32) != 0
791 };
792 DTOG_RXR { bits }
793 }
794 #[doc = "Bit 15 - Correct transfer for reception"]
795 #[inline]
796 pub fn ctr_rx(&self) -> CTR_RXR {
797 let bits = {
798 const MASK: bool = true;
799 const OFFSET: u8 = 15;
800 ((self.bits >> OFFSET) & MASK as u32) != 0
801 };
802 CTR_RXR { bits }
803 }
804}
805impl W {
806 #[doc = r" Reset value of the register"]
807 #[inline]
808 pub fn reset_value() -> W {
809 W { bits: 0 }
810 }
811 #[doc = r" Writes raw bits to the register"]
812 #[inline]
813 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
814 self.bits = bits;
815 self
816 }
817 #[doc = "Bits 0:3 - Endpoint address"]
818 #[inline]
819 pub fn ea(&mut self) -> _EAW {
820 _EAW { w: self }
821 }
822 #[doc = "Bits 4:5 - Status bits, for transmission transfers"]
823 #[inline]
824 pub fn stat_tx(&mut self) -> _STAT_TXW {
825 _STAT_TXW { w: self }
826 }
827 #[doc = "Bit 6 - Data Toggle, for transmission transfers"]
828 #[inline]
829 pub fn dtog_tx(&mut self) -> _DTOG_TXW {
830 _DTOG_TXW { w: self }
831 }
832 #[doc = "Bit 7 - Correct Transfer for transmission"]
833 #[inline]
834 pub fn ctr_tx(&mut self) -> _CTR_TXW {
835 _CTR_TXW { w: self }
836 }
837 #[doc = "Bit 8 - Endpoint kind"]
838 #[inline]
839 pub fn ep_kind(&mut self) -> _EP_KINDW {
840 _EP_KINDW { w: self }
841 }
842 #[doc = "Bits 9:10 - Endpoint type"]
843 #[inline]
844 pub fn ep_type(&mut self) -> _EP_TYPEW {
845 _EP_TYPEW { w: self }
846 }
847 #[doc = "Bit 11 - Setup transaction completed"]
848 #[inline]
849 pub fn setup(&mut self) -> _SETUPW {
850 _SETUPW { w: self }
851 }
852 #[doc = "Bits 12:13 - Status bits, for reception transfers"]
853 #[inline]
854 pub fn stat_rx(&mut self) -> _STAT_RXW {
855 _STAT_RXW { w: self }
856 }
857 #[doc = "Bit 14 - Data Toggle, for reception transfers"]
858 #[inline]
859 pub fn dtog_rx(&mut self) -> _DTOG_RXW {
860 _DTOG_RXW { w: self }
861 }
862 #[doc = "Bit 15 - Correct transfer for reception"]
863 #[inline]
864 pub fn ctr_rx(&mut self) -> _CTR_RXW {
865 _CTR_RXW { w: self }
866 }
867}