1#[doc = "Register `DVSTCTR0` reader"]
2pub struct R(crate::R<DVSTCTR0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DVSTCTR0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DVSTCTR0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DVSTCTR0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DVSTCTR0` writer"]
17pub struct W(crate::W<DVSTCTR0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DVSTCTR0_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<DVSTCTR0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DVSTCTR0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `RHST` reader - USB Bus Reset Status"]
38pub type RHST_R = crate::FieldReader<u8, RHST_A>;
39#[doc = "USB Bus Reset Status\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum RHST_A {
43 #[doc = "0: Communication speed not determined"]
44 _000 = 0,
45 #[doc = "1: Low-speed connection(When the host controller is selected) /USB bus reset in progress( When the function controller is selected)"]
46 _001 = 1,
47 #[doc = "2: Full-speed connection(When the host controller is selected) /USB bus reset in progress or full-speed connection(When the function controller is selected)"]
48 _010 = 2,
49 #[doc = "3: Setting prohibited"]
50 _011 = 3,
51}
52impl From<RHST_A> for u8 {
53 #[inline(always)]
54 fn from(variant: RHST_A) -> Self {
55 variant as _
56 }
57}
58impl RHST_R {
59 #[doc = "Get enumerated values variant"]
60 #[inline(always)]
61 pub fn variant(&self) -> Option<RHST_A> {
62 match self.bits {
63 0 => Some(RHST_A::_000),
64 1 => Some(RHST_A::_001),
65 2 => Some(RHST_A::_010),
66 3 => Some(RHST_A::_011),
67 _ => None,
68 }
69 }
70 #[doc = "Checks if the value of the field is `_000`"]
71 #[inline(always)]
72 pub fn is_000(&self) -> bool {
73 *self == RHST_A::_000
74 }
75 #[doc = "Checks if the value of the field is `_001`"]
76 #[inline(always)]
77 pub fn is_001(&self) -> bool {
78 *self == RHST_A::_001
79 }
80 #[doc = "Checks if the value of the field is `_010`"]
81 #[inline(always)]
82 pub fn is_010(&self) -> bool {
83 *self == RHST_A::_010
84 }
85 #[doc = "Checks if the value of the field is `_011`"]
86 #[inline(always)]
87 pub fn is_011(&self) -> bool {
88 *self == RHST_A::_011
89 }
90}
91#[doc = "Field `UACT` reader - USB Bus Enable"]
92pub type UACT_R = crate::BitReader<UACT_A>;
93#[doc = "USB Bus Enable\n\nValue on reset: 0"]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95pub enum UACT_A {
96 #[doc = "0: Downstream port is disabled (SOF transmission is disabled)."]
97 _0 = 0,
98 #[doc = "1: Downstream port is enabled (SOF transmission is enabled)."]
99 _1 = 1,
100}
101impl From<UACT_A> for bool {
102 #[inline(always)]
103 fn from(variant: UACT_A) -> Self {
104 variant as u8 != 0
105 }
106}
107impl UACT_R {
108 #[doc = "Get enumerated values variant"]
109 #[inline(always)]
110 pub fn variant(&self) -> UACT_A {
111 match self.bits {
112 false => UACT_A::_0,
113 true => UACT_A::_1,
114 }
115 }
116 #[doc = "Checks if the value of the field is `_0`"]
117 #[inline(always)]
118 pub fn is_0(&self) -> bool {
119 *self == UACT_A::_0
120 }
121 #[doc = "Checks if the value of the field is `_1`"]
122 #[inline(always)]
123 pub fn is_1(&self) -> bool {
124 *self == UACT_A::_1
125 }
126}
127#[doc = "Field `UACT` writer - USB Bus Enable"]
128pub type UACT_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, UACT_A, O>;
129impl<'a, const O: u8> UACT_W<'a, O> {
130 #[doc = "Downstream port is disabled (SOF transmission is disabled)."]
131 #[inline(always)]
132 pub fn _0(self) -> &'a mut W {
133 self.variant(UACT_A::_0)
134 }
135 #[doc = "Downstream port is enabled (SOF transmission is enabled)."]
136 #[inline(always)]
137 pub fn _1(self) -> &'a mut W {
138 self.variant(UACT_A::_1)
139 }
140}
141#[doc = "Field `RESUME` reader - Resume Output"]
142pub type RESUME_R = crate::BitReader<RESUME_A>;
143#[doc = "Resume Output\n\nValue on reset: 0"]
144#[derive(Clone, Copy, Debug, PartialEq, Eq)]
145pub enum RESUME_A {
146 #[doc = "0: Resume signal is not output."]
147 _0 = 0,
148 #[doc = "1: Resume signal is output."]
149 _1 = 1,
150}
151impl From<RESUME_A> for bool {
152 #[inline(always)]
153 fn from(variant: RESUME_A) -> Self {
154 variant as u8 != 0
155 }
156}
157impl RESUME_R {
158 #[doc = "Get enumerated values variant"]
159 #[inline(always)]
160 pub fn variant(&self) -> RESUME_A {
161 match self.bits {
162 false => RESUME_A::_0,
163 true => RESUME_A::_1,
164 }
165 }
166 #[doc = "Checks if the value of the field is `_0`"]
167 #[inline(always)]
168 pub fn is_0(&self) -> bool {
169 *self == RESUME_A::_0
170 }
171 #[doc = "Checks if the value of the field is `_1`"]
172 #[inline(always)]
173 pub fn is_1(&self) -> bool {
174 *self == RESUME_A::_1
175 }
176}
177#[doc = "Field `RESUME` writer - Resume Output"]
178pub type RESUME_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, RESUME_A, O>;
179impl<'a, const O: u8> RESUME_W<'a, O> {
180 #[doc = "Resume signal is not output."]
181 #[inline(always)]
182 pub fn _0(self) -> &'a mut W {
183 self.variant(RESUME_A::_0)
184 }
185 #[doc = "Resume signal is output."]
186 #[inline(always)]
187 pub fn _1(self) -> &'a mut W {
188 self.variant(RESUME_A::_1)
189 }
190}
191#[doc = "Field `USBRST` reader - USB Bus Reset Output"]
192pub type USBRST_R = crate::BitReader<USBRST_A>;
193#[doc = "USB Bus Reset Output\n\nValue on reset: 0"]
194#[derive(Clone, Copy, Debug, PartialEq, Eq)]
195pub enum USBRST_A {
196 #[doc = "0: USB bus reset signal is not output."]
197 _0 = 0,
198 #[doc = "1: USB bus reset signal is output."]
199 _1 = 1,
200}
201impl From<USBRST_A> for bool {
202 #[inline(always)]
203 fn from(variant: USBRST_A) -> Self {
204 variant as u8 != 0
205 }
206}
207impl USBRST_R {
208 #[doc = "Get enumerated values variant"]
209 #[inline(always)]
210 pub fn variant(&self) -> USBRST_A {
211 match self.bits {
212 false => USBRST_A::_0,
213 true => USBRST_A::_1,
214 }
215 }
216 #[doc = "Checks if the value of the field is `_0`"]
217 #[inline(always)]
218 pub fn is_0(&self) -> bool {
219 *self == USBRST_A::_0
220 }
221 #[doc = "Checks if the value of the field is `_1`"]
222 #[inline(always)]
223 pub fn is_1(&self) -> bool {
224 *self == USBRST_A::_1
225 }
226}
227#[doc = "Field `USBRST` writer - USB Bus Reset Output"]
228pub type USBRST_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, USBRST_A, O>;
229impl<'a, const O: u8> USBRST_W<'a, O> {
230 #[doc = "USB bus reset signal is not output."]
231 #[inline(always)]
232 pub fn _0(self) -> &'a mut W {
233 self.variant(USBRST_A::_0)
234 }
235 #[doc = "USB bus reset signal is output."]
236 #[inline(always)]
237 pub fn _1(self) -> &'a mut W {
238 self.variant(USBRST_A::_1)
239 }
240}
241#[doc = "Field `RWUPE` reader - Wakeup Detection Enable"]
242pub type RWUPE_R = crate::BitReader<RWUPE_A>;
243#[doc = "Wakeup Detection Enable\n\nValue on reset: 0"]
244#[derive(Clone, Copy, Debug, PartialEq, Eq)]
245pub enum RWUPE_A {
246 #[doc = "0: Downstream port wakeup is disabled."]
247 _0 = 0,
248 #[doc = "1: Downstream port wakeup is enabled."]
249 _1 = 1,
250}
251impl From<RWUPE_A> for bool {
252 #[inline(always)]
253 fn from(variant: RWUPE_A) -> Self {
254 variant as u8 != 0
255 }
256}
257impl RWUPE_R {
258 #[doc = "Get enumerated values variant"]
259 #[inline(always)]
260 pub fn variant(&self) -> RWUPE_A {
261 match self.bits {
262 false => RWUPE_A::_0,
263 true => RWUPE_A::_1,
264 }
265 }
266 #[doc = "Checks if the value of the field is `_0`"]
267 #[inline(always)]
268 pub fn is_0(&self) -> bool {
269 *self == RWUPE_A::_0
270 }
271 #[doc = "Checks if the value of the field is `_1`"]
272 #[inline(always)]
273 pub fn is_1(&self) -> bool {
274 *self == RWUPE_A::_1
275 }
276}
277#[doc = "Field `RWUPE` writer - Wakeup Detection Enable"]
278pub type RWUPE_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, RWUPE_A, O>;
279impl<'a, const O: u8> RWUPE_W<'a, O> {
280 #[doc = "Downstream port wakeup is disabled."]
281 #[inline(always)]
282 pub fn _0(self) -> &'a mut W {
283 self.variant(RWUPE_A::_0)
284 }
285 #[doc = "Downstream port wakeup is enabled."]
286 #[inline(always)]
287 pub fn _1(self) -> &'a mut W {
288 self.variant(RWUPE_A::_1)
289 }
290}
291#[doc = "Field `WKUP` reader - Wakeup Output"]
292pub type WKUP_R = crate::BitReader<WKUP_A>;
293#[doc = "Wakeup Output\n\nValue on reset: 0"]
294#[derive(Clone, Copy, Debug, PartialEq, Eq)]
295pub enum WKUP_A {
296 #[doc = "0: Remote wakeup signal is not output."]
297 _0 = 0,
298 #[doc = "1: Remote wakeup signal is output."]
299 _1 = 1,
300}
301impl From<WKUP_A> for bool {
302 #[inline(always)]
303 fn from(variant: WKUP_A) -> Self {
304 variant as u8 != 0
305 }
306}
307impl WKUP_R {
308 #[doc = "Get enumerated values variant"]
309 #[inline(always)]
310 pub fn variant(&self) -> WKUP_A {
311 match self.bits {
312 false => WKUP_A::_0,
313 true => WKUP_A::_1,
314 }
315 }
316 #[doc = "Checks if the value of the field is `_0`"]
317 #[inline(always)]
318 pub fn is_0(&self) -> bool {
319 *self == WKUP_A::_0
320 }
321 #[doc = "Checks if the value of the field is `_1`"]
322 #[inline(always)]
323 pub fn is_1(&self) -> bool {
324 *self == WKUP_A::_1
325 }
326}
327#[doc = "Field `WKUP` writer - Wakeup Output"]
328pub type WKUP_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, WKUP_A, O>;
329impl<'a, const O: u8> WKUP_W<'a, O> {
330 #[doc = "Remote wakeup signal is not output."]
331 #[inline(always)]
332 pub fn _0(self) -> &'a mut W {
333 self.variant(WKUP_A::_0)
334 }
335 #[doc = "Remote wakeup signal is output."]
336 #[inline(always)]
337 pub fn _1(self) -> &'a mut W {
338 self.variant(WKUP_A::_1)
339 }
340}
341#[doc = "Field `VBUSEN` reader - USB_VBUSEN Output Pin Control"]
342pub type VBUSEN_R = crate::BitReader<VBUSEN_A>;
343#[doc = "USB_VBUSEN Output Pin Control\n\nValue on reset: 0"]
344#[derive(Clone, Copy, Debug, PartialEq, Eq)]
345pub enum VBUSEN_A {
346 #[doc = "0: External USB_VBUSEN pin outputs low"]
347 _0 = 0,
348 #[doc = "1: External USB_VBUSEN pin outputs high"]
349 _1 = 1,
350}
351impl From<VBUSEN_A> for bool {
352 #[inline(always)]
353 fn from(variant: VBUSEN_A) -> Self {
354 variant as u8 != 0
355 }
356}
357impl VBUSEN_R {
358 #[doc = "Get enumerated values variant"]
359 #[inline(always)]
360 pub fn variant(&self) -> VBUSEN_A {
361 match self.bits {
362 false => VBUSEN_A::_0,
363 true => VBUSEN_A::_1,
364 }
365 }
366 #[doc = "Checks if the value of the field is `_0`"]
367 #[inline(always)]
368 pub fn is_0(&self) -> bool {
369 *self == VBUSEN_A::_0
370 }
371 #[doc = "Checks if the value of the field is `_1`"]
372 #[inline(always)]
373 pub fn is_1(&self) -> bool {
374 *self == VBUSEN_A::_1
375 }
376}
377#[doc = "Field `VBUSEN` writer - USB_VBUSEN Output Pin Control"]
378pub type VBUSEN_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, VBUSEN_A, O>;
379impl<'a, const O: u8> VBUSEN_W<'a, O> {
380 #[doc = "External USB_VBUSEN pin outputs low"]
381 #[inline(always)]
382 pub fn _0(self) -> &'a mut W {
383 self.variant(VBUSEN_A::_0)
384 }
385 #[doc = "External USB_VBUSEN pin outputs high"]
386 #[inline(always)]
387 pub fn _1(self) -> &'a mut W {
388 self.variant(VBUSEN_A::_1)
389 }
390}
391#[doc = "Field `EXICEN` reader - USB_EXICEN Output Pin Control"]
392pub type EXICEN_R = crate::BitReader<EXICEN_A>;
393#[doc = "USB_EXICEN Output Pin Control\n\nValue on reset: 0"]
394#[derive(Clone, Copy, Debug, PartialEq, Eq)]
395pub enum EXICEN_A {
396 #[doc = "0: External USB_EXICEN pin outputs low"]
397 _0 = 0,
398 #[doc = "1: External USB_EXICEN pin outputs high"]
399 _1 = 1,
400}
401impl From<EXICEN_A> for bool {
402 #[inline(always)]
403 fn from(variant: EXICEN_A) -> Self {
404 variant as u8 != 0
405 }
406}
407impl EXICEN_R {
408 #[doc = "Get enumerated values variant"]
409 #[inline(always)]
410 pub fn variant(&self) -> EXICEN_A {
411 match self.bits {
412 false => EXICEN_A::_0,
413 true => EXICEN_A::_1,
414 }
415 }
416 #[doc = "Checks if the value of the field is `_0`"]
417 #[inline(always)]
418 pub fn is_0(&self) -> bool {
419 *self == EXICEN_A::_0
420 }
421 #[doc = "Checks if the value of the field is `_1`"]
422 #[inline(always)]
423 pub fn is_1(&self) -> bool {
424 *self == EXICEN_A::_1
425 }
426}
427#[doc = "Field `EXICEN` writer - USB_EXICEN Output Pin Control"]
428pub type EXICEN_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, EXICEN_A, O>;
429impl<'a, const O: u8> EXICEN_W<'a, O> {
430 #[doc = "External USB_EXICEN pin outputs low"]
431 #[inline(always)]
432 pub fn _0(self) -> &'a mut W {
433 self.variant(EXICEN_A::_0)
434 }
435 #[doc = "External USB_EXICEN pin outputs high"]
436 #[inline(always)]
437 pub fn _1(self) -> &'a mut W {
438 self.variant(EXICEN_A::_1)
439 }
440}
441#[doc = "Field `HNPBTOA` reader - Host Negotiation Protocol (HNP) Control This bit is used when switching from device B to device A while in OTG mode. If the HNPBTOA bit is 1, the internal function control keeps the suspended state until the HNP processing ends even though SYSCFG.DPRPU = 0 or SYSCFG.DCFM = 1 is set."]
442pub type HNPBTOA_R = crate::BitReader<HNPBTOA_A>;
443#[doc = "Host Negotiation Protocol (HNP) Control This bit is used when switching from device B to device A while in OTG mode. If the HNPBTOA bit is 1, the internal function control keeps the suspended state until the HNP processing ends even though SYSCFG.DPRPU = 0 or SYSCFG.DCFM = 1 is set.\n\nValue on reset: 0"]
444#[derive(Clone, Copy, Debug, PartialEq, Eq)]
445pub enum HNPBTOA_A {
446 #[doc = "0: Normal Operation"]
447 _0 = 0,
448 #[doc = "1: Switching from device B to device A is enabled"]
449 _1 = 1,
450}
451impl From<HNPBTOA_A> for bool {
452 #[inline(always)]
453 fn from(variant: HNPBTOA_A) -> Self {
454 variant as u8 != 0
455 }
456}
457impl HNPBTOA_R {
458 #[doc = "Get enumerated values variant"]
459 #[inline(always)]
460 pub fn variant(&self) -> HNPBTOA_A {
461 match self.bits {
462 false => HNPBTOA_A::_0,
463 true => HNPBTOA_A::_1,
464 }
465 }
466 #[doc = "Checks if the value of the field is `_0`"]
467 #[inline(always)]
468 pub fn is_0(&self) -> bool {
469 *self == HNPBTOA_A::_0
470 }
471 #[doc = "Checks if the value of the field is `_1`"]
472 #[inline(always)]
473 pub fn is_1(&self) -> bool {
474 *self == HNPBTOA_A::_1
475 }
476}
477#[doc = "Field `HNPBTOA` writer - Host Negotiation Protocol (HNP) Control This bit is used when switching from device B to device A while in OTG mode. If the HNPBTOA bit is 1, the internal function control keeps the suspended state until the HNP processing ends even though SYSCFG.DPRPU = 0 or SYSCFG.DCFM = 1 is set."]
478pub type HNPBTOA_W<'a, const O: u8> = crate::BitWriter<'a, u16, DVSTCTR0_SPEC, HNPBTOA_A, O>;
479impl<'a, const O: u8> HNPBTOA_W<'a, O> {
480 #[doc = "Normal Operation"]
481 #[inline(always)]
482 pub fn _0(self) -> &'a mut W {
483 self.variant(HNPBTOA_A::_0)
484 }
485 #[doc = "Switching from device B to device A is enabled"]
486 #[inline(always)]
487 pub fn _1(self) -> &'a mut W {
488 self.variant(HNPBTOA_A::_1)
489 }
490}
491impl R {
492 #[doc = "Bits 0:2 - USB Bus Reset Status"]
493 #[inline(always)]
494 pub fn rhst(&self) -> RHST_R {
495 RHST_R::new((self.bits & 7) as u8)
496 }
497 #[doc = "Bit 4 - USB Bus Enable"]
498 #[inline(always)]
499 pub fn uact(&self) -> UACT_R {
500 UACT_R::new(((self.bits >> 4) & 1) != 0)
501 }
502 #[doc = "Bit 5 - Resume Output"]
503 #[inline(always)]
504 pub fn resume(&self) -> RESUME_R {
505 RESUME_R::new(((self.bits >> 5) & 1) != 0)
506 }
507 #[doc = "Bit 6 - USB Bus Reset Output"]
508 #[inline(always)]
509 pub fn usbrst(&self) -> USBRST_R {
510 USBRST_R::new(((self.bits >> 6) & 1) != 0)
511 }
512 #[doc = "Bit 7 - Wakeup Detection Enable"]
513 #[inline(always)]
514 pub fn rwupe(&self) -> RWUPE_R {
515 RWUPE_R::new(((self.bits >> 7) & 1) != 0)
516 }
517 #[doc = "Bit 8 - Wakeup Output"]
518 #[inline(always)]
519 pub fn wkup(&self) -> WKUP_R {
520 WKUP_R::new(((self.bits >> 8) & 1) != 0)
521 }
522 #[doc = "Bit 9 - USB_VBUSEN Output Pin Control"]
523 #[inline(always)]
524 pub fn vbusen(&self) -> VBUSEN_R {
525 VBUSEN_R::new(((self.bits >> 9) & 1) != 0)
526 }
527 #[doc = "Bit 10 - USB_EXICEN Output Pin Control"]
528 #[inline(always)]
529 pub fn exicen(&self) -> EXICEN_R {
530 EXICEN_R::new(((self.bits >> 10) & 1) != 0)
531 }
532 #[doc = "Bit 11 - Host Negotiation Protocol (HNP) Control This bit is used when switching from device B to device A while in OTG mode. If the HNPBTOA bit is 1, the internal function control keeps the suspended state until the HNP processing ends even though SYSCFG.DPRPU = 0 or SYSCFG.DCFM = 1 is set."]
533 #[inline(always)]
534 pub fn hnpbtoa(&self) -> HNPBTOA_R {
535 HNPBTOA_R::new(((self.bits >> 11) & 1) != 0)
536 }
537}
538impl W {
539 #[doc = "Bit 4 - USB Bus Enable"]
540 #[inline(always)]
541 #[must_use]
542 pub fn uact(&mut self) -> UACT_W<4> {
543 UACT_W::new(self)
544 }
545 #[doc = "Bit 5 - Resume Output"]
546 #[inline(always)]
547 #[must_use]
548 pub fn resume(&mut self) -> RESUME_W<5> {
549 RESUME_W::new(self)
550 }
551 #[doc = "Bit 6 - USB Bus Reset Output"]
552 #[inline(always)]
553 #[must_use]
554 pub fn usbrst(&mut self) -> USBRST_W<6> {
555 USBRST_W::new(self)
556 }
557 #[doc = "Bit 7 - Wakeup Detection Enable"]
558 #[inline(always)]
559 #[must_use]
560 pub fn rwupe(&mut self) -> RWUPE_W<7> {
561 RWUPE_W::new(self)
562 }
563 #[doc = "Bit 8 - Wakeup Output"]
564 #[inline(always)]
565 #[must_use]
566 pub fn wkup(&mut self) -> WKUP_W<8> {
567 WKUP_W::new(self)
568 }
569 #[doc = "Bit 9 - USB_VBUSEN Output Pin Control"]
570 #[inline(always)]
571 #[must_use]
572 pub fn vbusen(&mut self) -> VBUSEN_W<9> {
573 VBUSEN_W::new(self)
574 }
575 #[doc = "Bit 10 - USB_EXICEN Output Pin Control"]
576 #[inline(always)]
577 #[must_use]
578 pub fn exicen(&mut self) -> EXICEN_W<10> {
579 EXICEN_W::new(self)
580 }
581 #[doc = "Bit 11 - Host Negotiation Protocol (HNP) Control This bit is used when switching from device B to device A while in OTG mode. If the HNPBTOA bit is 1, the internal function control keeps the suspended state until the HNP processing ends even though SYSCFG.DPRPU = 0 or SYSCFG.DCFM = 1 is set."]
582 #[inline(always)]
583 #[must_use]
584 pub fn hnpbtoa(&mut self) -> HNPBTOA_W<11> {
585 HNPBTOA_W::new(self)
586 }
587 #[doc = "Writes raw bits to the register."]
588 #[inline(always)]
589 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
590 self.0.bits(bits);
591 self
592 }
593}
594#[doc = "Device State Control Register 0\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 [dvstctr0](index.html) module"]
595pub struct DVSTCTR0_SPEC;
596impl crate::RegisterSpec for DVSTCTR0_SPEC {
597 type Ux = u16;
598}
599#[doc = "`read()` method returns [dvstctr0::R](R) reader structure"]
600impl crate::Readable for DVSTCTR0_SPEC {
601 type Reader = R;
602}
603#[doc = "`write(|w| ..)` method takes [dvstctr0::W](W) writer structure"]
604impl crate::Writable for DVSTCTR0_SPEC {
605 type Writer = W;
606 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
607 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
608}
609#[doc = "`reset()` method sets DVSTCTR0 to value 0"]
610impl crate::Resettable for DVSTCTR0_SPEC {
611 const RESET_VALUE: Self::Ux = 0;
612}