ra6m1/gpt32eh0/
gtuddtyc.rs

1#[doc = "Register `GTUDDTYC` reader"]
2pub struct R(crate::R<GTUDDTYC_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GTUDDTYC_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GTUDDTYC_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GTUDDTYC_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GTUDDTYC` writer"]
17pub struct W(crate::W<GTUDDTYC_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GTUDDTYC_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<GTUDDTYC_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GTUDDTYC_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `UD` reader - Count Direction Setting"]
38pub type UD_R = crate::BitReader<UD_A>;
39#[doc = "Count Direction Setting\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum UD_A {
42    #[doc = "0: Count down on GTCNT"]
43    _0 = 0,
44    #[doc = "1: Counts up on GTCNT"]
45    _1 = 1,
46}
47impl From<UD_A> for bool {
48    #[inline(always)]
49    fn from(variant: UD_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl UD_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> UD_A {
57        match self.bits {
58            false => UD_A::_0,
59            true => UD_A::_1,
60        }
61    }
62    #[doc = "Checks if the value of the field is `_0`"]
63    #[inline(always)]
64    pub fn is_0(&self) -> bool {
65        *self == UD_A::_0
66    }
67    #[doc = "Checks if the value of the field is `_1`"]
68    #[inline(always)]
69    pub fn is_1(&self) -> bool {
70        *self == UD_A::_1
71    }
72}
73#[doc = "Field `UD` writer - Count Direction Setting"]
74pub type UD_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, UD_A, O>;
75impl<'a, const O: u8> UD_W<'a, O> {
76    #[doc = "Count down on GTCNT"]
77    #[inline(always)]
78    pub fn _0(self) -> &'a mut W {
79        self.variant(UD_A::_0)
80    }
81    #[doc = "Counts up on GTCNT"]
82    #[inline(always)]
83    pub fn _1(self) -> &'a mut W {
84        self.variant(UD_A::_1)
85    }
86}
87#[doc = "Field `UDF` reader - Forcible Count Direction Setting"]
88pub type UDF_R = crate::BitReader<UDF_A>;
89#[doc = "Forcible Count Direction Setting\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum UDF_A {
92    #[doc = "0: Do not force setting"]
93    _0 = 0,
94    #[doc = "1: Force setting"]
95    _1 = 1,
96}
97impl From<UDF_A> for bool {
98    #[inline(always)]
99    fn from(variant: UDF_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl UDF_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> UDF_A {
107        match self.bits {
108            false => UDF_A::_0,
109            true => UDF_A::_1,
110        }
111    }
112    #[doc = "Checks if the value of the field is `_0`"]
113    #[inline(always)]
114    pub fn is_0(&self) -> bool {
115        *self == UDF_A::_0
116    }
117    #[doc = "Checks if the value of the field is `_1`"]
118    #[inline(always)]
119    pub fn is_1(&self) -> bool {
120        *self == UDF_A::_1
121    }
122}
123#[doc = "Field `UDF` writer - Forcible Count Direction Setting"]
124pub type UDF_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, UDF_A, O>;
125impl<'a, const O: u8> UDF_W<'a, O> {
126    #[doc = "Do not force setting"]
127    #[inline(always)]
128    pub fn _0(self) -> &'a mut W {
129        self.variant(UDF_A::_0)
130    }
131    #[doc = "Force setting"]
132    #[inline(always)]
133    pub fn _1(self) -> &'a mut W {
134        self.variant(UDF_A::_1)
135    }
136}
137#[doc = "Field `OADTY` reader - GTIOCA Output Duty Setting"]
138pub type OADTY_R = crate::FieldReader<u8, OADTY_A>;
139#[doc = "GTIOCA Output Duty Setting\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141#[repr(u8)]
142pub enum OADTY_A {
143    #[doc = "0: GTIOCA pin duty is depend on compare match"]
144    _00 = 0,
145    #[doc = "1: GTIOCA pin duty is depend on compare match"]
146    _01 = 1,
147    #[doc = "2: GTIOCA pin duty 0 percent"]
148    _10 = 2,
149    #[doc = "3: GTIOCA pin duty 100 percent"]
150    _11 = 3,
151}
152impl From<OADTY_A> for u8 {
153    #[inline(always)]
154    fn from(variant: OADTY_A) -> Self {
155        variant as _
156    }
157}
158impl OADTY_R {
159    #[doc = "Get enumerated values variant"]
160    #[inline(always)]
161    pub fn variant(&self) -> OADTY_A {
162        match self.bits {
163            0 => OADTY_A::_00,
164            1 => OADTY_A::_01,
165            2 => OADTY_A::_10,
166            3 => OADTY_A::_11,
167            _ => unreachable!(),
168        }
169    }
170    #[doc = "Checks if the value of the field is `_00`"]
171    #[inline(always)]
172    pub fn is_00(&self) -> bool {
173        *self == OADTY_A::_00
174    }
175    #[doc = "Checks if the value of the field is `_01`"]
176    #[inline(always)]
177    pub fn is_01(&self) -> bool {
178        *self == OADTY_A::_01
179    }
180    #[doc = "Checks if the value of the field is `_10`"]
181    #[inline(always)]
182    pub fn is_10(&self) -> bool {
183        *self == OADTY_A::_10
184    }
185    #[doc = "Checks if the value of the field is `_11`"]
186    #[inline(always)]
187    pub fn is_11(&self) -> bool {
188        *self == OADTY_A::_11
189    }
190}
191#[doc = "Field `OADTY` writer - GTIOCA Output Duty Setting"]
192pub type OADTY_W<'a, const O: u8> =
193    crate::FieldWriterSafe<'a, u32, GTUDDTYC_SPEC, u8, OADTY_A, 2, O>;
194impl<'a, const O: u8> OADTY_W<'a, O> {
195    #[doc = "GTIOCA pin duty is depend on compare match"]
196    #[inline(always)]
197    pub fn _00(self) -> &'a mut W {
198        self.variant(OADTY_A::_00)
199    }
200    #[doc = "GTIOCA pin duty is depend on compare match"]
201    #[inline(always)]
202    pub fn _01(self) -> &'a mut W {
203        self.variant(OADTY_A::_01)
204    }
205    #[doc = "GTIOCA pin duty 0 percent"]
206    #[inline(always)]
207    pub fn _10(self) -> &'a mut W {
208        self.variant(OADTY_A::_10)
209    }
210    #[doc = "GTIOCA pin duty 100 percent"]
211    #[inline(always)]
212    pub fn _11(self) -> &'a mut W {
213        self.variant(OADTY_A::_11)
214    }
215}
216#[doc = "Field `OADTYF` reader - Forcible GTIOCA Output Duty Setting"]
217pub type OADTYF_R = crate::BitReader<OADTYF_A>;
218#[doc = "Forcible GTIOCA Output Duty Setting\n\nValue on reset: 0"]
219#[derive(Clone, Copy, Debug, PartialEq, Eq)]
220pub enum OADTYF_A {
221    #[doc = "0: Do not force setting"]
222    _0 = 0,
223    #[doc = "1: Force setting"]
224    _1 = 1,
225}
226impl From<OADTYF_A> for bool {
227    #[inline(always)]
228    fn from(variant: OADTYF_A) -> Self {
229        variant as u8 != 0
230    }
231}
232impl OADTYF_R {
233    #[doc = "Get enumerated values variant"]
234    #[inline(always)]
235    pub fn variant(&self) -> OADTYF_A {
236        match self.bits {
237            false => OADTYF_A::_0,
238            true => OADTYF_A::_1,
239        }
240    }
241    #[doc = "Checks if the value of the field is `_0`"]
242    #[inline(always)]
243    pub fn is_0(&self) -> bool {
244        *self == OADTYF_A::_0
245    }
246    #[doc = "Checks if the value of the field is `_1`"]
247    #[inline(always)]
248    pub fn is_1(&self) -> bool {
249        *self == OADTYF_A::_1
250    }
251}
252#[doc = "Field `OADTYF` writer - Forcible GTIOCA Output Duty Setting"]
253pub type OADTYF_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, OADTYF_A, O>;
254impl<'a, const O: u8> OADTYF_W<'a, O> {
255    #[doc = "Do not force setting"]
256    #[inline(always)]
257    pub fn _0(self) -> &'a mut W {
258        self.variant(OADTYF_A::_0)
259    }
260    #[doc = "Force setting"]
261    #[inline(always)]
262    pub fn _1(self) -> &'a mut W {
263        self.variant(OADTYF_A::_1)
264    }
265}
266#[doc = "Field `OADTYR` reader - GTIOCA Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
267pub type OADTYR_R = crate::BitReader<OADTYR_A>;
268#[doc = "GTIOCA Output Value Selecting after Releasing 0 percent/100 percent Duty Setting\n\nValue on reset: 0"]
269#[derive(Clone, Copy, Debug, PartialEq, Eq)]
270pub enum OADTYR_A {
271    #[doc = "0: Apply output value set in 0 percent/100 percent duty to GTIOA\\[3:2\\]
272function after releasing 0 percent/100 percent duty setting."]
273    _0 = 0,
274    #[doc = "1: Apply masked compare match output value to GTIOA\\[3:2\\]
275function after releasing 0 percent/100 percent duty setting."]
276    _1 = 1,
277}
278impl From<OADTYR_A> for bool {
279    #[inline(always)]
280    fn from(variant: OADTYR_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl OADTYR_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> OADTYR_A {
288        match self.bits {
289            false => OADTYR_A::_0,
290            true => OADTYR_A::_1,
291        }
292    }
293    #[doc = "Checks if the value of the field is `_0`"]
294    #[inline(always)]
295    pub fn is_0(&self) -> bool {
296        *self == OADTYR_A::_0
297    }
298    #[doc = "Checks if the value of the field is `_1`"]
299    #[inline(always)]
300    pub fn is_1(&self) -> bool {
301        *self == OADTYR_A::_1
302    }
303}
304#[doc = "Field `OADTYR` writer - GTIOCA Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
305pub type OADTYR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, OADTYR_A, O>;
306impl<'a, const O: u8> OADTYR_W<'a, O> {
307    #[doc = "Apply output value set in 0 percent/100 percent duty to GTIOA\\[3:2\\]
308function after releasing 0 percent/100 percent duty setting."]
309    #[inline(always)]
310    pub fn _0(self) -> &'a mut W {
311        self.variant(OADTYR_A::_0)
312    }
313    #[doc = "Apply masked compare match output value to GTIOA\\[3:2\\]
314function after releasing 0 percent/100 percent duty setting."]
315    #[inline(always)]
316    pub fn _1(self) -> &'a mut W {
317        self.variant(OADTYR_A::_1)
318    }
319}
320#[doc = "Field `OBDTY` reader - GTIOCB Output Duty Setting"]
321pub type OBDTY_R = crate::FieldReader<u8, OBDTY_A>;
322#[doc = "GTIOCB Output Duty Setting\n\nValue on reset: 0"]
323#[derive(Clone, Copy, Debug, PartialEq, Eq)]
324#[repr(u8)]
325pub enum OBDTY_A {
326    #[doc = "0: GTIOCB pin duty is depend on compare match"]
327    _00 = 0,
328    #[doc = "1: GTIOCB pin duty is depend on compare match"]
329    _01 = 1,
330    #[doc = "2: GTIOCB pin duty 0percent"]
331    _10 = 2,
332    #[doc = "3: GTIOCB pin duty 100percent"]
333    _11 = 3,
334}
335impl From<OBDTY_A> for u8 {
336    #[inline(always)]
337    fn from(variant: OBDTY_A) -> Self {
338        variant as _
339    }
340}
341impl OBDTY_R {
342    #[doc = "Get enumerated values variant"]
343    #[inline(always)]
344    pub fn variant(&self) -> OBDTY_A {
345        match self.bits {
346            0 => OBDTY_A::_00,
347            1 => OBDTY_A::_01,
348            2 => OBDTY_A::_10,
349            3 => OBDTY_A::_11,
350            _ => unreachable!(),
351        }
352    }
353    #[doc = "Checks if the value of the field is `_00`"]
354    #[inline(always)]
355    pub fn is_00(&self) -> bool {
356        *self == OBDTY_A::_00
357    }
358    #[doc = "Checks if the value of the field is `_01`"]
359    #[inline(always)]
360    pub fn is_01(&self) -> bool {
361        *self == OBDTY_A::_01
362    }
363    #[doc = "Checks if the value of the field is `_10`"]
364    #[inline(always)]
365    pub fn is_10(&self) -> bool {
366        *self == OBDTY_A::_10
367    }
368    #[doc = "Checks if the value of the field is `_11`"]
369    #[inline(always)]
370    pub fn is_11(&self) -> bool {
371        *self == OBDTY_A::_11
372    }
373}
374#[doc = "Field `OBDTY` writer - GTIOCB Output Duty Setting"]
375pub type OBDTY_W<'a, const O: u8> =
376    crate::FieldWriterSafe<'a, u32, GTUDDTYC_SPEC, u8, OBDTY_A, 2, O>;
377impl<'a, const O: u8> OBDTY_W<'a, O> {
378    #[doc = "GTIOCB pin duty is depend on compare match"]
379    #[inline(always)]
380    pub fn _00(self) -> &'a mut W {
381        self.variant(OBDTY_A::_00)
382    }
383    #[doc = "GTIOCB pin duty is depend on compare match"]
384    #[inline(always)]
385    pub fn _01(self) -> &'a mut W {
386        self.variant(OBDTY_A::_01)
387    }
388    #[doc = "GTIOCB pin duty 0percent"]
389    #[inline(always)]
390    pub fn _10(self) -> &'a mut W {
391        self.variant(OBDTY_A::_10)
392    }
393    #[doc = "GTIOCB pin duty 100percent"]
394    #[inline(always)]
395    pub fn _11(self) -> &'a mut W {
396        self.variant(OBDTY_A::_11)
397    }
398}
399#[doc = "Field `OBDTYF` reader - Forcible GTIOCB Output Duty Setting"]
400pub type OBDTYF_R = crate::BitReader<OBDTYF_A>;
401#[doc = "Forcible GTIOCB Output Duty Setting\n\nValue on reset: 0"]
402#[derive(Clone, Copy, Debug, PartialEq, Eq)]
403pub enum OBDTYF_A {
404    #[doc = "0: Do not force setting"]
405    _0 = 0,
406    #[doc = "1: Force setting"]
407    _1 = 1,
408}
409impl From<OBDTYF_A> for bool {
410    #[inline(always)]
411    fn from(variant: OBDTYF_A) -> Self {
412        variant as u8 != 0
413    }
414}
415impl OBDTYF_R {
416    #[doc = "Get enumerated values variant"]
417    #[inline(always)]
418    pub fn variant(&self) -> OBDTYF_A {
419        match self.bits {
420            false => OBDTYF_A::_0,
421            true => OBDTYF_A::_1,
422        }
423    }
424    #[doc = "Checks if the value of the field is `_0`"]
425    #[inline(always)]
426    pub fn is_0(&self) -> bool {
427        *self == OBDTYF_A::_0
428    }
429    #[doc = "Checks if the value of the field is `_1`"]
430    #[inline(always)]
431    pub fn is_1(&self) -> bool {
432        *self == OBDTYF_A::_1
433    }
434}
435#[doc = "Field `OBDTYF` writer - Forcible GTIOCB Output Duty Setting"]
436pub type OBDTYF_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, OBDTYF_A, O>;
437impl<'a, const O: u8> OBDTYF_W<'a, O> {
438    #[doc = "Do not force setting"]
439    #[inline(always)]
440    pub fn _0(self) -> &'a mut W {
441        self.variant(OBDTYF_A::_0)
442    }
443    #[doc = "Force setting"]
444    #[inline(always)]
445    pub fn _1(self) -> &'a mut W {
446        self.variant(OBDTYF_A::_1)
447    }
448}
449#[doc = "Field `OBDTYR` reader - GTIOCB Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
450pub type OBDTYR_R = crate::BitReader<OBDTYR_A>;
451#[doc = "GTIOCB Output Value Selecting after Releasing 0 percent/100 percent Duty Setting\n\nValue on reset: 0"]
452#[derive(Clone, Copy, Debug, PartialEq, Eq)]
453pub enum OBDTYR_A {
454    #[doc = "0: Apply output value set in 0 percent/100 percent duty to GTIOB\\[3:2\\]
455function after releasing 0percent/100percent duty setting."]
456    _0 = 0,
457    #[doc = "1: Apply masked compare match output value to GTIOB\\[3:2\\]
458function after releasing 0percent/100percent duty setting."]
459    _1 = 1,
460}
461impl From<OBDTYR_A> for bool {
462    #[inline(always)]
463    fn from(variant: OBDTYR_A) -> Self {
464        variant as u8 != 0
465    }
466}
467impl OBDTYR_R {
468    #[doc = "Get enumerated values variant"]
469    #[inline(always)]
470    pub fn variant(&self) -> OBDTYR_A {
471        match self.bits {
472            false => OBDTYR_A::_0,
473            true => OBDTYR_A::_1,
474        }
475    }
476    #[doc = "Checks if the value of the field is `_0`"]
477    #[inline(always)]
478    pub fn is_0(&self) -> bool {
479        *self == OBDTYR_A::_0
480    }
481    #[doc = "Checks if the value of the field is `_1`"]
482    #[inline(always)]
483    pub fn is_1(&self) -> bool {
484        *self == OBDTYR_A::_1
485    }
486}
487#[doc = "Field `OBDTYR` writer - GTIOCB Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
488pub type OBDTYR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTUDDTYC_SPEC, OBDTYR_A, O>;
489impl<'a, const O: u8> OBDTYR_W<'a, O> {
490    #[doc = "Apply output value set in 0 percent/100 percent duty to GTIOB\\[3:2\\]
491function after releasing 0percent/100percent duty setting."]
492    #[inline(always)]
493    pub fn _0(self) -> &'a mut W {
494        self.variant(OBDTYR_A::_0)
495    }
496    #[doc = "Apply masked compare match output value to GTIOB\\[3:2\\]
497function after releasing 0percent/100percent duty setting."]
498    #[inline(always)]
499    pub fn _1(self) -> &'a mut W {
500        self.variant(OBDTYR_A::_1)
501    }
502}
503impl R {
504    #[doc = "Bit 0 - Count Direction Setting"]
505    #[inline(always)]
506    pub fn ud(&self) -> UD_R {
507        UD_R::new((self.bits & 1) != 0)
508    }
509    #[doc = "Bit 1 - Forcible Count Direction Setting"]
510    #[inline(always)]
511    pub fn udf(&self) -> UDF_R {
512        UDF_R::new(((self.bits >> 1) & 1) != 0)
513    }
514    #[doc = "Bits 16:17 - GTIOCA Output Duty Setting"]
515    #[inline(always)]
516    pub fn oadty(&self) -> OADTY_R {
517        OADTY_R::new(((self.bits >> 16) & 3) as u8)
518    }
519    #[doc = "Bit 18 - Forcible GTIOCA Output Duty Setting"]
520    #[inline(always)]
521    pub fn oadtyf(&self) -> OADTYF_R {
522        OADTYF_R::new(((self.bits >> 18) & 1) != 0)
523    }
524    #[doc = "Bit 19 - GTIOCA Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
525    #[inline(always)]
526    pub fn oadtyr(&self) -> OADTYR_R {
527        OADTYR_R::new(((self.bits >> 19) & 1) != 0)
528    }
529    #[doc = "Bits 24:25 - GTIOCB Output Duty Setting"]
530    #[inline(always)]
531    pub fn obdty(&self) -> OBDTY_R {
532        OBDTY_R::new(((self.bits >> 24) & 3) as u8)
533    }
534    #[doc = "Bit 26 - Forcible GTIOCB Output Duty Setting"]
535    #[inline(always)]
536    pub fn obdtyf(&self) -> OBDTYF_R {
537        OBDTYF_R::new(((self.bits >> 26) & 1) != 0)
538    }
539    #[doc = "Bit 27 - GTIOCB Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
540    #[inline(always)]
541    pub fn obdtyr(&self) -> OBDTYR_R {
542        OBDTYR_R::new(((self.bits >> 27) & 1) != 0)
543    }
544}
545impl W {
546    #[doc = "Bit 0 - Count Direction Setting"]
547    #[inline(always)]
548    #[must_use]
549    pub fn ud(&mut self) -> UD_W<0> {
550        UD_W::new(self)
551    }
552    #[doc = "Bit 1 - Forcible Count Direction Setting"]
553    #[inline(always)]
554    #[must_use]
555    pub fn udf(&mut self) -> UDF_W<1> {
556        UDF_W::new(self)
557    }
558    #[doc = "Bits 16:17 - GTIOCA Output Duty Setting"]
559    #[inline(always)]
560    #[must_use]
561    pub fn oadty(&mut self) -> OADTY_W<16> {
562        OADTY_W::new(self)
563    }
564    #[doc = "Bit 18 - Forcible GTIOCA Output Duty Setting"]
565    #[inline(always)]
566    #[must_use]
567    pub fn oadtyf(&mut self) -> OADTYF_W<18> {
568        OADTYF_W::new(self)
569    }
570    #[doc = "Bit 19 - GTIOCA Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
571    #[inline(always)]
572    #[must_use]
573    pub fn oadtyr(&mut self) -> OADTYR_W<19> {
574        OADTYR_W::new(self)
575    }
576    #[doc = "Bits 24:25 - GTIOCB Output Duty Setting"]
577    #[inline(always)]
578    #[must_use]
579    pub fn obdty(&mut self) -> OBDTY_W<24> {
580        OBDTY_W::new(self)
581    }
582    #[doc = "Bit 26 - Forcible GTIOCB Output Duty Setting"]
583    #[inline(always)]
584    #[must_use]
585    pub fn obdtyf(&mut self) -> OBDTYF_W<26> {
586        OBDTYF_W::new(self)
587    }
588    #[doc = "Bit 27 - GTIOCB Output Value Selecting after Releasing 0 percent/100 percent Duty Setting"]
589    #[inline(always)]
590    #[must_use]
591    pub fn obdtyr(&mut self) -> OBDTYR_W<27> {
592        OBDTYR_W::new(self)
593    }
594    #[doc = "Writes raw bits to the register."]
595    #[inline(always)]
596    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
597        self.0.bits(bits);
598        self
599    }
600}
601#[doc = "General PWM Timer Count Direction and Duty Setting 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 [gtuddtyc](index.html) module"]
602pub struct GTUDDTYC_SPEC;
603impl crate::RegisterSpec for GTUDDTYC_SPEC {
604    type Ux = u32;
605}
606#[doc = "`read()` method returns [gtuddtyc::R](R) reader structure"]
607impl crate::Readable for GTUDDTYC_SPEC {
608    type Reader = R;
609}
610#[doc = "`write(|w| ..)` method takes [gtuddtyc::W](W) writer structure"]
611impl crate::Writable for GTUDDTYC_SPEC {
612    type Writer = W;
613    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
614    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
615}
616#[doc = "`reset()` method sets GTUDDTYC to value 0x01"]
617impl crate::Resettable for GTUDDTYC_SPEC {
618    const RESET_VALUE: Self::Ux = 0x01;
619}