1#[doc = "Register `DEBUG0_SET` reader"]
2pub struct R(crate::R<DEBUG0_SET_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DEBUG0_SET_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DEBUG0_SET_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DEBUG0_SET_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DEBUG0_SET` writer"]
17pub struct W(crate::W<DEBUG0_SET_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DEBUG0_SET_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<DEBUG0_SET_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DEBUG0_SET_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `DEBUG_INTERFACE_HOLD` reader - Debug interface"]
38pub type DEBUG_INTERFACE_HOLD_R = crate::BitReader<DEBUG_INTERFACE_HOLD_A>;
39#[doc = "Debug interface\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum DEBUG_INTERFACE_HOLD_A {
42 #[doc = "0: No effect"]
43 DISABLE = 0,
44 #[doc = "1: Sets the corresponding CTRL bit"]
45 ENABLE = 1,
46}
47impl From<DEBUG_INTERFACE_HOLD_A> for bool {
48 #[inline(always)]
49 fn from(variant: DEBUG_INTERFACE_HOLD_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl DEBUG_INTERFACE_HOLD_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> DEBUG_INTERFACE_HOLD_A {
57 match self.bits {
58 false => DEBUG_INTERFACE_HOLD_A::DISABLE,
59 true => DEBUG_INTERFACE_HOLD_A::ENABLE,
60 }
61 }
62 #[doc = "Checks if the value of the field is `DISABLE`"]
63 #[inline(always)]
64 pub fn is_disable(&self) -> bool {
65 *self == DEBUG_INTERFACE_HOLD_A::DISABLE
66 }
67 #[doc = "Checks if the value of the field is `ENABLE`"]
68 #[inline(always)]
69 pub fn is_enable(&self) -> bool {
70 *self == DEBUG_INTERFACE_HOLD_A::ENABLE
71 }
72}
73#[doc = "Field `DEBUG_INTERFACE_HOLD` writer - Debug interface"]
74pub type DEBUG_INTERFACE_HOLD_W<'a, const O: u8> =
75 crate::BitWriter<'a, u32, DEBUG0_SET_SPEC, DEBUG_INTERFACE_HOLD_A, O>;
76impl<'a, const O: u8> DEBUG_INTERFACE_HOLD_W<'a, O> {
77 #[doc = "No effect"]
78 #[inline(always)]
79 pub fn disable(self) -> &'a mut W {
80 self.variant(DEBUG_INTERFACE_HOLD_A::DISABLE)
81 }
82 #[doc = "Sets the corresponding CTRL bit"]
83 #[inline(always)]
84 pub fn enable(self) -> &'a mut W {
85 self.variant(DEBUG_INTERFACE_HOLD_A::ENABLE)
86 }
87}
88#[doc = "Field `HSTPULLDOWN` reader - HS DP/DM pulldown resistance select."]
89pub type HSTPULLDOWN_R = crate::FieldReader<u8, HSTPULLDOWN_A>;
90#[doc = "HS DP/DM pulldown resistance select.\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92#[repr(u8)]
93pub enum HSTPULLDOWN_A {
94 #[doc = "0: No effect"]
95 DISABLE = 0,
96 #[doc = "1: Sets the corresponding CTRL bit"]
97 ENABLE = 1,
98}
99impl From<HSTPULLDOWN_A> for u8 {
100 #[inline(always)]
101 fn from(variant: HSTPULLDOWN_A) -> Self {
102 variant as _
103 }
104}
105impl HSTPULLDOWN_R {
106 #[doc = "Get enumerated values variant"]
107 #[inline(always)]
108 pub fn variant(&self) -> Option<HSTPULLDOWN_A> {
109 match self.bits {
110 0 => Some(HSTPULLDOWN_A::DISABLE),
111 1 => Some(HSTPULLDOWN_A::ENABLE),
112 _ => None,
113 }
114 }
115 #[doc = "Checks if the value of the field is `DISABLE`"]
116 #[inline(always)]
117 pub fn is_disable(&self) -> bool {
118 *self == HSTPULLDOWN_A::DISABLE
119 }
120 #[doc = "Checks if the value of the field is `ENABLE`"]
121 #[inline(always)]
122 pub fn is_enable(&self) -> bool {
123 *self == HSTPULLDOWN_A::ENABLE
124 }
125}
126#[doc = "Field `HSTPULLDOWN` writer - HS DP/DM pulldown resistance select."]
127pub type HSTPULLDOWN_W<'a, const O: u8> =
128 crate::FieldWriter<'a, u32, DEBUG0_SET_SPEC, u8, HSTPULLDOWN_A, 2, O>;
129impl<'a, const O: u8> HSTPULLDOWN_W<'a, O> {
130 #[doc = "No effect"]
131 #[inline(always)]
132 pub fn disable(self) -> &'a mut W {
133 self.variant(HSTPULLDOWN_A::DISABLE)
134 }
135 #[doc = "Sets the corresponding CTRL bit"]
136 #[inline(always)]
137 pub fn enable(self) -> &'a mut W {
138 self.variant(HSTPULLDOWN_A::ENABLE)
139 }
140}
141#[doc = "Field `ENHSTPULLDOWN` reader - Enable Host pulldown"]
142pub type ENHSTPULLDOWN_R = crate::FieldReader<u8, ENHSTPULLDOWN_A>;
143#[doc = "Enable Host pulldown\n\nValue on reset: 0"]
144#[derive(Clone, Copy, Debug, PartialEq, Eq)]
145#[repr(u8)]
146pub enum ENHSTPULLDOWN_A {
147 #[doc = "0: No effect"]
148 DISABLE = 0,
149 #[doc = "1: Sets the corresponding CTRL bit"]
150 ENABLE = 1,
151}
152impl From<ENHSTPULLDOWN_A> for u8 {
153 #[inline(always)]
154 fn from(variant: ENHSTPULLDOWN_A) -> Self {
155 variant as _
156 }
157}
158impl ENHSTPULLDOWN_R {
159 #[doc = "Get enumerated values variant"]
160 #[inline(always)]
161 pub fn variant(&self) -> Option<ENHSTPULLDOWN_A> {
162 match self.bits {
163 0 => Some(ENHSTPULLDOWN_A::DISABLE),
164 1 => Some(ENHSTPULLDOWN_A::ENABLE),
165 _ => None,
166 }
167 }
168 #[doc = "Checks if the value of the field is `DISABLE`"]
169 #[inline(always)]
170 pub fn is_disable(&self) -> bool {
171 *self == ENHSTPULLDOWN_A::DISABLE
172 }
173 #[doc = "Checks if the value of the field is `ENABLE`"]
174 #[inline(always)]
175 pub fn is_enable(&self) -> bool {
176 *self == ENHSTPULLDOWN_A::ENABLE
177 }
178}
179#[doc = "Field `ENHSTPULLDOWN` writer - Enable Host pulldown"]
180pub type ENHSTPULLDOWN_W<'a, const O: u8> =
181 crate::FieldWriter<'a, u32, DEBUG0_SET_SPEC, u8, ENHSTPULLDOWN_A, 2, O>;
182impl<'a, const O: u8> ENHSTPULLDOWN_W<'a, O> {
183 #[doc = "No effect"]
184 #[inline(always)]
185 pub fn disable(self) -> &'a mut W {
186 self.variant(ENHSTPULLDOWN_A::DISABLE)
187 }
188 #[doc = "Sets the corresponding CTRL bit"]
189 #[inline(always)]
190 pub fn enable(self) -> &'a mut W {
191 self.variant(ENHSTPULLDOWN_A::ENABLE)
192 }
193}
194#[doc = "Field `TX2RXCOUNT` reader - TX2RXCOUNT"]
195pub type TX2RXCOUNT_R = crate::FieldReader<u8, TX2RXCOUNT_A>;
196#[doc = "TX2RXCOUNT\n\nValue on reset: 0"]
197#[derive(Clone, Copy, Debug, PartialEq, Eq)]
198#[repr(u8)]
199pub enum TX2RXCOUNT_A {
200 #[doc = "0: No effect"]
201 DISABLE = 0,
202 #[doc = "1: Sets the corresponding CTRL bit"]
203 ENABLE = 1,
204}
205impl From<TX2RXCOUNT_A> for u8 {
206 #[inline(always)]
207 fn from(variant: TX2RXCOUNT_A) -> Self {
208 variant as _
209 }
210}
211impl TX2RXCOUNT_R {
212 #[doc = "Get enumerated values variant"]
213 #[inline(always)]
214 pub fn variant(&self) -> Option<TX2RXCOUNT_A> {
215 match self.bits {
216 0 => Some(TX2RXCOUNT_A::DISABLE),
217 1 => Some(TX2RXCOUNT_A::ENABLE),
218 _ => None,
219 }
220 }
221 #[doc = "Checks if the value of the field is `DISABLE`"]
222 #[inline(always)]
223 pub fn is_disable(&self) -> bool {
224 *self == TX2RXCOUNT_A::DISABLE
225 }
226 #[doc = "Checks if the value of the field is `ENABLE`"]
227 #[inline(always)]
228 pub fn is_enable(&self) -> bool {
229 *self == TX2RXCOUNT_A::ENABLE
230 }
231}
232#[doc = "Field `TX2RXCOUNT` writer - TX2RXCOUNT"]
233pub type TX2RXCOUNT_W<'a, const O: u8> =
234 crate::FieldWriter<'a, u32, DEBUG0_SET_SPEC, u8, TX2RXCOUNT_A, 4, O>;
235impl<'a, const O: u8> TX2RXCOUNT_W<'a, O> {
236 #[doc = "No effect"]
237 #[inline(always)]
238 pub fn disable(self) -> &'a mut W {
239 self.variant(TX2RXCOUNT_A::DISABLE)
240 }
241 #[doc = "Sets the corresponding CTRL bit"]
242 #[inline(always)]
243 pub fn enable(self) -> &'a mut W {
244 self.variant(TX2RXCOUNT_A::ENABLE)
245 }
246}
247#[doc = "Field `ENTX2RXCOUNT` reader - ENTX2RXCOUNT"]
248pub type ENTX2RXCOUNT_R = crate::BitReader<ENTX2RXCOUNT_A>;
249#[doc = "ENTX2RXCOUNT\n\nValue on reset: 0"]
250#[derive(Clone, Copy, Debug, PartialEq, Eq)]
251pub enum ENTX2RXCOUNT_A {
252 #[doc = "0: No effect"]
253 DISABLE = 0,
254 #[doc = "1: Sets the corresponding CTRL bit"]
255 ENABLE = 1,
256}
257impl From<ENTX2RXCOUNT_A> for bool {
258 #[inline(always)]
259 fn from(variant: ENTX2RXCOUNT_A) -> Self {
260 variant as u8 != 0
261 }
262}
263impl ENTX2RXCOUNT_R {
264 #[doc = "Get enumerated values variant"]
265 #[inline(always)]
266 pub fn variant(&self) -> ENTX2RXCOUNT_A {
267 match self.bits {
268 false => ENTX2RXCOUNT_A::DISABLE,
269 true => ENTX2RXCOUNT_A::ENABLE,
270 }
271 }
272 #[doc = "Checks if the value of the field is `DISABLE`"]
273 #[inline(always)]
274 pub fn is_disable(&self) -> bool {
275 *self == ENTX2RXCOUNT_A::DISABLE
276 }
277 #[doc = "Checks if the value of the field is `ENABLE`"]
278 #[inline(always)]
279 pub fn is_enable(&self) -> bool {
280 *self == ENTX2RXCOUNT_A::ENABLE
281 }
282}
283#[doc = "Field `ENTX2RXCOUNT` writer - ENTX2RXCOUNT"]
284pub type ENTX2RXCOUNT_W<'a, const O: u8> =
285 crate::BitWriter<'a, u32, DEBUG0_SET_SPEC, ENTX2RXCOUNT_A, O>;
286impl<'a, const O: u8> ENTX2RXCOUNT_W<'a, O> {
287 #[doc = "No effect"]
288 #[inline(always)]
289 pub fn disable(self) -> &'a mut W {
290 self.variant(ENTX2RXCOUNT_A::DISABLE)
291 }
292 #[doc = "Sets the corresponding CTRL bit"]
293 #[inline(always)]
294 pub fn enable(self) -> &'a mut W {
295 self.variant(ENTX2RXCOUNT_A::ENABLE)
296 }
297}
298#[doc = "Field `SQUELCHRESETCOUNT` reader - Squelch reset count"]
299pub type SQUELCHRESETCOUNT_R = crate::FieldReader<u8, SQUELCHRESETCOUNT_A>;
300#[doc = "Squelch reset count\n\nValue on reset: 24"]
301#[derive(Clone, Copy, Debug, PartialEq, Eq)]
302#[repr(u8)]
303pub enum SQUELCHRESETCOUNT_A {
304 #[doc = "0: No effect"]
305 DISABLE = 0,
306 #[doc = "1: Sets the corresponding CTRL bit"]
307 ENABLE = 1,
308}
309impl From<SQUELCHRESETCOUNT_A> for u8 {
310 #[inline(always)]
311 fn from(variant: SQUELCHRESETCOUNT_A) -> Self {
312 variant as _
313 }
314}
315impl SQUELCHRESETCOUNT_R {
316 #[doc = "Get enumerated values variant"]
317 #[inline(always)]
318 pub fn variant(&self) -> Option<SQUELCHRESETCOUNT_A> {
319 match self.bits {
320 0 => Some(SQUELCHRESETCOUNT_A::DISABLE),
321 1 => Some(SQUELCHRESETCOUNT_A::ENABLE),
322 _ => None,
323 }
324 }
325 #[doc = "Checks if the value of the field is `DISABLE`"]
326 #[inline(always)]
327 pub fn is_disable(&self) -> bool {
328 *self == SQUELCHRESETCOUNT_A::DISABLE
329 }
330 #[doc = "Checks if the value of the field is `ENABLE`"]
331 #[inline(always)]
332 pub fn is_enable(&self) -> bool {
333 *self == SQUELCHRESETCOUNT_A::ENABLE
334 }
335}
336#[doc = "Field `SQUELCHRESETCOUNT` writer - Squelch reset count"]
337pub type SQUELCHRESETCOUNT_W<'a, const O: u8> =
338 crate::FieldWriter<'a, u32, DEBUG0_SET_SPEC, u8, SQUELCHRESETCOUNT_A, 5, O>;
339impl<'a, const O: u8> SQUELCHRESETCOUNT_W<'a, O> {
340 #[doc = "No effect"]
341 #[inline(always)]
342 pub fn disable(self) -> &'a mut W {
343 self.variant(SQUELCHRESETCOUNT_A::DISABLE)
344 }
345 #[doc = "Sets the corresponding CTRL bit"]
346 #[inline(always)]
347 pub fn enable(self) -> &'a mut W {
348 self.variant(SQUELCHRESETCOUNT_A::ENABLE)
349 }
350}
351#[doc = "Field `ENSQUELCHRESET` reader - Enable squelch reset"]
352pub type ENSQUELCHRESET_R = crate::BitReader<ENSQUELCHRESET_A>;
353#[doc = "Enable squelch reset\n\nValue on reset: 1"]
354#[derive(Clone, Copy, Debug, PartialEq, Eq)]
355pub enum ENSQUELCHRESET_A {
356 #[doc = "0: No effect"]
357 DISABLE = 0,
358 #[doc = "1: Sets the corresponding CTRL bit"]
359 ENABLE = 1,
360}
361impl From<ENSQUELCHRESET_A> for bool {
362 #[inline(always)]
363 fn from(variant: ENSQUELCHRESET_A) -> Self {
364 variant as u8 != 0
365 }
366}
367impl ENSQUELCHRESET_R {
368 #[doc = "Get enumerated values variant"]
369 #[inline(always)]
370 pub fn variant(&self) -> ENSQUELCHRESET_A {
371 match self.bits {
372 false => ENSQUELCHRESET_A::DISABLE,
373 true => ENSQUELCHRESET_A::ENABLE,
374 }
375 }
376 #[doc = "Checks if the value of the field is `DISABLE`"]
377 #[inline(always)]
378 pub fn is_disable(&self) -> bool {
379 *self == ENSQUELCHRESET_A::DISABLE
380 }
381 #[doc = "Checks if the value of the field is `ENABLE`"]
382 #[inline(always)]
383 pub fn is_enable(&self) -> bool {
384 *self == ENSQUELCHRESET_A::ENABLE
385 }
386}
387#[doc = "Field `ENSQUELCHRESET` writer - Enable squelch reset"]
388pub type ENSQUELCHRESET_W<'a, const O: u8> =
389 crate::BitWriter<'a, u32, DEBUG0_SET_SPEC, ENSQUELCHRESET_A, O>;
390impl<'a, const O: u8> ENSQUELCHRESET_W<'a, O> {
391 #[doc = "No effect"]
392 #[inline(always)]
393 pub fn disable(self) -> &'a mut W {
394 self.variant(ENSQUELCHRESET_A::DISABLE)
395 }
396 #[doc = "Sets the corresponding CTRL bit"]
397 #[inline(always)]
398 pub fn enable(self) -> &'a mut W {
399 self.variant(ENSQUELCHRESET_A::ENABLE)
400 }
401}
402#[doc = "Field `SQUELCHRESETLENGTH` reader - Squelch reset length"]
403pub type SQUELCHRESETLENGTH_R = crate::FieldReader<u8, SQUELCHRESETLENGTH_A>;
404#[doc = "Squelch reset length\n\nValue on reset: 15"]
405#[derive(Clone, Copy, Debug, PartialEq, Eq)]
406#[repr(u8)]
407pub enum SQUELCHRESETLENGTH_A {
408 #[doc = "0: No effect"]
409 DISABLE = 0,
410 #[doc = "1: Sets the corresponding CTRL bit"]
411 ENABLE = 1,
412}
413impl From<SQUELCHRESETLENGTH_A> for u8 {
414 #[inline(always)]
415 fn from(variant: SQUELCHRESETLENGTH_A) -> Self {
416 variant as _
417 }
418}
419impl SQUELCHRESETLENGTH_R {
420 #[doc = "Get enumerated values variant"]
421 #[inline(always)]
422 pub fn variant(&self) -> Option<SQUELCHRESETLENGTH_A> {
423 match self.bits {
424 0 => Some(SQUELCHRESETLENGTH_A::DISABLE),
425 1 => Some(SQUELCHRESETLENGTH_A::ENABLE),
426 _ => None,
427 }
428 }
429 #[doc = "Checks if the value of the field is `DISABLE`"]
430 #[inline(always)]
431 pub fn is_disable(&self) -> bool {
432 *self == SQUELCHRESETLENGTH_A::DISABLE
433 }
434 #[doc = "Checks if the value of the field is `ENABLE`"]
435 #[inline(always)]
436 pub fn is_enable(&self) -> bool {
437 *self == SQUELCHRESETLENGTH_A::ENABLE
438 }
439}
440#[doc = "Field `SQUELCHRESETLENGTH` writer - Squelch reset length"]
441pub type SQUELCHRESETLENGTH_W<'a, const O: u8> =
442 crate::FieldWriter<'a, u32, DEBUG0_SET_SPEC, u8, SQUELCHRESETLENGTH_A, 4, O>;
443impl<'a, const O: u8> SQUELCHRESETLENGTH_W<'a, O> {
444 #[doc = "No effect"]
445 #[inline(always)]
446 pub fn disable(self) -> &'a mut W {
447 self.variant(SQUELCHRESETLENGTH_A::DISABLE)
448 }
449 #[doc = "Sets the corresponding CTRL bit"]
450 #[inline(always)]
451 pub fn enable(self) -> &'a mut W {
452 self.variant(SQUELCHRESETLENGTH_A::ENABLE)
453 }
454}
455#[doc = "Field `HOST_RESUME_DEBUG` reader - Host resume"]
456pub type HOST_RESUME_DEBUG_R = crate::BitReader<HOST_RESUME_DEBUG_A>;
457#[doc = "Host resume\n\nValue on reset: 1"]
458#[derive(Clone, Copy, Debug, PartialEq, Eq)]
459pub enum HOST_RESUME_DEBUG_A {
460 #[doc = "0: No effect"]
461 DISABLE = 0,
462 #[doc = "1: Sets the corresponding CTRL bit"]
463 ENABLE = 1,
464}
465impl From<HOST_RESUME_DEBUG_A> for bool {
466 #[inline(always)]
467 fn from(variant: HOST_RESUME_DEBUG_A) -> Self {
468 variant as u8 != 0
469 }
470}
471impl HOST_RESUME_DEBUG_R {
472 #[doc = "Get enumerated values variant"]
473 #[inline(always)]
474 pub fn variant(&self) -> HOST_RESUME_DEBUG_A {
475 match self.bits {
476 false => HOST_RESUME_DEBUG_A::DISABLE,
477 true => HOST_RESUME_DEBUG_A::ENABLE,
478 }
479 }
480 #[doc = "Checks if the value of the field is `DISABLE`"]
481 #[inline(always)]
482 pub fn is_disable(&self) -> bool {
483 *self == HOST_RESUME_DEBUG_A::DISABLE
484 }
485 #[doc = "Checks if the value of the field is `ENABLE`"]
486 #[inline(always)]
487 pub fn is_enable(&self) -> bool {
488 *self == HOST_RESUME_DEBUG_A::ENABLE
489 }
490}
491#[doc = "Field `HOST_RESUME_DEBUG` writer - Host resume"]
492pub type HOST_RESUME_DEBUG_W<'a, const O: u8> =
493 crate::BitWriter<'a, u32, DEBUG0_SET_SPEC, HOST_RESUME_DEBUG_A, O>;
494impl<'a, const O: u8> HOST_RESUME_DEBUG_W<'a, O> {
495 #[doc = "No effect"]
496 #[inline(always)]
497 pub fn disable(self) -> &'a mut W {
498 self.variant(HOST_RESUME_DEBUG_A::DISABLE)
499 }
500 #[doc = "Sets the corresponding CTRL bit"]
501 #[inline(always)]
502 pub fn enable(self) -> &'a mut W {
503 self.variant(HOST_RESUME_DEBUG_A::ENABLE)
504 }
505}
506#[doc = "Field `CLKGATE` reader - Test clock gate"]
507pub type CLKGATE_R = crate::BitReader<CLKGATE_A>;
508#[doc = "Test clock gate\n\nValue on reset: 1"]
509#[derive(Clone, Copy, Debug, PartialEq, Eq)]
510pub enum CLKGATE_A {
511 #[doc = "0: No effect"]
512 DISABLE = 0,
513 #[doc = "1: Sets the corresponding CTRL bit"]
514 ENABLE = 1,
515}
516impl From<CLKGATE_A> for bool {
517 #[inline(always)]
518 fn from(variant: CLKGATE_A) -> Self {
519 variant as u8 != 0
520 }
521}
522impl CLKGATE_R {
523 #[doc = "Get enumerated values variant"]
524 #[inline(always)]
525 pub fn variant(&self) -> CLKGATE_A {
526 match self.bits {
527 false => CLKGATE_A::DISABLE,
528 true => CLKGATE_A::ENABLE,
529 }
530 }
531 #[doc = "Checks if the value of the field is `DISABLE`"]
532 #[inline(always)]
533 pub fn is_disable(&self) -> bool {
534 *self == CLKGATE_A::DISABLE
535 }
536 #[doc = "Checks if the value of the field is `ENABLE`"]
537 #[inline(always)]
538 pub fn is_enable(&self) -> bool {
539 *self == CLKGATE_A::ENABLE
540 }
541}
542#[doc = "Field `CLKGATE` writer - Test clock gate"]
543pub type CLKGATE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DEBUG0_SET_SPEC, CLKGATE_A, O>;
544impl<'a, const O: u8> CLKGATE_W<'a, O> {
545 #[doc = "No effect"]
546 #[inline(always)]
547 pub fn disable(self) -> &'a mut W {
548 self.variant(CLKGATE_A::DISABLE)
549 }
550 #[doc = "Sets the corresponding CTRL bit"]
551 #[inline(always)]
552 pub fn enable(self) -> &'a mut W {
553 self.variant(CLKGATE_A::ENABLE)
554 }
555}
556impl R {
557 #[doc = "Bit 1 - Debug interface"]
558 #[inline(always)]
559 pub fn debug_interface_hold(&self) -> DEBUG_INTERFACE_HOLD_R {
560 DEBUG_INTERFACE_HOLD_R::new(((self.bits >> 1) & 1) != 0)
561 }
562 #[doc = "Bits 2:3 - HS DP/DM pulldown resistance select."]
563 #[inline(always)]
564 pub fn hstpulldown(&self) -> HSTPULLDOWN_R {
565 HSTPULLDOWN_R::new(((self.bits >> 2) & 3) as u8)
566 }
567 #[doc = "Bits 4:5 - Enable Host pulldown"]
568 #[inline(always)]
569 pub fn enhstpulldown(&self) -> ENHSTPULLDOWN_R {
570 ENHSTPULLDOWN_R::new(((self.bits >> 4) & 3) as u8)
571 }
572 #[doc = "Bits 8:11 - TX2RXCOUNT"]
573 #[inline(always)]
574 pub fn tx2rxcount(&self) -> TX2RXCOUNT_R {
575 TX2RXCOUNT_R::new(((self.bits >> 8) & 0x0f) as u8)
576 }
577 #[doc = "Bit 12 - ENTX2RXCOUNT"]
578 #[inline(always)]
579 pub fn entx2rxcount(&self) -> ENTX2RXCOUNT_R {
580 ENTX2RXCOUNT_R::new(((self.bits >> 12) & 1) != 0)
581 }
582 #[doc = "Bits 16:20 - Squelch reset count"]
583 #[inline(always)]
584 pub fn squelchresetcount(&self) -> SQUELCHRESETCOUNT_R {
585 SQUELCHRESETCOUNT_R::new(((self.bits >> 16) & 0x1f) as u8)
586 }
587 #[doc = "Bit 24 - Enable squelch reset"]
588 #[inline(always)]
589 pub fn ensquelchreset(&self) -> ENSQUELCHRESET_R {
590 ENSQUELCHRESET_R::new(((self.bits >> 24) & 1) != 0)
591 }
592 #[doc = "Bits 25:28 - Squelch reset length"]
593 #[inline(always)]
594 pub fn squelchresetlength(&self) -> SQUELCHRESETLENGTH_R {
595 SQUELCHRESETLENGTH_R::new(((self.bits >> 25) & 0x0f) as u8)
596 }
597 #[doc = "Bit 29 - Host resume"]
598 #[inline(always)]
599 pub fn host_resume_debug(&self) -> HOST_RESUME_DEBUG_R {
600 HOST_RESUME_DEBUG_R::new(((self.bits >> 29) & 1) != 0)
601 }
602 #[doc = "Bit 30 - Test clock gate"]
603 #[inline(always)]
604 pub fn clkgate(&self) -> CLKGATE_R {
605 CLKGATE_R::new(((self.bits >> 30) & 1) != 0)
606 }
607}
608impl W {
609 #[doc = "Bit 1 - Debug interface"]
610 #[inline(always)]
611 #[must_use]
612 pub fn debug_interface_hold(&mut self) -> DEBUG_INTERFACE_HOLD_W<1> {
613 DEBUG_INTERFACE_HOLD_W::new(self)
614 }
615 #[doc = "Bits 2:3 - HS DP/DM pulldown resistance select."]
616 #[inline(always)]
617 #[must_use]
618 pub fn hstpulldown(&mut self) -> HSTPULLDOWN_W<2> {
619 HSTPULLDOWN_W::new(self)
620 }
621 #[doc = "Bits 4:5 - Enable Host pulldown"]
622 #[inline(always)]
623 #[must_use]
624 pub fn enhstpulldown(&mut self) -> ENHSTPULLDOWN_W<4> {
625 ENHSTPULLDOWN_W::new(self)
626 }
627 #[doc = "Bits 8:11 - TX2RXCOUNT"]
628 #[inline(always)]
629 #[must_use]
630 pub fn tx2rxcount(&mut self) -> TX2RXCOUNT_W<8> {
631 TX2RXCOUNT_W::new(self)
632 }
633 #[doc = "Bit 12 - ENTX2RXCOUNT"]
634 #[inline(always)]
635 #[must_use]
636 pub fn entx2rxcount(&mut self) -> ENTX2RXCOUNT_W<12> {
637 ENTX2RXCOUNT_W::new(self)
638 }
639 #[doc = "Bits 16:20 - Squelch reset count"]
640 #[inline(always)]
641 #[must_use]
642 pub fn squelchresetcount(&mut self) -> SQUELCHRESETCOUNT_W<16> {
643 SQUELCHRESETCOUNT_W::new(self)
644 }
645 #[doc = "Bit 24 - Enable squelch reset"]
646 #[inline(always)]
647 #[must_use]
648 pub fn ensquelchreset(&mut self) -> ENSQUELCHRESET_W<24> {
649 ENSQUELCHRESET_W::new(self)
650 }
651 #[doc = "Bits 25:28 - Squelch reset length"]
652 #[inline(always)]
653 #[must_use]
654 pub fn squelchresetlength(&mut self) -> SQUELCHRESETLENGTH_W<25> {
655 SQUELCHRESETLENGTH_W::new(self)
656 }
657 #[doc = "Bit 29 - Host resume"]
658 #[inline(always)]
659 #[must_use]
660 pub fn host_resume_debug(&mut self) -> HOST_RESUME_DEBUG_W<29> {
661 HOST_RESUME_DEBUG_W::new(self)
662 }
663 #[doc = "Bit 30 - Test clock gate"]
664 #[inline(always)]
665 #[must_use]
666 pub fn clkgate(&mut self) -> CLKGATE_W<30> {
667 CLKGATE_W::new(self)
668 }
669 #[doc = "Writes raw bits to the register."]
670 #[inline(always)]
671 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
672 self.0.bits(bits);
673 self
674 }
675}
676#[doc = "Debug 0 Set\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 [debug0_set](index.html) module"]
677pub struct DEBUG0_SET_SPEC;
678impl crate::RegisterSpec for DEBUG0_SET_SPEC {
679 type Ux = u32;
680}
681#[doc = "`read()` method returns [debug0_set::R](R) reader structure"]
682impl crate::Readable for DEBUG0_SET_SPEC {
683 type Reader = R;
684}
685#[doc = "`write(|w| ..)` method takes [debug0_set::W](W) writer structure"]
686impl crate::Writable for DEBUG0_SET_SPEC {
687 type Writer = W;
688 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
689 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
690}
691#[doc = "`reset()` method sets DEBUG0_SET to value 0x7f18_0000"]
692impl crate::Resettable for DEBUG0_SET_SPEC {
693 const RESET_VALUE: Self::Ux = 0x7f18_0000;
694}