1#[doc = "Register `OPSCR` reader"]
2pub struct R(crate::R<OPSCR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<OPSCR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<OPSCR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<OPSCR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `OPSCR` writer"]
17pub struct W(crate::W<OPSCR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<OPSCR_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<OPSCR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<OPSCR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `UF` reader - "]
38pub type UF_R = crate::BitReader<bool>;
39#[doc = "Field `UF` writer - "]
40pub type UF_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, bool, O>;
41#[doc = "Field `VF` reader - "]
42pub type VF_R = crate::BitReader<bool>;
43#[doc = "Field `VF` writer - "]
44pub type VF_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, bool, O>;
45#[doc = "Field `WF` reader - "]
46pub type WF_R = crate::BitReader<bool>;
47#[doc = "Field `WF` writer - "]
48pub type WF_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, bool, O>;
49#[doc = "Field `U` reader - Input U-Phase Monitor"]
50pub type U_R = crate::BitReader<bool>;
51#[doc = "Field `V` reader - Input V-Phase Monitor"]
52pub type V_R = crate::BitReader<bool>;
53#[doc = "Field `W` reader - Input W-Phase Monitor"]
54pub type W_R = crate::BitReader<bool>;
55#[doc = "Field `EN` reader - Enable-Phase Output Control"]
56pub type EN_R = crate::BitReader<EN_A>;
57#[doc = "Enable-Phase Output Control\n\nValue on reset: 0"]
58#[derive(Clone, Copy, Debug, PartialEq, Eq)]
59pub enum EN_A {
60 #[doc = "0: Do not output (Hi-Z external pin)"]
61 _0 = 0,
62 #[doc = "1: Output"]
63 _1 = 1,
64}
65impl From<EN_A> for bool {
66 #[inline(always)]
67 fn from(variant: EN_A) -> Self {
68 variant as u8 != 0
69 }
70}
71impl EN_R {
72 #[doc = "Get enumerated values variant"]
73 #[inline(always)]
74 pub fn variant(&self) -> EN_A {
75 match self.bits {
76 false => EN_A::_0,
77 true => EN_A::_1,
78 }
79 }
80 #[doc = "Checks if the value of the field is `_0`"]
81 #[inline(always)]
82 pub fn is_0(&self) -> bool {
83 *self == EN_A::_0
84 }
85 #[doc = "Checks if the value of the field is `_1`"]
86 #[inline(always)]
87 pub fn is_1(&self) -> bool {
88 *self == EN_A::_1
89 }
90}
91#[doc = "Field `EN` writer - Enable-Phase Output Control"]
92pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, EN_A, O>;
93impl<'a, const O: u8> EN_W<'a, O> {
94 #[doc = "Do not output (Hi-Z external pin)"]
95 #[inline(always)]
96 pub fn _0(self) -> &'a mut W {
97 self.variant(EN_A::_0)
98 }
99 #[doc = "Output"]
100 #[inline(always)]
101 pub fn _1(self) -> &'a mut W {
102 self.variant(EN_A::_1)
103 }
104}
105#[doc = "Field `FB` reader - External Feedback Signal Enable"]
106pub type FB_R = crate::BitReader<FB_A>;
107#[doc = "External Feedback Signal Enable\n\nValue on reset: 0"]
108#[derive(Clone, Copy, Debug, PartialEq, Eq)]
109pub enum FB_A {
110 #[doc = "0: Select the external input"]
111 _0 = 0,
112 #[doc = "1: Select the soft setting (OPSCR.UF, VF, WF)"]
113 _1 = 1,
114}
115impl From<FB_A> for bool {
116 #[inline(always)]
117 fn from(variant: FB_A) -> Self {
118 variant as u8 != 0
119 }
120}
121impl FB_R {
122 #[doc = "Get enumerated values variant"]
123 #[inline(always)]
124 pub fn variant(&self) -> FB_A {
125 match self.bits {
126 false => FB_A::_0,
127 true => FB_A::_1,
128 }
129 }
130 #[doc = "Checks if the value of the field is `_0`"]
131 #[inline(always)]
132 pub fn is_0(&self) -> bool {
133 *self == FB_A::_0
134 }
135 #[doc = "Checks if the value of the field is `_1`"]
136 #[inline(always)]
137 pub fn is_1(&self) -> bool {
138 *self == FB_A::_1
139 }
140}
141#[doc = "Field `FB` writer - External Feedback Signal Enable"]
142pub type FB_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, FB_A, O>;
143impl<'a, const O: u8> FB_W<'a, O> {
144 #[doc = "Select the external input"]
145 #[inline(always)]
146 pub fn _0(self) -> &'a mut W {
147 self.variant(FB_A::_0)
148 }
149 #[doc = "Select the soft setting (OPSCR.UF, VF, WF)"]
150 #[inline(always)]
151 pub fn _1(self) -> &'a mut W {
152 self.variant(FB_A::_1)
153 }
154}
155#[doc = "Field `P` reader - Positive-Phase Output (P) Control"]
156pub type P_R = crate::BitReader<P_A>;
157#[doc = "Positive-Phase Output (P) Control\n\nValue on reset: 0"]
158#[derive(Clone, Copy, Debug, PartialEq, Eq)]
159pub enum P_A {
160 #[doc = "0: Level signal output"]
161 _0 = 0,
162 #[doc = "1: PWM signal output (PWM of GPT164)"]
163 _1 = 1,
164}
165impl From<P_A> for bool {
166 #[inline(always)]
167 fn from(variant: P_A) -> Self {
168 variant as u8 != 0
169 }
170}
171impl P_R {
172 #[doc = "Get enumerated values variant"]
173 #[inline(always)]
174 pub fn variant(&self) -> P_A {
175 match self.bits {
176 false => P_A::_0,
177 true => P_A::_1,
178 }
179 }
180 #[doc = "Checks if the value of the field is `_0`"]
181 #[inline(always)]
182 pub fn is_0(&self) -> bool {
183 *self == P_A::_0
184 }
185 #[doc = "Checks if the value of the field is `_1`"]
186 #[inline(always)]
187 pub fn is_1(&self) -> bool {
188 *self == P_A::_1
189 }
190}
191#[doc = "Field `P` writer - Positive-Phase Output (P) Control"]
192pub type P_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, P_A, O>;
193impl<'a, const O: u8> P_W<'a, O> {
194 #[doc = "Level signal output"]
195 #[inline(always)]
196 pub fn _0(self) -> &'a mut W {
197 self.variant(P_A::_0)
198 }
199 #[doc = "PWM signal output (PWM of GPT164)"]
200 #[inline(always)]
201 pub fn _1(self) -> &'a mut W {
202 self.variant(P_A::_1)
203 }
204}
205#[doc = "Field `N` reader - Negative-Phase Output (N) Control"]
206pub type N_R = crate::BitReader<N_A>;
207#[doc = "Negative-Phase Output (N) Control\n\nValue on reset: 0"]
208#[derive(Clone, Copy, Debug, PartialEq, Eq)]
209pub enum N_A {
210 #[doc = "0: Level signal output"]
211 _0 = 0,
212 #[doc = "1: PWM signal output (PWM of GPT164)"]
213 _1 = 1,
214}
215impl From<N_A> for bool {
216 #[inline(always)]
217 fn from(variant: N_A) -> Self {
218 variant as u8 != 0
219 }
220}
221impl N_R {
222 #[doc = "Get enumerated values variant"]
223 #[inline(always)]
224 pub fn variant(&self) -> N_A {
225 match self.bits {
226 false => N_A::_0,
227 true => N_A::_1,
228 }
229 }
230 #[doc = "Checks if the value of the field is `_0`"]
231 #[inline(always)]
232 pub fn is_0(&self) -> bool {
233 *self == N_A::_0
234 }
235 #[doc = "Checks if the value of the field is `_1`"]
236 #[inline(always)]
237 pub fn is_1(&self) -> bool {
238 *self == N_A::_1
239 }
240}
241#[doc = "Field `N` writer - Negative-Phase Output (N) Control"]
242pub type N_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, N_A, O>;
243impl<'a, const O: u8> N_W<'a, O> {
244 #[doc = "Level signal output"]
245 #[inline(always)]
246 pub fn _0(self) -> &'a mut W {
247 self.variant(N_A::_0)
248 }
249 #[doc = "PWM signal output (PWM of GPT164)"]
250 #[inline(always)]
251 pub fn _1(self) -> &'a mut W {
252 self.variant(N_A::_1)
253 }
254}
255#[doc = "Field `INV` reader - Invert-Phase Output Control"]
256pub type INV_R = crate::BitReader<INV_A>;
257#[doc = "Invert-Phase Output Control\n\nValue on reset: 0"]
258#[derive(Clone, Copy, Debug, PartialEq, Eq)]
259pub enum INV_A {
260 #[doc = "0: Positive logic (active-high) output"]
261 _0 = 0,
262 #[doc = "1: Negative logic (active-low) output"]
263 _1 = 1,
264}
265impl From<INV_A> for bool {
266 #[inline(always)]
267 fn from(variant: INV_A) -> Self {
268 variant as u8 != 0
269 }
270}
271impl INV_R {
272 #[doc = "Get enumerated values variant"]
273 #[inline(always)]
274 pub fn variant(&self) -> INV_A {
275 match self.bits {
276 false => INV_A::_0,
277 true => INV_A::_1,
278 }
279 }
280 #[doc = "Checks if the value of the field is `_0`"]
281 #[inline(always)]
282 pub fn is_0(&self) -> bool {
283 *self == INV_A::_0
284 }
285 #[doc = "Checks if the value of the field is `_1`"]
286 #[inline(always)]
287 pub fn is_1(&self) -> bool {
288 *self == INV_A::_1
289 }
290}
291#[doc = "Field `INV` writer - Invert-Phase Output Control"]
292pub type INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, INV_A, O>;
293impl<'a, const O: u8> INV_W<'a, O> {
294 #[doc = "Positive logic (active-high) output"]
295 #[inline(always)]
296 pub fn _0(self) -> &'a mut W {
297 self.variant(INV_A::_0)
298 }
299 #[doc = "Negative logic (active-low) output"]
300 #[inline(always)]
301 pub fn _1(self) -> &'a mut W {
302 self.variant(INV_A::_1)
303 }
304}
305#[doc = "Field `RV` reader - Output Phase Rotation Direction Reversal Control"]
306pub type RV_R = crate::BitReader<RV_A>;
307#[doc = "Output Phase Rotation Direction Reversal Control\n\nValue on reset: 0"]
308#[derive(Clone, Copy, Debug, PartialEq, Eq)]
309pub enum RV_A {
310 #[doc = "0: Positive rotation"]
311 _0 = 0,
312 #[doc = "1: Reverse rotation"]
313 _1 = 1,
314}
315impl From<RV_A> for bool {
316 #[inline(always)]
317 fn from(variant: RV_A) -> Self {
318 variant as u8 != 0
319 }
320}
321impl RV_R {
322 #[doc = "Get enumerated values variant"]
323 #[inline(always)]
324 pub fn variant(&self) -> RV_A {
325 match self.bits {
326 false => RV_A::_0,
327 true => RV_A::_1,
328 }
329 }
330 #[doc = "Checks if the value of the field is `_0`"]
331 #[inline(always)]
332 pub fn is_0(&self) -> bool {
333 *self == RV_A::_0
334 }
335 #[doc = "Checks if the value of the field is `_1`"]
336 #[inline(always)]
337 pub fn is_1(&self) -> bool {
338 *self == RV_A::_1
339 }
340}
341#[doc = "Field `RV` writer - Output Phase Rotation Direction Reversal Control"]
342pub type RV_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, RV_A, O>;
343impl<'a, const O: u8> RV_W<'a, O> {
344 #[doc = "Positive rotation"]
345 #[inline(always)]
346 pub fn _0(self) -> &'a mut W {
347 self.variant(RV_A::_0)
348 }
349 #[doc = "Reverse rotation"]
350 #[inline(always)]
351 pub fn _1(self) -> &'a mut W {
352 self.variant(RV_A::_1)
353 }
354}
355#[doc = "Field `ALIGN` reader - Input Phase Alignment"]
356pub type ALIGN_R = crate::BitReader<ALIGN_A>;
357#[doc = "Input Phase Alignment\n\nValue on reset: 0"]
358#[derive(Clone, Copy, Debug, PartialEq, Eq)]
359pub enum ALIGN_A {
360 #[doc = "0: Input phase aligned to PCLKD"]
361 _0 = 0,
362 #[doc = "1: Input phase aligned to PWM"]
363 _1 = 1,
364}
365impl From<ALIGN_A> for bool {
366 #[inline(always)]
367 fn from(variant: ALIGN_A) -> Self {
368 variant as u8 != 0
369 }
370}
371impl ALIGN_R {
372 #[doc = "Get enumerated values variant"]
373 #[inline(always)]
374 pub fn variant(&self) -> ALIGN_A {
375 match self.bits {
376 false => ALIGN_A::_0,
377 true => ALIGN_A::_1,
378 }
379 }
380 #[doc = "Checks if the value of the field is `_0`"]
381 #[inline(always)]
382 pub fn is_0(&self) -> bool {
383 *self == ALIGN_A::_0
384 }
385 #[doc = "Checks if the value of the field is `_1`"]
386 #[inline(always)]
387 pub fn is_1(&self) -> bool {
388 *self == ALIGN_A::_1
389 }
390}
391#[doc = "Field `ALIGN` writer - Input Phase Alignment"]
392pub type ALIGN_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, ALIGN_A, O>;
393impl<'a, const O: u8> ALIGN_W<'a, O> {
394 #[doc = "Input phase aligned to PCLKD"]
395 #[inline(always)]
396 pub fn _0(self) -> &'a mut W {
397 self.variant(ALIGN_A::_0)
398 }
399 #[doc = "Input phase aligned to PWM"]
400 #[inline(always)]
401 pub fn _1(self) -> &'a mut W {
402 self.variant(ALIGN_A::_1)
403 }
404}
405#[doc = "Field `GRP` reader - Output Disabled Source Selection"]
406pub type GRP_R = crate::FieldReader<u8, u8>;
407#[doc = "Field `GRP` writer - Output Disabled Source Selection"]
408pub type GRP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OPSCR_SPEC, u8, u8, 2, O>;
409#[doc = "Field `GODF` reader - Group Output Disable Function"]
410pub type GODF_R = crate::BitReader<GODF_A>;
411#[doc = "Group Output Disable Function\n\nValue on reset: 0"]
412#[derive(Clone, Copy, Debug, PartialEq, Eq)]
413pub enum GODF_A {
414 #[doc = "0: This bit function is ignored"]
415 _0 = 0,
416 #[doc = "1: Group disable clears the OPSCR.EN bit"]
417 _1 = 1,
418}
419impl From<GODF_A> for bool {
420 #[inline(always)]
421 fn from(variant: GODF_A) -> Self {
422 variant as u8 != 0
423 }
424}
425impl GODF_R {
426 #[doc = "Get enumerated values variant"]
427 #[inline(always)]
428 pub fn variant(&self) -> GODF_A {
429 match self.bits {
430 false => GODF_A::_0,
431 true => GODF_A::_1,
432 }
433 }
434 #[doc = "Checks if the value of the field is `_0`"]
435 #[inline(always)]
436 pub fn is_0(&self) -> bool {
437 *self == GODF_A::_0
438 }
439 #[doc = "Checks if the value of the field is `_1`"]
440 #[inline(always)]
441 pub fn is_1(&self) -> bool {
442 *self == GODF_A::_1
443 }
444}
445#[doc = "Field `GODF` writer - Group Output Disable Function"]
446pub type GODF_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, GODF_A, O>;
447impl<'a, const O: u8> GODF_W<'a, O> {
448 #[doc = "This bit function is ignored"]
449 #[inline(always)]
450 pub fn _0(self) -> &'a mut W {
451 self.variant(GODF_A::_0)
452 }
453 #[doc = "Group disable clears the OPSCR.EN bit"]
454 #[inline(always)]
455 pub fn _1(self) -> &'a mut W {
456 self.variant(GODF_A::_1)
457 }
458}
459#[doc = "Field `NFEN` reader - External Input Noise Filter Enable"]
460pub type NFEN_R = crate::BitReader<NFEN_A>;
461#[doc = "External Input Noise Filter Enable\n\nValue on reset: 0"]
462#[derive(Clone, Copy, Debug, PartialEq, Eq)]
463pub enum NFEN_A {
464 #[doc = "0: Do not use a noise filter on the external input"]
465 _0 = 0,
466 #[doc = "1: Use a noise filter on the external input"]
467 _1 = 1,
468}
469impl From<NFEN_A> for bool {
470 #[inline(always)]
471 fn from(variant: NFEN_A) -> Self {
472 variant as u8 != 0
473 }
474}
475impl NFEN_R {
476 #[doc = "Get enumerated values variant"]
477 #[inline(always)]
478 pub fn variant(&self) -> NFEN_A {
479 match self.bits {
480 false => NFEN_A::_0,
481 true => NFEN_A::_1,
482 }
483 }
484 #[doc = "Checks if the value of the field is `_0`"]
485 #[inline(always)]
486 pub fn is_0(&self) -> bool {
487 *self == NFEN_A::_0
488 }
489 #[doc = "Checks if the value of the field is `_1`"]
490 #[inline(always)]
491 pub fn is_1(&self) -> bool {
492 *self == NFEN_A::_1
493 }
494}
495#[doc = "Field `NFEN` writer - External Input Noise Filter Enable"]
496pub type NFEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, OPSCR_SPEC, NFEN_A, O>;
497impl<'a, const O: u8> NFEN_W<'a, O> {
498 #[doc = "Do not use a noise filter on the external input"]
499 #[inline(always)]
500 pub fn _0(self) -> &'a mut W {
501 self.variant(NFEN_A::_0)
502 }
503 #[doc = "Use a noise filter on the external input"]
504 #[inline(always)]
505 pub fn _1(self) -> &'a mut W {
506 self.variant(NFEN_A::_1)
507 }
508}
509#[doc = "Field `NFCS` reader - External Input Noise Filter Clock Selection"]
510pub type NFCS_R = crate::FieldReader<u8, NFCS_A>;
511#[doc = "External Input Noise Filter Clock Selection\n\nValue on reset: 0"]
512#[derive(Clone, Copy, Debug, PartialEq, Eq)]
513#[repr(u8)]
514pub enum NFCS_A {
515 #[doc = "0: PCLKD/1"]
516 _00 = 0,
517 #[doc = "1: PCLKD/4"]
518 _01 = 1,
519 #[doc = "2: PCLKD/16"]
520 _10 = 2,
521 #[doc = "3: PCLKD/64"]
522 _11 = 3,
523}
524impl From<NFCS_A> for u8 {
525 #[inline(always)]
526 fn from(variant: NFCS_A) -> Self {
527 variant as _
528 }
529}
530impl NFCS_R {
531 #[doc = "Get enumerated values variant"]
532 #[inline(always)]
533 pub fn variant(&self) -> NFCS_A {
534 match self.bits {
535 0 => NFCS_A::_00,
536 1 => NFCS_A::_01,
537 2 => NFCS_A::_10,
538 3 => NFCS_A::_11,
539 _ => unreachable!(),
540 }
541 }
542 #[doc = "Checks if the value of the field is `_00`"]
543 #[inline(always)]
544 pub fn is_00(&self) -> bool {
545 *self == NFCS_A::_00
546 }
547 #[doc = "Checks if the value of the field is `_01`"]
548 #[inline(always)]
549 pub fn is_01(&self) -> bool {
550 *self == NFCS_A::_01
551 }
552 #[doc = "Checks if the value of the field is `_10`"]
553 #[inline(always)]
554 pub fn is_10(&self) -> bool {
555 *self == NFCS_A::_10
556 }
557 #[doc = "Checks if the value of the field is `_11`"]
558 #[inline(always)]
559 pub fn is_11(&self) -> bool {
560 *self == NFCS_A::_11
561 }
562}
563#[doc = "Field `NFCS` writer - External Input Noise Filter Clock Selection"]
564pub type NFCS_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, OPSCR_SPEC, u8, NFCS_A, 2, O>;
565impl<'a, const O: u8> NFCS_W<'a, O> {
566 #[doc = "PCLKD/1"]
567 #[inline(always)]
568 pub fn _00(self) -> &'a mut W {
569 self.variant(NFCS_A::_00)
570 }
571 #[doc = "PCLKD/4"]
572 #[inline(always)]
573 pub fn _01(self) -> &'a mut W {
574 self.variant(NFCS_A::_01)
575 }
576 #[doc = "PCLKD/16"]
577 #[inline(always)]
578 pub fn _10(self) -> &'a mut W {
579 self.variant(NFCS_A::_10)
580 }
581 #[doc = "PCLKD/64"]
582 #[inline(always)]
583 pub fn _11(self) -> &'a mut W {
584 self.variant(NFCS_A::_11)
585 }
586}
587impl R {
588 #[doc = "Bit 0"]
589 #[inline(always)]
590 pub fn uf(&self) -> UF_R {
591 UF_R::new((self.bits & 1) != 0)
592 }
593 #[doc = "Bit 1"]
594 #[inline(always)]
595 pub fn vf(&self) -> VF_R {
596 VF_R::new(((self.bits >> 1) & 1) != 0)
597 }
598 #[doc = "Bit 2"]
599 #[inline(always)]
600 pub fn wf(&self) -> WF_R {
601 WF_R::new(((self.bits >> 2) & 1) != 0)
602 }
603 #[doc = "Bit 4 - Input U-Phase Monitor"]
604 #[inline(always)]
605 pub fn u(&self) -> U_R {
606 U_R::new(((self.bits >> 4) & 1) != 0)
607 }
608 #[doc = "Bit 5 - Input V-Phase Monitor"]
609 #[inline(always)]
610 pub fn v(&self) -> V_R {
611 V_R::new(((self.bits >> 5) & 1) != 0)
612 }
613 #[doc = "Bit 6 - Input W-Phase Monitor"]
614 #[inline(always)]
615 pub fn w(&self) -> W_R {
616 W_R::new(((self.bits >> 6) & 1) != 0)
617 }
618 #[doc = "Bit 8 - Enable-Phase Output Control"]
619 #[inline(always)]
620 pub fn en(&self) -> EN_R {
621 EN_R::new(((self.bits >> 8) & 1) != 0)
622 }
623 #[doc = "Bit 16 - External Feedback Signal Enable"]
624 #[inline(always)]
625 pub fn fb(&self) -> FB_R {
626 FB_R::new(((self.bits >> 16) & 1) != 0)
627 }
628 #[doc = "Bit 17 - Positive-Phase Output (P) Control"]
629 #[inline(always)]
630 pub fn p(&self) -> P_R {
631 P_R::new(((self.bits >> 17) & 1) != 0)
632 }
633 #[doc = "Bit 18 - Negative-Phase Output (N) Control"]
634 #[inline(always)]
635 pub fn n(&self) -> N_R {
636 N_R::new(((self.bits >> 18) & 1) != 0)
637 }
638 #[doc = "Bit 19 - Invert-Phase Output Control"]
639 #[inline(always)]
640 pub fn inv(&self) -> INV_R {
641 INV_R::new(((self.bits >> 19) & 1) != 0)
642 }
643 #[doc = "Bit 20 - Output Phase Rotation Direction Reversal Control"]
644 #[inline(always)]
645 pub fn rv(&self) -> RV_R {
646 RV_R::new(((self.bits >> 20) & 1) != 0)
647 }
648 #[doc = "Bit 21 - Input Phase Alignment"]
649 #[inline(always)]
650 pub fn align(&self) -> ALIGN_R {
651 ALIGN_R::new(((self.bits >> 21) & 1) != 0)
652 }
653 #[doc = "Bits 24:25 - Output Disabled Source Selection"]
654 #[inline(always)]
655 pub fn grp(&self) -> GRP_R {
656 GRP_R::new(((self.bits >> 24) & 3) as u8)
657 }
658 #[doc = "Bit 26 - Group Output Disable Function"]
659 #[inline(always)]
660 pub fn godf(&self) -> GODF_R {
661 GODF_R::new(((self.bits >> 26) & 1) != 0)
662 }
663 #[doc = "Bit 29 - External Input Noise Filter Enable"]
664 #[inline(always)]
665 pub fn nfen(&self) -> NFEN_R {
666 NFEN_R::new(((self.bits >> 29) & 1) != 0)
667 }
668 #[doc = "Bits 30:31 - External Input Noise Filter Clock Selection"]
669 #[inline(always)]
670 pub fn nfcs(&self) -> NFCS_R {
671 NFCS_R::new(((self.bits >> 30) & 3) as u8)
672 }
673}
674impl W {
675 #[doc = "Bit 0"]
676 #[inline(always)]
677 #[must_use]
678 pub fn uf(&mut self) -> UF_W<0> {
679 UF_W::new(self)
680 }
681 #[doc = "Bit 1"]
682 #[inline(always)]
683 #[must_use]
684 pub fn vf(&mut self) -> VF_W<1> {
685 VF_W::new(self)
686 }
687 #[doc = "Bit 2"]
688 #[inline(always)]
689 #[must_use]
690 pub fn wf(&mut self) -> WF_W<2> {
691 WF_W::new(self)
692 }
693 #[doc = "Bit 8 - Enable-Phase Output Control"]
694 #[inline(always)]
695 #[must_use]
696 pub fn en(&mut self) -> EN_W<8> {
697 EN_W::new(self)
698 }
699 #[doc = "Bit 16 - External Feedback Signal Enable"]
700 #[inline(always)]
701 #[must_use]
702 pub fn fb(&mut self) -> FB_W<16> {
703 FB_W::new(self)
704 }
705 #[doc = "Bit 17 - Positive-Phase Output (P) Control"]
706 #[inline(always)]
707 #[must_use]
708 pub fn p(&mut self) -> P_W<17> {
709 P_W::new(self)
710 }
711 #[doc = "Bit 18 - Negative-Phase Output (N) Control"]
712 #[inline(always)]
713 #[must_use]
714 pub fn n(&mut self) -> N_W<18> {
715 N_W::new(self)
716 }
717 #[doc = "Bit 19 - Invert-Phase Output Control"]
718 #[inline(always)]
719 #[must_use]
720 pub fn inv(&mut self) -> INV_W<19> {
721 INV_W::new(self)
722 }
723 #[doc = "Bit 20 - Output Phase Rotation Direction Reversal Control"]
724 #[inline(always)]
725 #[must_use]
726 pub fn rv(&mut self) -> RV_W<20> {
727 RV_W::new(self)
728 }
729 #[doc = "Bit 21 - Input Phase Alignment"]
730 #[inline(always)]
731 #[must_use]
732 pub fn align(&mut self) -> ALIGN_W<21> {
733 ALIGN_W::new(self)
734 }
735 #[doc = "Bits 24:25 - Output Disabled Source Selection"]
736 #[inline(always)]
737 #[must_use]
738 pub fn grp(&mut self) -> GRP_W<24> {
739 GRP_W::new(self)
740 }
741 #[doc = "Bit 26 - Group Output Disable Function"]
742 #[inline(always)]
743 #[must_use]
744 pub fn godf(&mut self) -> GODF_W<26> {
745 GODF_W::new(self)
746 }
747 #[doc = "Bit 29 - External Input Noise Filter Enable"]
748 #[inline(always)]
749 #[must_use]
750 pub fn nfen(&mut self) -> NFEN_W<29> {
751 NFEN_W::new(self)
752 }
753 #[doc = "Bits 30:31 - External Input Noise Filter Clock Selection"]
754 #[inline(always)]
755 #[must_use]
756 pub fn nfcs(&mut self) -> NFCS_W<30> {
757 NFCS_W::new(self)
758 }
759 #[doc = "Writes raw bits to the register."]
760 #[inline(always)]
761 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
762 self.0.bits(bits);
763 self
764 }
765}
766#[doc = "Output Phase Switching Control 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 [opscr](index.html) module"]
767pub struct OPSCR_SPEC;
768impl crate::RegisterSpec for OPSCR_SPEC {
769 type Ux = u32;
770}
771#[doc = "`read()` method returns [opscr::R](R) reader structure"]
772impl crate::Readable for OPSCR_SPEC {
773 type Reader = R;
774}
775#[doc = "`write(|w| ..)` method takes [opscr::W](W) writer structure"]
776impl crate::Writable for OPSCR_SPEC {
777 type Writer = W;
778 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
779 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
780}
781#[doc = "`reset()` method sets OPSCR to value 0"]
782impl crate::Resettable for OPSCR_SPEC {
783 const RESET_VALUE: Self::Ux = 0;
784}