ra6t2/gpt324/
gtber2.rs

1#[doc = "Register `GTBER2` reader"]
2pub struct R(crate::R<GTBER2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GTBER2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GTBER2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GTBER2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GTBER2` writer"]
17pub struct W(crate::W<GTBER2_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GTBER2_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<GTBER2_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GTBER2_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CCTCA` reader - Counter Clear Source GTCCRA Register Buffer Transfer Disable"]
38pub type CCTCA_R = crate::BitReader<CCTCA_A>;
39#[doc = "Counter Clear Source GTCCRA Register Buffer Transfer Disable\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum CCTCA_A {
42    #[doc = "0: Enable GTCCRA register buffer transfer by counter clear"]
43    _0 = 0,
44    #[doc = "1: Disable GTCCRA register buffer transfer by counter clear"]
45    _1 = 1,
46}
47impl From<CCTCA_A> for bool {
48    #[inline(always)]
49    fn from(variant: CCTCA_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl CCTCA_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> CCTCA_A {
57        match self.bits {
58            false => CCTCA_A::_0,
59            true => CCTCA_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 == CCTCA_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 == CCTCA_A::_1
71    }
72}
73#[doc = "Field `CCTCA` writer - Counter Clear Source GTCCRA Register Buffer Transfer Disable"]
74pub type CCTCA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTCA_A, O>;
75impl<'a, const O: u8> CCTCA_W<'a, O> {
76    #[doc = "Enable GTCCRA register buffer transfer by counter clear"]
77    #[inline(always)]
78    pub fn _0(self) -> &'a mut W {
79        self.variant(CCTCA_A::_0)
80    }
81    #[doc = "Disable GTCCRA register buffer transfer by counter clear"]
82    #[inline(always)]
83    pub fn _1(self) -> &'a mut W {
84        self.variant(CCTCA_A::_1)
85    }
86}
87#[doc = "Field `CCTCB` reader - Counter Clear Source GTCCRB Register Buffer Transfer Disable"]
88pub type CCTCB_R = crate::BitReader<CCTCB_A>;
89#[doc = "Counter Clear Source GTCCRB Register Buffer Transfer Disable\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum CCTCB_A {
92    #[doc = "0: Enable GTCCRB register buffer transfer by counter clear"]
93    _0 = 0,
94    #[doc = "1: Disable GTCCRB register buffer transfer by counter clear"]
95    _1 = 1,
96}
97impl From<CCTCB_A> for bool {
98    #[inline(always)]
99    fn from(variant: CCTCB_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl CCTCB_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> CCTCB_A {
107        match self.bits {
108            false => CCTCB_A::_0,
109            true => CCTCB_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 == CCTCB_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 == CCTCB_A::_1
121    }
122}
123#[doc = "Field `CCTCB` writer - Counter Clear Source GTCCRB Register Buffer Transfer Disable"]
124pub type CCTCB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTCB_A, O>;
125impl<'a, const O: u8> CCTCB_W<'a, O> {
126    #[doc = "Enable GTCCRB register buffer transfer by counter clear"]
127    #[inline(always)]
128    pub fn _0(self) -> &'a mut W {
129        self.variant(CCTCB_A::_0)
130    }
131    #[doc = "Disable GTCCRB register buffer transfer by counter clear"]
132    #[inline(always)]
133    pub fn _1(self) -> &'a mut W {
134        self.variant(CCTCB_A::_1)
135    }
136}
137#[doc = "Field `CCTPR` reader - Counter Clear Source GTPR Register Buffer Transfer Disable"]
138pub type CCTPR_R = crate::BitReader<CCTPR_A>;
139#[doc = "Counter Clear Source GTPR Register Buffer Transfer Disable\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum CCTPR_A {
142    #[doc = "0: Enable GTPR register buffer transfer by counter clear"]
143    _0 = 0,
144    #[doc = "1: Disable GTPR register buffer transfer by counter clear"]
145    _1 = 1,
146}
147impl From<CCTPR_A> for bool {
148    #[inline(always)]
149    fn from(variant: CCTPR_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl CCTPR_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> CCTPR_A {
157        match self.bits {
158            false => CCTPR_A::_0,
159            true => CCTPR_A::_1,
160        }
161    }
162    #[doc = "Checks if the value of the field is `_0`"]
163    #[inline(always)]
164    pub fn is_0(&self) -> bool {
165        *self == CCTPR_A::_0
166    }
167    #[doc = "Checks if the value of the field is `_1`"]
168    #[inline(always)]
169    pub fn is_1(&self) -> bool {
170        *self == CCTPR_A::_1
171    }
172}
173#[doc = "Field `CCTPR` writer - Counter Clear Source GTPR Register Buffer Transfer Disable"]
174pub type CCTPR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTPR_A, O>;
175impl<'a, const O: u8> CCTPR_W<'a, O> {
176    #[doc = "Enable GTPR register buffer transfer by counter clear"]
177    #[inline(always)]
178    pub fn _0(self) -> &'a mut W {
179        self.variant(CCTPR_A::_0)
180    }
181    #[doc = "Disable GTPR register buffer transfer by counter clear"]
182    #[inline(always)]
183    pub fn _1(self) -> &'a mut W {
184        self.variant(CCTPR_A::_1)
185    }
186}
187#[doc = "Field `CCTADA` reader - Counter Clear Source GTADTRA Register Buffer Transfer Disable"]
188pub type CCTADA_R = crate::BitReader<CCTADA_A>;
189#[doc = "Counter Clear Source GTADTRA Register Buffer Transfer Disable\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum CCTADA_A {
192    #[doc = "0: Enable GTADTRA register buffer transfer by counter clear"]
193    _0 = 0,
194    #[doc = "1: Disable GTADTRA register buffer transfer by counter clear"]
195    _1 = 1,
196}
197impl From<CCTADA_A> for bool {
198    #[inline(always)]
199    fn from(variant: CCTADA_A) -> Self {
200        variant as u8 != 0
201    }
202}
203impl CCTADA_R {
204    #[doc = "Get enumerated values variant"]
205    #[inline(always)]
206    pub fn variant(&self) -> CCTADA_A {
207        match self.bits {
208            false => CCTADA_A::_0,
209            true => CCTADA_A::_1,
210        }
211    }
212    #[doc = "Checks if the value of the field is `_0`"]
213    #[inline(always)]
214    pub fn is_0(&self) -> bool {
215        *self == CCTADA_A::_0
216    }
217    #[doc = "Checks if the value of the field is `_1`"]
218    #[inline(always)]
219    pub fn is_1(&self) -> bool {
220        *self == CCTADA_A::_1
221    }
222}
223#[doc = "Field `CCTADA` writer - Counter Clear Source GTADTRA Register Buffer Transfer Disable"]
224pub type CCTADA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTADA_A, O>;
225impl<'a, const O: u8> CCTADA_W<'a, O> {
226    #[doc = "Enable GTADTRA register buffer transfer by counter clear"]
227    #[inline(always)]
228    pub fn _0(self) -> &'a mut W {
229        self.variant(CCTADA_A::_0)
230    }
231    #[doc = "Disable GTADTRA register buffer transfer by counter clear"]
232    #[inline(always)]
233    pub fn _1(self) -> &'a mut W {
234        self.variant(CCTADA_A::_1)
235    }
236}
237#[doc = "Field `CCTADB` reader - Counter Clear Source GTADTRB Register Buffer Transfer Disable"]
238pub type CCTADB_R = crate::BitReader<CCTADB_A>;
239#[doc = "Counter Clear Source GTADTRB Register Buffer Transfer Disable\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241pub enum CCTADB_A {
242    #[doc = "0: Enable GTADTRB register buffer transfer by counter clear"]
243    _0 = 0,
244    #[doc = "1: Disable GTADTRB register buffer transfer by counter clear"]
245    _1 = 1,
246}
247impl From<CCTADB_A> for bool {
248    #[inline(always)]
249    fn from(variant: CCTADB_A) -> Self {
250        variant as u8 != 0
251    }
252}
253impl CCTADB_R {
254    #[doc = "Get enumerated values variant"]
255    #[inline(always)]
256    pub fn variant(&self) -> CCTADB_A {
257        match self.bits {
258            false => CCTADB_A::_0,
259            true => CCTADB_A::_1,
260        }
261    }
262    #[doc = "Checks if the value of the field is `_0`"]
263    #[inline(always)]
264    pub fn is_0(&self) -> bool {
265        *self == CCTADB_A::_0
266    }
267    #[doc = "Checks if the value of the field is `_1`"]
268    #[inline(always)]
269    pub fn is_1(&self) -> bool {
270        *self == CCTADB_A::_1
271    }
272}
273#[doc = "Field `CCTADB` writer - Counter Clear Source GTADTRB Register Buffer Transfer Disable"]
274pub type CCTADB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTADB_A, O>;
275impl<'a, const O: u8> CCTADB_W<'a, O> {
276    #[doc = "Enable GTADTRB register buffer transfer by counter clear"]
277    #[inline(always)]
278    pub fn _0(self) -> &'a mut W {
279        self.variant(CCTADB_A::_0)
280    }
281    #[doc = "Disable GTADTRB register buffer transfer by counter clear"]
282    #[inline(always)]
283    pub fn _1(self) -> &'a mut W {
284        self.variant(CCTADB_A::_1)
285    }
286}
287#[doc = "Field `CCTDV` reader - Counter Clear Source GTDVU/GTDVD Register Buffer Transfer Disable"]
288pub type CCTDV_R = crate::BitReader<CCTDV_A>;
289#[doc = "Counter Clear Source GTDVU/GTDVD Register Buffer Transfer Disable\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291pub enum CCTDV_A {
292    #[doc = "0: Enable GTDVU/GTDVD register buffer transfer by counter clear"]
293    _0 = 0,
294    #[doc = "1: Disable GTDVU/GTDVD register buffer transfer by counter clear"]
295    _1 = 1,
296}
297impl From<CCTDV_A> for bool {
298    #[inline(always)]
299    fn from(variant: CCTDV_A) -> Self {
300        variant as u8 != 0
301    }
302}
303impl CCTDV_R {
304    #[doc = "Get enumerated values variant"]
305    #[inline(always)]
306    pub fn variant(&self) -> CCTDV_A {
307        match self.bits {
308            false => CCTDV_A::_0,
309            true => CCTDV_A::_1,
310        }
311    }
312    #[doc = "Checks if the value of the field is `_0`"]
313    #[inline(always)]
314    pub fn is_0(&self) -> bool {
315        *self == CCTDV_A::_0
316    }
317    #[doc = "Checks if the value of the field is `_1`"]
318    #[inline(always)]
319    pub fn is_1(&self) -> bool {
320        *self == CCTDV_A::_1
321    }
322}
323#[doc = "Field `CCTDV` writer - Counter Clear Source GTDVU/GTDVD Register Buffer Transfer Disable"]
324pub type CCTDV_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CCTDV_A, O>;
325impl<'a, const O: u8> CCTDV_W<'a, O> {
326    #[doc = "Enable GTDVU/GTDVD register buffer transfer by counter clear"]
327    #[inline(always)]
328    pub fn _0(self) -> &'a mut W {
329        self.variant(CCTDV_A::_0)
330    }
331    #[doc = "Disable GTDVU/GTDVD register buffer transfer by counter clear"]
332    #[inline(always)]
333    pub fn _1(self) -> &'a mut W {
334        self.variant(CCTDV_A::_1)
335    }
336}
337#[doc = "Field `CMTCA` reader - Compare Match Source GTCCRA Register Buffer Transfer Enable"]
338pub type CMTCA_R = crate::FieldReader<u8, CMTCA_A>;
339#[doc = "Compare Match Source GTCCRA Register Buffer Transfer Enable\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq, Eq)]
341#[repr(u8)]
342pub enum CMTCA_A {
343    #[doc = "0: Disable GTCCRA register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
344    _00 = 0,
345    #[doc = "1: Enable GTCCRA register Buffer Transfer by compare match of GTCCRA register"]
346    _01 = 1,
347    #[doc = "2: Enable GTCCRA register Buffer Transfer by compare match of GTCCRB register"]
348    _10 = 2,
349    #[doc = "3: Enable GTCCRA register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
350    _11 = 3,
351}
352impl From<CMTCA_A> for u8 {
353    #[inline(always)]
354    fn from(variant: CMTCA_A) -> Self {
355        variant as _
356    }
357}
358impl CMTCA_R {
359    #[doc = "Get enumerated values variant"]
360    #[inline(always)]
361    pub fn variant(&self) -> CMTCA_A {
362        match self.bits {
363            0 => CMTCA_A::_00,
364            1 => CMTCA_A::_01,
365            2 => CMTCA_A::_10,
366            3 => CMTCA_A::_11,
367            _ => unreachable!(),
368        }
369    }
370    #[doc = "Checks if the value of the field is `_00`"]
371    #[inline(always)]
372    pub fn is_00(&self) -> bool {
373        *self == CMTCA_A::_00
374    }
375    #[doc = "Checks if the value of the field is `_01`"]
376    #[inline(always)]
377    pub fn is_01(&self) -> bool {
378        *self == CMTCA_A::_01
379    }
380    #[doc = "Checks if the value of the field is `_10`"]
381    #[inline(always)]
382    pub fn is_10(&self) -> bool {
383        *self == CMTCA_A::_10
384    }
385    #[doc = "Checks if the value of the field is `_11`"]
386    #[inline(always)]
387    pub fn is_11(&self) -> bool {
388        *self == CMTCA_A::_11
389    }
390}
391#[doc = "Field `CMTCA` writer - Compare Match Source GTCCRA Register Buffer Transfer Enable"]
392pub type CMTCA_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTBER2_SPEC, u8, CMTCA_A, 2, O>;
393impl<'a, const O: u8> CMTCA_W<'a, O> {
394    #[doc = "Disable GTCCRA register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
395    #[inline(always)]
396    pub fn _00(self) -> &'a mut W {
397        self.variant(CMTCA_A::_00)
398    }
399    #[doc = "Enable GTCCRA register Buffer Transfer by compare match of GTCCRA register"]
400    #[inline(always)]
401    pub fn _01(self) -> &'a mut W {
402        self.variant(CMTCA_A::_01)
403    }
404    #[doc = "Enable GTCCRA register Buffer Transfer by compare match of GTCCRB register"]
405    #[inline(always)]
406    pub fn _10(self) -> &'a mut W {
407        self.variant(CMTCA_A::_10)
408    }
409    #[doc = "Enable GTCCRA register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
410    #[inline(always)]
411    pub fn _11(self) -> &'a mut W {
412        self.variant(CMTCA_A::_11)
413    }
414}
415#[doc = "Field `CMTCB` reader - Compare Match Source GTCCRB Register Buffer Transfer Enable"]
416pub type CMTCB_R = crate::FieldReader<u8, CMTCB_A>;
417#[doc = "Compare Match Source GTCCRB Register Buffer Transfer Enable\n\nValue on reset: 0"]
418#[derive(Clone, Copy, Debug, PartialEq, Eq)]
419#[repr(u8)]
420pub enum CMTCB_A {
421    #[doc = "0: Disable GTCCRB register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
422    _00 = 0,
423    #[doc = "1: Enable GTCCRB register Buffer Transfer by compare match of GTCCRA register"]
424    _01 = 1,
425    #[doc = "2: Enable GTCCRB register Buffer Transfer by compare match of GTCCRB register"]
426    _10 = 2,
427    #[doc = "3: Enable GTCCRB register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
428    _11 = 3,
429}
430impl From<CMTCB_A> for u8 {
431    #[inline(always)]
432    fn from(variant: CMTCB_A) -> Self {
433        variant as _
434    }
435}
436impl CMTCB_R {
437    #[doc = "Get enumerated values variant"]
438    #[inline(always)]
439    pub fn variant(&self) -> CMTCB_A {
440        match self.bits {
441            0 => CMTCB_A::_00,
442            1 => CMTCB_A::_01,
443            2 => CMTCB_A::_10,
444            3 => CMTCB_A::_11,
445            _ => unreachable!(),
446        }
447    }
448    #[doc = "Checks if the value of the field is `_00`"]
449    #[inline(always)]
450    pub fn is_00(&self) -> bool {
451        *self == CMTCB_A::_00
452    }
453    #[doc = "Checks if the value of the field is `_01`"]
454    #[inline(always)]
455    pub fn is_01(&self) -> bool {
456        *self == CMTCB_A::_01
457    }
458    #[doc = "Checks if the value of the field is `_10`"]
459    #[inline(always)]
460    pub fn is_10(&self) -> bool {
461        *self == CMTCB_A::_10
462    }
463    #[doc = "Checks if the value of the field is `_11`"]
464    #[inline(always)]
465    pub fn is_11(&self) -> bool {
466        *self == CMTCB_A::_11
467    }
468}
469#[doc = "Field `CMTCB` writer - Compare Match Source GTCCRB Register Buffer Transfer Enable"]
470pub type CMTCB_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTBER2_SPEC, u8, CMTCB_A, 2, O>;
471impl<'a, const O: u8> CMTCB_W<'a, O> {
472    #[doc = "Disable GTCCRB register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
473    #[inline(always)]
474    pub fn _00(self) -> &'a mut W {
475        self.variant(CMTCB_A::_00)
476    }
477    #[doc = "Enable GTCCRB register Buffer Transfer by compare match of GTCCRA register"]
478    #[inline(always)]
479    pub fn _01(self) -> &'a mut W {
480        self.variant(CMTCB_A::_01)
481    }
482    #[doc = "Enable GTCCRB register Buffer Transfer by compare match of GTCCRB register"]
483    #[inline(always)]
484    pub fn _10(self) -> &'a mut W {
485        self.variant(CMTCB_A::_10)
486    }
487    #[doc = "Enable GTCCRB register Buffer Transfer by compare match of GTCCRA register and GTCCRB register"]
488    #[inline(always)]
489    pub fn _11(self) -> &'a mut W {
490        self.variant(CMTCB_A::_11)
491    }
492}
493#[doc = "Field `CMTADA` reader - Compare Match Source GTADTRA Register Buffer Transfer Enable"]
494pub type CMTADA_R = crate::BitReader<CMTADA_A>;
495#[doc = "Compare Match Source GTADTRA Register Buffer Transfer Enable\n\nValue on reset: 0"]
496#[derive(Clone, Copy, Debug, PartialEq, Eq)]
497pub enum CMTADA_A {
498    #[doc = "0: Disable GTADTRA register buffer transfer by compare match of GTADTRA register"]
499    _0 = 0,
500    #[doc = "1: Enable GTADTRA register buffer transfer by compare match of GTADTRA register"]
501    _1 = 1,
502}
503impl From<CMTADA_A> for bool {
504    #[inline(always)]
505    fn from(variant: CMTADA_A) -> Self {
506        variant as u8 != 0
507    }
508}
509impl CMTADA_R {
510    #[doc = "Get enumerated values variant"]
511    #[inline(always)]
512    pub fn variant(&self) -> CMTADA_A {
513        match self.bits {
514            false => CMTADA_A::_0,
515            true => CMTADA_A::_1,
516        }
517    }
518    #[doc = "Checks if the value of the field is `_0`"]
519    #[inline(always)]
520    pub fn is_0(&self) -> bool {
521        *self == CMTADA_A::_0
522    }
523    #[doc = "Checks if the value of the field is `_1`"]
524    #[inline(always)]
525    pub fn is_1(&self) -> bool {
526        *self == CMTADA_A::_1
527    }
528}
529#[doc = "Field `CMTADA` writer - Compare Match Source GTADTRA Register Buffer Transfer Enable"]
530pub type CMTADA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CMTADA_A, O>;
531impl<'a, const O: u8> CMTADA_W<'a, O> {
532    #[doc = "Disable GTADTRA register buffer transfer by compare match of GTADTRA register"]
533    #[inline(always)]
534    pub fn _0(self) -> &'a mut W {
535        self.variant(CMTADA_A::_0)
536    }
537    #[doc = "Enable GTADTRA register buffer transfer by compare match of GTADTRA register"]
538    #[inline(always)]
539    pub fn _1(self) -> &'a mut W {
540        self.variant(CMTADA_A::_1)
541    }
542}
543#[doc = "Field `CMTADB` reader - Compare Match Source GTADTRB Register Buffer Transfer Enable"]
544pub type CMTADB_R = crate::BitReader<CMTADB_A>;
545#[doc = "Compare Match Source GTADTRB Register Buffer Transfer Enable\n\nValue on reset: 0"]
546#[derive(Clone, Copy, Debug, PartialEq, Eq)]
547pub enum CMTADB_A {
548    #[doc = "0: Disable GTADTRB register buffer transfer by compare match of GTADTRB register"]
549    _0 = 0,
550    #[doc = "1: Enable GTADTRB register buffer transfer by compare match of GTADTRB register"]
551    _1 = 1,
552}
553impl From<CMTADB_A> for bool {
554    #[inline(always)]
555    fn from(variant: CMTADB_A) -> Self {
556        variant as u8 != 0
557    }
558}
559impl CMTADB_R {
560    #[doc = "Get enumerated values variant"]
561    #[inline(always)]
562    pub fn variant(&self) -> CMTADB_A {
563        match self.bits {
564            false => CMTADB_A::_0,
565            true => CMTADB_A::_1,
566        }
567    }
568    #[doc = "Checks if the value of the field is `_0`"]
569    #[inline(always)]
570    pub fn is_0(&self) -> bool {
571        *self == CMTADB_A::_0
572    }
573    #[doc = "Checks if the value of the field is `_1`"]
574    #[inline(always)]
575    pub fn is_1(&self) -> bool {
576        *self == CMTADB_A::_1
577    }
578}
579#[doc = "Field `CMTADB` writer - Compare Match Source GTADTRB Register Buffer Transfer Enable"]
580pub type CMTADB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CMTADB_A, O>;
581impl<'a, const O: u8> CMTADB_W<'a, O> {
582    #[doc = "Disable GTADTRB register buffer transfer by compare match of GTADTRB register"]
583    #[inline(always)]
584    pub fn _0(self) -> &'a mut W {
585        self.variant(CMTADB_A::_0)
586    }
587    #[doc = "Enable GTADTRB register buffer transfer by compare match of GTADTRB register"]
588    #[inline(always)]
589    pub fn _1(self) -> &'a mut W {
590        self.variant(CMTADB_A::_1)
591    }
592}
593#[doc = "Field `CPTCA` reader - Overflow/Underflow Source GTCCRA Register Buffer Transfer Disable"]
594pub type CPTCA_R = crate::BitReader<CPTCA_A>;
595#[doc = "Overflow/Underflow Source GTCCRA Register Buffer Transfer Disable\n\nValue on reset: 0"]
596#[derive(Clone, Copy, Debug, PartialEq, Eq)]
597pub enum CPTCA_A {
598    #[doc = "0: Enable GTCCRA register buffer transfer by overflow/underflow"]
599    _0 = 0,
600    #[doc = "1: Disable GTCCRA register buffer transfer by overflow/underflow"]
601    _1 = 1,
602}
603impl From<CPTCA_A> for bool {
604    #[inline(always)]
605    fn from(variant: CPTCA_A) -> Self {
606        variant as u8 != 0
607    }
608}
609impl CPTCA_R {
610    #[doc = "Get enumerated values variant"]
611    #[inline(always)]
612    pub fn variant(&self) -> CPTCA_A {
613        match self.bits {
614            false => CPTCA_A::_0,
615            true => CPTCA_A::_1,
616        }
617    }
618    #[doc = "Checks if the value of the field is `_0`"]
619    #[inline(always)]
620    pub fn is_0(&self) -> bool {
621        *self == CPTCA_A::_0
622    }
623    #[doc = "Checks if the value of the field is `_1`"]
624    #[inline(always)]
625    pub fn is_1(&self) -> bool {
626        *self == CPTCA_A::_1
627    }
628}
629#[doc = "Field `CPTCA` writer - Overflow/Underflow Source GTCCRA Register Buffer Transfer Disable"]
630pub type CPTCA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTCA_A, O>;
631impl<'a, const O: u8> CPTCA_W<'a, O> {
632    #[doc = "Enable GTCCRA register buffer transfer by overflow/underflow"]
633    #[inline(always)]
634    pub fn _0(self) -> &'a mut W {
635        self.variant(CPTCA_A::_0)
636    }
637    #[doc = "Disable GTCCRA register buffer transfer by overflow/underflow"]
638    #[inline(always)]
639    pub fn _1(self) -> &'a mut W {
640        self.variant(CPTCA_A::_1)
641    }
642}
643#[doc = "Field `CPTCB` reader - Overflow/Underflow Source GTCCRB Register Buffer Transfer Disable"]
644pub type CPTCB_R = crate::BitReader<CPTCB_A>;
645#[doc = "Overflow/Underflow Source GTCCRB Register Buffer Transfer Disable\n\nValue on reset: 0"]
646#[derive(Clone, Copy, Debug, PartialEq, Eq)]
647pub enum CPTCB_A {
648    #[doc = "0: Enable GTCCRB register buffer transfer by overflow/underflow"]
649    _0 = 0,
650    #[doc = "1: Disable GTCCRB register buffer transfer by overflow/underflow"]
651    _1 = 1,
652}
653impl From<CPTCB_A> for bool {
654    #[inline(always)]
655    fn from(variant: CPTCB_A) -> Self {
656        variant as u8 != 0
657    }
658}
659impl CPTCB_R {
660    #[doc = "Get enumerated values variant"]
661    #[inline(always)]
662    pub fn variant(&self) -> CPTCB_A {
663        match self.bits {
664            false => CPTCB_A::_0,
665            true => CPTCB_A::_1,
666        }
667    }
668    #[doc = "Checks if the value of the field is `_0`"]
669    #[inline(always)]
670    pub fn is_0(&self) -> bool {
671        *self == CPTCB_A::_0
672    }
673    #[doc = "Checks if the value of the field is `_1`"]
674    #[inline(always)]
675    pub fn is_1(&self) -> bool {
676        *self == CPTCB_A::_1
677    }
678}
679#[doc = "Field `CPTCB` writer - Overflow/Underflow Source GTCCRB Register Buffer Transfer Disable"]
680pub type CPTCB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTCB_A, O>;
681impl<'a, const O: u8> CPTCB_W<'a, O> {
682    #[doc = "Enable GTCCRB register buffer transfer by overflow/underflow"]
683    #[inline(always)]
684    pub fn _0(self) -> &'a mut W {
685        self.variant(CPTCB_A::_0)
686    }
687    #[doc = "Disable GTCCRB register buffer transfer by overflow/underflow"]
688    #[inline(always)]
689    pub fn _1(self) -> &'a mut W {
690        self.variant(CPTCB_A::_1)
691    }
692}
693#[doc = "Field `CPTPR` reader - Overflow/Underflow Source GTPR Register Buffer Transfer Disable"]
694pub type CPTPR_R = crate::BitReader<CPTPR_A>;
695#[doc = "Overflow/Underflow Source GTPR Register Buffer Transfer Disable\n\nValue on reset: 0"]
696#[derive(Clone, Copy, Debug, PartialEq, Eq)]
697pub enum CPTPR_A {
698    #[doc = "0: Enable GTPR register buffer transfer by overflow/underflow"]
699    _0 = 0,
700    #[doc = "1: Disable GTPR register buffer transfer by overflow/underflow"]
701    _1 = 1,
702}
703impl From<CPTPR_A> for bool {
704    #[inline(always)]
705    fn from(variant: CPTPR_A) -> Self {
706        variant as u8 != 0
707    }
708}
709impl CPTPR_R {
710    #[doc = "Get enumerated values variant"]
711    #[inline(always)]
712    pub fn variant(&self) -> CPTPR_A {
713        match self.bits {
714            false => CPTPR_A::_0,
715            true => CPTPR_A::_1,
716        }
717    }
718    #[doc = "Checks if the value of the field is `_0`"]
719    #[inline(always)]
720    pub fn is_0(&self) -> bool {
721        *self == CPTPR_A::_0
722    }
723    #[doc = "Checks if the value of the field is `_1`"]
724    #[inline(always)]
725    pub fn is_1(&self) -> bool {
726        *self == CPTPR_A::_1
727    }
728}
729#[doc = "Field `CPTPR` writer - Overflow/Underflow Source GTPR Register Buffer Transfer Disable"]
730pub type CPTPR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTPR_A, O>;
731impl<'a, const O: u8> CPTPR_W<'a, O> {
732    #[doc = "Enable GTPR register buffer transfer by overflow/underflow"]
733    #[inline(always)]
734    pub fn _0(self) -> &'a mut W {
735        self.variant(CPTPR_A::_0)
736    }
737    #[doc = "Disable GTPR register buffer transfer by overflow/underflow"]
738    #[inline(always)]
739    pub fn _1(self) -> &'a mut W {
740        self.variant(CPTPR_A::_1)
741    }
742}
743#[doc = "Field `CPTADA` reader - Overflow/Underflow Source GTADTRA Register Buffer Transfer Disable"]
744pub type CPTADA_R = crate::BitReader<CPTADA_A>;
745#[doc = "Overflow/Underflow Source GTADTRA Register Buffer Transfer Disable\n\nValue on reset: 0"]
746#[derive(Clone, Copy, Debug, PartialEq, Eq)]
747pub enum CPTADA_A {
748    #[doc = "0: Enable GTADTRA register buffer transfer by overflow/underflow"]
749    _0 = 0,
750    #[doc = "1: Disable GTADTRA register buffer transfer by overflow/underflow"]
751    _1 = 1,
752}
753impl From<CPTADA_A> for bool {
754    #[inline(always)]
755    fn from(variant: CPTADA_A) -> Self {
756        variant as u8 != 0
757    }
758}
759impl CPTADA_R {
760    #[doc = "Get enumerated values variant"]
761    #[inline(always)]
762    pub fn variant(&self) -> CPTADA_A {
763        match self.bits {
764            false => CPTADA_A::_0,
765            true => CPTADA_A::_1,
766        }
767    }
768    #[doc = "Checks if the value of the field is `_0`"]
769    #[inline(always)]
770    pub fn is_0(&self) -> bool {
771        *self == CPTADA_A::_0
772    }
773    #[doc = "Checks if the value of the field is `_1`"]
774    #[inline(always)]
775    pub fn is_1(&self) -> bool {
776        *self == CPTADA_A::_1
777    }
778}
779#[doc = "Field `CPTADA` writer - Overflow/Underflow Source GTADTRA Register Buffer Transfer Disable"]
780pub type CPTADA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTADA_A, O>;
781impl<'a, const O: u8> CPTADA_W<'a, O> {
782    #[doc = "Enable GTADTRA register buffer transfer by overflow/underflow"]
783    #[inline(always)]
784    pub fn _0(self) -> &'a mut W {
785        self.variant(CPTADA_A::_0)
786    }
787    #[doc = "Disable GTADTRA register buffer transfer by overflow/underflow"]
788    #[inline(always)]
789    pub fn _1(self) -> &'a mut W {
790        self.variant(CPTADA_A::_1)
791    }
792}
793#[doc = "Field `CPTADB` reader - Overflow/Underflow Source GTADTRB Register Buffer Transfer Disable"]
794pub type CPTADB_R = crate::BitReader<CPTADB_A>;
795#[doc = "Overflow/Underflow Source GTADTRB Register Buffer Transfer Disable\n\nValue on reset: 0"]
796#[derive(Clone, Copy, Debug, PartialEq, Eq)]
797pub enum CPTADB_A {
798    #[doc = "0: Enable GTADTRB register buffer transfer by overflow/underflow"]
799    _0 = 0,
800    #[doc = "1: Disable GTADTRB register buffer transfer by overflow/underflow"]
801    _1 = 1,
802}
803impl From<CPTADB_A> for bool {
804    #[inline(always)]
805    fn from(variant: CPTADB_A) -> Self {
806        variant as u8 != 0
807    }
808}
809impl CPTADB_R {
810    #[doc = "Get enumerated values variant"]
811    #[inline(always)]
812    pub fn variant(&self) -> CPTADB_A {
813        match self.bits {
814            false => CPTADB_A::_0,
815            true => CPTADB_A::_1,
816        }
817    }
818    #[doc = "Checks if the value of the field is `_0`"]
819    #[inline(always)]
820    pub fn is_0(&self) -> bool {
821        *self == CPTADB_A::_0
822    }
823    #[doc = "Checks if the value of the field is `_1`"]
824    #[inline(always)]
825    pub fn is_1(&self) -> bool {
826        *self == CPTADB_A::_1
827    }
828}
829#[doc = "Field `CPTADB` writer - Overflow/Underflow Source GTADTRB Register Buffer Transfer Disable"]
830pub type CPTADB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTADB_A, O>;
831impl<'a, const O: u8> CPTADB_W<'a, O> {
832    #[doc = "Enable GTADTRB register buffer transfer by overflow/underflow"]
833    #[inline(always)]
834    pub fn _0(self) -> &'a mut W {
835        self.variant(CPTADB_A::_0)
836    }
837    #[doc = "Disable GTADTRB register buffer transfer by overflow/underflow"]
838    #[inline(always)]
839    pub fn _1(self) -> &'a mut W {
840        self.variant(CPTADB_A::_1)
841    }
842}
843#[doc = "Field `CPTDV` reader - Overflow/Underflow Source GTDVU/GTDVD Register Buffer Transfer Disable"]
844pub type CPTDV_R = crate::BitReader<CPTDV_A>;
845#[doc = "Overflow/Underflow Source GTDVU/GTDVD Register Buffer Transfer Disable\n\nValue on reset: 0"]
846#[derive(Clone, Copy, Debug, PartialEq, Eq)]
847pub enum CPTDV_A {
848    #[doc = "0: Enable GTDVU/GTDVD register buffer transfer by overflow/underflow"]
849    _0 = 0,
850    #[doc = "1: Disable GTDVU/GTDVD register buffer transfer by overflow/underflow"]
851    _1 = 1,
852}
853impl From<CPTDV_A> for bool {
854    #[inline(always)]
855    fn from(variant: CPTDV_A) -> Self {
856        variant as u8 != 0
857    }
858}
859impl CPTDV_R {
860    #[doc = "Get enumerated values variant"]
861    #[inline(always)]
862    pub fn variant(&self) -> CPTDV_A {
863        match self.bits {
864            false => CPTDV_A::_0,
865            true => CPTDV_A::_1,
866        }
867    }
868    #[doc = "Checks if the value of the field is `_0`"]
869    #[inline(always)]
870    pub fn is_0(&self) -> bool {
871        *self == CPTDV_A::_0
872    }
873    #[doc = "Checks if the value of the field is `_1`"]
874    #[inline(always)]
875    pub fn is_1(&self) -> bool {
876        *self == CPTDV_A::_1
877    }
878}
879#[doc = "Field `CPTDV` writer - Overflow/Underflow Source GTDVU/GTDVD Register Buffer Transfer Disable"]
880pub type CPTDV_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPTDV_A, O>;
881impl<'a, const O: u8> CPTDV_W<'a, O> {
882    #[doc = "Enable GTDVU/GTDVD register buffer transfer by overflow/underflow"]
883    #[inline(always)]
884    pub fn _0(self) -> &'a mut W {
885        self.variant(CPTDV_A::_0)
886    }
887    #[doc = "Disable GTDVU/GTDVD register buffer transfer by overflow/underflow"]
888    #[inline(always)]
889    pub fn _1(self) -> &'a mut W {
890        self.variant(CPTDV_A::_1)
891    }
892}
893#[doc = "Field `CP3DB` reader - Complementary PWM mode 3,4 Double Buffer select"]
894pub type CP3DB_R = crate::BitReader<CP3DB_A>;
895#[doc = "Complementary PWM mode 3,4 Double Buffer select\n\nValue on reset: 0"]
896#[derive(Clone, Copy, Debug, PartialEq, Eq)]
897pub enum CP3DB_A {
898    #[doc = "0: Disable double buffer function in complementary PWM mode 3, 4"]
899    _0 = 0,
900    #[doc = "1: Enable double buffer function in complementary PWM mode 3, 4"]
901    _1 = 1,
902}
903impl From<CP3DB_A> for bool {
904    #[inline(always)]
905    fn from(variant: CP3DB_A) -> Self {
906        variant as u8 != 0
907    }
908}
909impl CP3DB_R {
910    #[doc = "Get enumerated values variant"]
911    #[inline(always)]
912    pub fn variant(&self) -> CP3DB_A {
913        match self.bits {
914            false => CP3DB_A::_0,
915            true => CP3DB_A::_1,
916        }
917    }
918    #[doc = "Checks if the value of the field is `_0`"]
919    #[inline(always)]
920    pub fn is_0(&self) -> bool {
921        *self == CP3DB_A::_0
922    }
923    #[doc = "Checks if the value of the field is `_1`"]
924    #[inline(always)]
925    pub fn is_1(&self) -> bool {
926        *self == CP3DB_A::_1
927    }
928}
929#[doc = "Field `CP3DB` writer - Complementary PWM mode 3,4 Double Buffer select"]
930pub type CP3DB_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CP3DB_A, O>;
931impl<'a, const O: u8> CP3DB_W<'a, O> {
932    #[doc = "Disable double buffer function in complementary PWM mode 3, 4"]
933    #[inline(always)]
934    pub fn _0(self) -> &'a mut W {
935        self.variant(CP3DB_A::_0)
936    }
937    #[doc = "Enable double buffer function in complementary PWM mode 3, 4"]
938    #[inline(always)]
939    pub fn _1(self) -> &'a mut W {
940        self.variant(CP3DB_A::_1)
941    }
942}
943#[doc = "Field `CPBTD` reader - Complementary PWM mode Buffer Transfer Disable"]
944pub type CPBTD_R = crate::BitReader<CPBTD_A>;
945#[doc = "Complementary PWM mode Buffer Transfer Disable\n\nValue on reset: 0"]
946#[derive(Clone, Copy, Debug, PartialEq, Eq)]
947pub enum CPBTD_A {
948    #[doc = "0: Enable buffer transfer from temporary register to GTCCRC and GTPBR register"]
949    _0 = 0,
950    #[doc = "1: Disable buffer transfer from temporary register to GTCCRC and GTPBR register"]
951    _1 = 1,
952}
953impl From<CPBTD_A> for bool {
954    #[inline(always)]
955    fn from(variant: CPBTD_A) -> Self {
956        variant as u8 != 0
957    }
958}
959impl CPBTD_R {
960    #[doc = "Get enumerated values variant"]
961    #[inline(always)]
962    pub fn variant(&self) -> CPBTD_A {
963        match self.bits {
964            false => CPBTD_A::_0,
965            true => CPBTD_A::_1,
966        }
967    }
968    #[doc = "Checks if the value of the field is `_0`"]
969    #[inline(always)]
970    pub fn is_0(&self) -> bool {
971        *self == CPBTD_A::_0
972    }
973    #[doc = "Checks if the value of the field is `_1`"]
974    #[inline(always)]
975    pub fn is_1(&self) -> bool {
976        *self == CPBTD_A::_1
977    }
978}
979#[doc = "Field `CPBTD` writer - Complementary PWM mode Buffer Transfer Disable"]
980pub type CPBTD_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTBER2_SPEC, CPBTD_A, O>;
981impl<'a, const O: u8> CPBTD_W<'a, O> {
982    #[doc = "Enable buffer transfer from temporary register to GTCCRC and GTPBR register"]
983    #[inline(always)]
984    pub fn _0(self) -> &'a mut W {
985        self.variant(CPBTD_A::_0)
986    }
987    #[doc = "Disable buffer transfer from temporary register to GTCCRC and GTPBR register"]
988    #[inline(always)]
989    pub fn _1(self) -> &'a mut W {
990        self.variant(CPBTD_A::_1)
991    }
992}
993#[doc = "Field `OLTTA` reader - GTIOCnA Output Level Buffer Transfer Timing Select"]
994pub type OLTTA_R = crate::FieldReader<u8, OLTTA_A>;
995#[doc = "GTIOCnA Output Level Buffer Transfer Timing Select\n\nValue on reset: 0"]
996#[derive(Clone, Copy, Debug, PartialEq, Eq)]
997#[repr(u8)]
998pub enum OLTTA_A {
999    #[doc = "0: No transfer"]
1000    _00 = 0,
1001    #[doc = "1: Triangle waves, complementary PWM mode: Transfer at crest Saw waves: Transfer at the end of period"]
1002    _01 = 1,
1003    #[doc = "2: Triangle waves, complementary PWM mode: Transfer at trough Saw waves: Transfer by compare match of GTCCRA register"]
1004    _10 = 2,
1005    #[doc = "3: Triangle waves, complementary PWM mode: Transfer at both crest and trough Saw waves: Setting prohibited"]
1006    _11 = 3,
1007}
1008impl From<OLTTA_A> for u8 {
1009    #[inline(always)]
1010    fn from(variant: OLTTA_A) -> Self {
1011        variant as _
1012    }
1013}
1014impl OLTTA_R {
1015    #[doc = "Get enumerated values variant"]
1016    #[inline(always)]
1017    pub fn variant(&self) -> OLTTA_A {
1018        match self.bits {
1019            0 => OLTTA_A::_00,
1020            1 => OLTTA_A::_01,
1021            2 => OLTTA_A::_10,
1022            3 => OLTTA_A::_11,
1023            _ => unreachable!(),
1024        }
1025    }
1026    #[doc = "Checks if the value of the field is `_00`"]
1027    #[inline(always)]
1028    pub fn is_00(&self) -> bool {
1029        *self == OLTTA_A::_00
1030    }
1031    #[doc = "Checks if the value of the field is `_01`"]
1032    #[inline(always)]
1033    pub fn is_01(&self) -> bool {
1034        *self == OLTTA_A::_01
1035    }
1036    #[doc = "Checks if the value of the field is `_10`"]
1037    #[inline(always)]
1038    pub fn is_10(&self) -> bool {
1039        *self == OLTTA_A::_10
1040    }
1041    #[doc = "Checks if the value of the field is `_11`"]
1042    #[inline(always)]
1043    pub fn is_11(&self) -> bool {
1044        *self == OLTTA_A::_11
1045    }
1046}
1047#[doc = "Field `OLTTA` writer - GTIOCnA Output Level Buffer Transfer Timing Select"]
1048pub type OLTTA_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTBER2_SPEC, u8, OLTTA_A, 2, O>;
1049impl<'a, const O: u8> OLTTA_W<'a, O> {
1050    #[doc = "No transfer"]
1051    #[inline(always)]
1052    pub fn _00(self) -> &'a mut W {
1053        self.variant(OLTTA_A::_00)
1054    }
1055    #[doc = "Triangle waves, complementary PWM mode: Transfer at crest Saw waves: Transfer at the end of period"]
1056    #[inline(always)]
1057    pub fn _01(self) -> &'a mut W {
1058        self.variant(OLTTA_A::_01)
1059    }
1060    #[doc = "Triangle waves, complementary PWM mode: Transfer at trough Saw waves: Transfer by compare match of GTCCRA register"]
1061    #[inline(always)]
1062    pub fn _10(self) -> &'a mut W {
1063        self.variant(OLTTA_A::_10)
1064    }
1065    #[doc = "Triangle waves, complementary PWM mode: Transfer at both crest and trough Saw waves: Setting prohibited"]
1066    #[inline(always)]
1067    pub fn _11(self) -> &'a mut W {
1068        self.variant(OLTTA_A::_11)
1069    }
1070}
1071#[doc = "Field `OLTTB` reader - GTIOCnB Output Level Buffer Transfer Timing Select"]
1072pub type OLTTB_R = crate::FieldReader<u8, OLTTB_A>;
1073#[doc = "GTIOCnB Output Level Buffer Transfer Timing Select\n\nValue on reset: 0"]
1074#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1075#[repr(u8)]
1076pub enum OLTTB_A {
1077    #[doc = "0: No transfer"]
1078    _00 = 0,
1079    #[doc = "1: Triangle waves, complementary PWM mode: Transfer at crest Saw waves: Transfer at the end of period"]
1080    _01 = 1,
1081    #[doc = "2: Triangle waves, complementary PWM mode: Transfer at trough Saw waves: Transfer by compare match of GTCCRB register"]
1082    _10 = 2,
1083    #[doc = "3: Triangle waves, complementary PWM mode: Transfer at both crest and trough Saw waves: Setting prohibited"]
1084    _11 = 3,
1085}
1086impl From<OLTTB_A> for u8 {
1087    #[inline(always)]
1088    fn from(variant: OLTTB_A) -> Self {
1089        variant as _
1090    }
1091}
1092impl OLTTB_R {
1093    #[doc = "Get enumerated values variant"]
1094    #[inline(always)]
1095    pub fn variant(&self) -> OLTTB_A {
1096        match self.bits {
1097            0 => OLTTB_A::_00,
1098            1 => OLTTB_A::_01,
1099            2 => OLTTB_A::_10,
1100            3 => OLTTB_A::_11,
1101            _ => unreachable!(),
1102        }
1103    }
1104    #[doc = "Checks if the value of the field is `_00`"]
1105    #[inline(always)]
1106    pub fn is_00(&self) -> bool {
1107        *self == OLTTB_A::_00
1108    }
1109    #[doc = "Checks if the value of the field is `_01`"]
1110    #[inline(always)]
1111    pub fn is_01(&self) -> bool {
1112        *self == OLTTB_A::_01
1113    }
1114    #[doc = "Checks if the value of the field is `_10`"]
1115    #[inline(always)]
1116    pub fn is_10(&self) -> bool {
1117        *self == OLTTB_A::_10
1118    }
1119    #[doc = "Checks if the value of the field is `_11`"]
1120    #[inline(always)]
1121    pub fn is_11(&self) -> bool {
1122        *self == OLTTB_A::_11
1123    }
1124}
1125#[doc = "Field `OLTTB` writer - GTIOCnB Output Level Buffer Transfer Timing Select"]
1126pub type OLTTB_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTBER2_SPEC, u8, OLTTB_A, 2, O>;
1127impl<'a, const O: u8> OLTTB_W<'a, O> {
1128    #[doc = "No transfer"]
1129    #[inline(always)]
1130    pub fn _00(self) -> &'a mut W {
1131        self.variant(OLTTB_A::_00)
1132    }
1133    #[doc = "Triangle waves, complementary PWM mode: Transfer at crest Saw waves: Transfer at the end of period"]
1134    #[inline(always)]
1135    pub fn _01(self) -> &'a mut W {
1136        self.variant(OLTTB_A::_01)
1137    }
1138    #[doc = "Triangle waves, complementary PWM mode: Transfer at trough Saw waves: Transfer by compare match of GTCCRB register"]
1139    #[inline(always)]
1140    pub fn _10(self) -> &'a mut W {
1141        self.variant(OLTTB_A::_10)
1142    }
1143    #[doc = "Triangle waves, complementary PWM mode: Transfer at both crest and trough Saw waves: Setting prohibited"]
1144    #[inline(always)]
1145    pub fn _11(self) -> &'a mut W {
1146        self.variant(OLTTB_A::_11)
1147    }
1148}
1149impl R {
1150    #[doc = "Bit 0 - Counter Clear Source GTCCRA Register Buffer Transfer Disable"]
1151    #[inline(always)]
1152    pub fn cctca(&self) -> CCTCA_R {
1153        CCTCA_R::new((self.bits & 1) != 0)
1154    }
1155    #[doc = "Bit 1 - Counter Clear Source GTCCRB Register Buffer Transfer Disable"]
1156    #[inline(always)]
1157    pub fn cctcb(&self) -> CCTCB_R {
1158        CCTCB_R::new(((self.bits >> 1) & 1) != 0)
1159    }
1160    #[doc = "Bit 2 - Counter Clear Source GTPR Register Buffer Transfer Disable"]
1161    #[inline(always)]
1162    pub fn cctpr(&self) -> CCTPR_R {
1163        CCTPR_R::new(((self.bits >> 2) & 1) != 0)
1164    }
1165    #[doc = "Bit 3 - Counter Clear Source GTADTRA Register Buffer Transfer Disable"]
1166    #[inline(always)]
1167    pub fn cctada(&self) -> CCTADA_R {
1168        CCTADA_R::new(((self.bits >> 3) & 1) != 0)
1169    }
1170    #[doc = "Bit 4 - Counter Clear Source GTADTRB Register Buffer Transfer Disable"]
1171    #[inline(always)]
1172    pub fn cctadb(&self) -> CCTADB_R {
1173        CCTADB_R::new(((self.bits >> 4) & 1) != 0)
1174    }
1175    #[doc = "Bit 5 - Counter Clear Source GTDVU/GTDVD Register Buffer Transfer Disable"]
1176    #[inline(always)]
1177    pub fn cctdv(&self) -> CCTDV_R {
1178        CCTDV_R::new(((self.bits >> 5) & 1) != 0)
1179    }
1180    #[doc = "Bits 8:9 - Compare Match Source GTCCRA Register Buffer Transfer Enable"]
1181    #[inline(always)]
1182    pub fn cmtca(&self) -> CMTCA_R {
1183        CMTCA_R::new(((self.bits >> 8) & 3) as u8)
1184    }
1185    #[doc = "Bits 10:11 - Compare Match Source GTCCRB Register Buffer Transfer Enable"]
1186    #[inline(always)]
1187    pub fn cmtcb(&self) -> CMTCB_R {
1188        CMTCB_R::new(((self.bits >> 10) & 3) as u8)
1189    }
1190    #[doc = "Bit 13 - Compare Match Source GTADTRA Register Buffer Transfer Enable"]
1191    #[inline(always)]
1192    pub fn cmtada(&self) -> CMTADA_R {
1193        CMTADA_R::new(((self.bits >> 13) & 1) != 0)
1194    }
1195    #[doc = "Bit 14 - Compare Match Source GTADTRB Register Buffer Transfer Enable"]
1196    #[inline(always)]
1197    pub fn cmtadb(&self) -> CMTADB_R {
1198        CMTADB_R::new(((self.bits >> 14) & 1) != 0)
1199    }
1200    #[doc = "Bit 16 - Overflow/Underflow Source GTCCRA Register Buffer Transfer Disable"]
1201    #[inline(always)]
1202    pub fn cptca(&self) -> CPTCA_R {
1203        CPTCA_R::new(((self.bits >> 16) & 1) != 0)
1204    }
1205    #[doc = "Bit 17 - Overflow/Underflow Source GTCCRB Register Buffer Transfer Disable"]
1206    #[inline(always)]
1207    pub fn cptcb(&self) -> CPTCB_R {
1208        CPTCB_R::new(((self.bits >> 17) & 1) != 0)
1209    }
1210    #[doc = "Bit 18 - Overflow/Underflow Source GTPR Register Buffer Transfer Disable"]
1211    #[inline(always)]
1212    pub fn cptpr(&self) -> CPTPR_R {
1213        CPTPR_R::new(((self.bits >> 18) & 1) != 0)
1214    }
1215    #[doc = "Bit 19 - Overflow/Underflow Source GTADTRA Register Buffer Transfer Disable"]
1216    #[inline(always)]
1217    pub fn cptada(&self) -> CPTADA_R {
1218        CPTADA_R::new(((self.bits >> 19) & 1) != 0)
1219    }
1220    #[doc = "Bit 20 - Overflow/Underflow Source GTADTRB Register Buffer Transfer Disable"]
1221    #[inline(always)]
1222    pub fn cptadb(&self) -> CPTADB_R {
1223        CPTADB_R::new(((self.bits >> 20) & 1) != 0)
1224    }
1225    #[doc = "Bit 21 - Overflow/Underflow Source GTDVU/GTDVD Register Buffer Transfer Disable"]
1226    #[inline(always)]
1227    pub fn cptdv(&self) -> CPTDV_R {
1228        CPTDV_R::new(((self.bits >> 21) & 1) != 0)
1229    }
1230    #[doc = "Bit 24 - Complementary PWM mode 3,4 Double Buffer select"]
1231    #[inline(always)]
1232    pub fn cp3db(&self) -> CP3DB_R {
1233        CP3DB_R::new(((self.bits >> 24) & 1) != 0)
1234    }
1235    #[doc = "Bit 25 - Complementary PWM mode Buffer Transfer Disable"]
1236    #[inline(always)]
1237    pub fn cpbtd(&self) -> CPBTD_R {
1238        CPBTD_R::new(((self.bits >> 25) & 1) != 0)
1239    }
1240    #[doc = "Bits 26:27 - GTIOCnA Output Level Buffer Transfer Timing Select"]
1241    #[inline(always)]
1242    pub fn oltta(&self) -> OLTTA_R {
1243        OLTTA_R::new(((self.bits >> 26) & 3) as u8)
1244    }
1245    #[doc = "Bits 28:29 - GTIOCnB Output Level Buffer Transfer Timing Select"]
1246    #[inline(always)]
1247    pub fn olttb(&self) -> OLTTB_R {
1248        OLTTB_R::new(((self.bits >> 28) & 3) as u8)
1249    }
1250}
1251impl W {
1252    #[doc = "Bit 0 - Counter Clear Source GTCCRA Register Buffer Transfer Disable"]
1253    #[inline(always)]
1254    #[must_use]
1255    pub fn cctca(&mut self) -> CCTCA_W<0> {
1256        CCTCA_W::new(self)
1257    }
1258    #[doc = "Bit 1 - Counter Clear Source GTCCRB Register Buffer Transfer Disable"]
1259    #[inline(always)]
1260    #[must_use]
1261    pub fn cctcb(&mut self) -> CCTCB_W<1> {
1262        CCTCB_W::new(self)
1263    }
1264    #[doc = "Bit 2 - Counter Clear Source GTPR Register Buffer Transfer Disable"]
1265    #[inline(always)]
1266    #[must_use]
1267    pub fn cctpr(&mut self) -> CCTPR_W<2> {
1268        CCTPR_W::new(self)
1269    }
1270    #[doc = "Bit 3 - Counter Clear Source GTADTRA Register Buffer Transfer Disable"]
1271    #[inline(always)]
1272    #[must_use]
1273    pub fn cctada(&mut self) -> CCTADA_W<3> {
1274        CCTADA_W::new(self)
1275    }
1276    #[doc = "Bit 4 - Counter Clear Source GTADTRB Register Buffer Transfer Disable"]
1277    #[inline(always)]
1278    #[must_use]
1279    pub fn cctadb(&mut self) -> CCTADB_W<4> {
1280        CCTADB_W::new(self)
1281    }
1282    #[doc = "Bit 5 - Counter Clear Source GTDVU/GTDVD Register Buffer Transfer Disable"]
1283    #[inline(always)]
1284    #[must_use]
1285    pub fn cctdv(&mut self) -> CCTDV_W<5> {
1286        CCTDV_W::new(self)
1287    }
1288    #[doc = "Bits 8:9 - Compare Match Source GTCCRA Register Buffer Transfer Enable"]
1289    #[inline(always)]
1290    #[must_use]
1291    pub fn cmtca(&mut self) -> CMTCA_W<8> {
1292        CMTCA_W::new(self)
1293    }
1294    #[doc = "Bits 10:11 - Compare Match Source GTCCRB Register Buffer Transfer Enable"]
1295    #[inline(always)]
1296    #[must_use]
1297    pub fn cmtcb(&mut self) -> CMTCB_W<10> {
1298        CMTCB_W::new(self)
1299    }
1300    #[doc = "Bit 13 - Compare Match Source GTADTRA Register Buffer Transfer Enable"]
1301    #[inline(always)]
1302    #[must_use]
1303    pub fn cmtada(&mut self) -> CMTADA_W<13> {
1304        CMTADA_W::new(self)
1305    }
1306    #[doc = "Bit 14 - Compare Match Source GTADTRB Register Buffer Transfer Enable"]
1307    #[inline(always)]
1308    #[must_use]
1309    pub fn cmtadb(&mut self) -> CMTADB_W<14> {
1310        CMTADB_W::new(self)
1311    }
1312    #[doc = "Bit 16 - Overflow/Underflow Source GTCCRA Register Buffer Transfer Disable"]
1313    #[inline(always)]
1314    #[must_use]
1315    pub fn cptca(&mut self) -> CPTCA_W<16> {
1316        CPTCA_W::new(self)
1317    }
1318    #[doc = "Bit 17 - Overflow/Underflow Source GTCCRB Register Buffer Transfer Disable"]
1319    #[inline(always)]
1320    #[must_use]
1321    pub fn cptcb(&mut self) -> CPTCB_W<17> {
1322        CPTCB_W::new(self)
1323    }
1324    #[doc = "Bit 18 - Overflow/Underflow Source GTPR Register Buffer Transfer Disable"]
1325    #[inline(always)]
1326    #[must_use]
1327    pub fn cptpr(&mut self) -> CPTPR_W<18> {
1328        CPTPR_W::new(self)
1329    }
1330    #[doc = "Bit 19 - Overflow/Underflow Source GTADTRA Register Buffer Transfer Disable"]
1331    #[inline(always)]
1332    #[must_use]
1333    pub fn cptada(&mut self) -> CPTADA_W<19> {
1334        CPTADA_W::new(self)
1335    }
1336    #[doc = "Bit 20 - Overflow/Underflow Source GTADTRB Register Buffer Transfer Disable"]
1337    #[inline(always)]
1338    #[must_use]
1339    pub fn cptadb(&mut self) -> CPTADB_W<20> {
1340        CPTADB_W::new(self)
1341    }
1342    #[doc = "Bit 21 - Overflow/Underflow Source GTDVU/GTDVD Register Buffer Transfer Disable"]
1343    #[inline(always)]
1344    #[must_use]
1345    pub fn cptdv(&mut self) -> CPTDV_W<21> {
1346        CPTDV_W::new(self)
1347    }
1348    #[doc = "Bit 24 - Complementary PWM mode 3,4 Double Buffer select"]
1349    #[inline(always)]
1350    #[must_use]
1351    pub fn cp3db(&mut self) -> CP3DB_W<24> {
1352        CP3DB_W::new(self)
1353    }
1354    #[doc = "Bit 25 - Complementary PWM mode Buffer Transfer Disable"]
1355    #[inline(always)]
1356    #[must_use]
1357    pub fn cpbtd(&mut self) -> CPBTD_W<25> {
1358        CPBTD_W::new(self)
1359    }
1360    #[doc = "Bits 26:27 - GTIOCnA Output Level Buffer Transfer Timing Select"]
1361    #[inline(always)]
1362    #[must_use]
1363    pub fn oltta(&mut self) -> OLTTA_W<26> {
1364        OLTTA_W::new(self)
1365    }
1366    #[doc = "Bits 28:29 - GTIOCnB Output Level Buffer Transfer Timing Select"]
1367    #[inline(always)]
1368    #[must_use]
1369    pub fn olttb(&mut self) -> OLTTB_W<28> {
1370        OLTTB_W::new(self)
1371    }
1372    #[doc = "Writes raw bits to the register."]
1373    #[inline(always)]
1374    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1375        self.0.bits(bits);
1376        self
1377    }
1378}
1379#[doc = "General PWM Timer Buffer Enable Register 2\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 [gtber2](index.html) module"]
1380pub struct GTBER2_SPEC;
1381impl crate::RegisterSpec for GTBER2_SPEC {
1382    type Ux = u32;
1383}
1384#[doc = "`read()` method returns [gtber2::R](R) reader structure"]
1385impl crate::Readable for GTBER2_SPEC {
1386    type Reader = R;
1387}
1388#[doc = "`write(|w| ..)` method takes [gtber2::W](W) writer structure"]
1389impl crate::Writable for GTBER2_SPEC {
1390    type Writer = W;
1391    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1392    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1393}
1394#[doc = "`reset()` method sets GTBER2 to value 0"]
1395impl crate::Resettable for GTBER2_SPEC {
1396    const RESET_VALUE: Self::Ux = 0;
1397}