1#[doc = "Register `GTIOR` reader"]
2pub struct R(crate::R<GTIOR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GTIOR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GTIOR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GTIOR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `GTIOR` writer"]
17pub struct W(crate::W<GTIOR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<GTIOR_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<GTIOR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<GTIOR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `GTIOA` reader - GTIOCnA Pin Function Select"]
38pub type GTIOA_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `GTIOA` writer - GTIOCnA Pin Function Select"]
40pub type GTIOA_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GTIOR_SPEC, u8, u8, 5, O>;
41#[doc = "Field `OADFLT` reader - GTIOCnA Pin Output Value Setting at the Count Stop"]
42pub type OADFLT_R = crate::BitReader<OADFLT_A>;
43#[doc = "GTIOCnA Pin Output Value Setting at the Count Stop\n\nValue on reset: 0"]
44#[derive(Clone, Copy, Debug, PartialEq, Eq)]
45pub enum OADFLT_A {
46 #[doc = "0: The GTIOCnA pin outputs low when counting stops"]
47 _0 = 0,
48 #[doc = "1: The GTIOCnA pin outputs high when counting stops"]
49 _1 = 1,
50}
51impl From<OADFLT_A> for bool {
52 #[inline(always)]
53 fn from(variant: OADFLT_A) -> Self {
54 variant as u8 != 0
55 }
56}
57impl OADFLT_R {
58 #[doc = "Get enumerated values variant"]
59 #[inline(always)]
60 pub fn variant(&self) -> OADFLT_A {
61 match self.bits {
62 false => OADFLT_A::_0,
63 true => OADFLT_A::_1,
64 }
65 }
66 #[doc = "Checks if the value of the field is `_0`"]
67 #[inline(always)]
68 pub fn is_0(&self) -> bool {
69 *self == OADFLT_A::_0
70 }
71 #[doc = "Checks if the value of the field is `_1`"]
72 #[inline(always)]
73 pub fn is_1(&self) -> bool {
74 *self == OADFLT_A::_1
75 }
76}
77#[doc = "Field `OADFLT` writer - GTIOCnA Pin Output Value Setting at the Count Stop"]
78pub type OADFLT_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OADFLT_A, O>;
79impl<'a, const O: u8> OADFLT_W<'a, O> {
80 #[doc = "The GTIOCnA pin outputs low when counting stops"]
81 #[inline(always)]
82 pub fn _0(self) -> &'a mut W {
83 self.variant(OADFLT_A::_0)
84 }
85 #[doc = "The GTIOCnA pin outputs high when counting stops"]
86 #[inline(always)]
87 pub fn _1(self) -> &'a mut W {
88 self.variant(OADFLT_A::_1)
89 }
90}
91#[doc = "Field `OAHLD` reader - GTIOCnA Pin Output Setting at the Start/Stop Count"]
92pub type OAHLD_R = crate::BitReader<OAHLD_A>;
93#[doc = "GTIOCnA Pin Output Setting at the Start/Stop Count\n\nValue on reset: 0"]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95pub enum OAHLD_A {
96 #[doc = "0: The GTIOCnA pin output level at the start or stop of counting depends on the register setting"]
97 _0 = 0,
98 #[doc = "1: The GTIOCnA pin output level is retained at the start or stop of counting"]
99 _1 = 1,
100}
101impl From<OAHLD_A> for bool {
102 #[inline(always)]
103 fn from(variant: OAHLD_A) -> Self {
104 variant as u8 != 0
105 }
106}
107impl OAHLD_R {
108 #[doc = "Get enumerated values variant"]
109 #[inline(always)]
110 pub fn variant(&self) -> OAHLD_A {
111 match self.bits {
112 false => OAHLD_A::_0,
113 true => OAHLD_A::_1,
114 }
115 }
116 #[doc = "Checks if the value of the field is `_0`"]
117 #[inline(always)]
118 pub fn is_0(&self) -> bool {
119 *self == OAHLD_A::_0
120 }
121 #[doc = "Checks if the value of the field is `_1`"]
122 #[inline(always)]
123 pub fn is_1(&self) -> bool {
124 *self == OAHLD_A::_1
125 }
126}
127#[doc = "Field `OAHLD` writer - GTIOCnA Pin Output Setting at the Start/Stop Count"]
128pub type OAHLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OAHLD_A, O>;
129impl<'a, const O: u8> OAHLD_W<'a, O> {
130 #[doc = "The GTIOCnA pin output level at the start or stop of counting depends on the register setting"]
131 #[inline(always)]
132 pub fn _0(self) -> &'a mut W {
133 self.variant(OAHLD_A::_0)
134 }
135 #[doc = "The GTIOCnA pin output level is retained at the start or stop of counting"]
136 #[inline(always)]
137 pub fn _1(self) -> &'a mut W {
138 self.variant(OAHLD_A::_1)
139 }
140}
141#[doc = "Field `OAE` reader - GTIOCnA Pin Output Enable"]
142pub type OAE_R = crate::BitReader<OAE_A>;
143#[doc = "GTIOCnA Pin Output Enable\n\nValue on reset: 0"]
144#[derive(Clone, Copy, Debug, PartialEq, Eq)]
145pub enum OAE_A {
146 #[doc = "0: Output is disabled"]
147 _0 = 0,
148 #[doc = "1: Output is enabled"]
149 _1 = 1,
150}
151impl From<OAE_A> for bool {
152 #[inline(always)]
153 fn from(variant: OAE_A) -> Self {
154 variant as u8 != 0
155 }
156}
157impl OAE_R {
158 #[doc = "Get enumerated values variant"]
159 #[inline(always)]
160 pub fn variant(&self) -> OAE_A {
161 match self.bits {
162 false => OAE_A::_0,
163 true => OAE_A::_1,
164 }
165 }
166 #[doc = "Checks if the value of the field is `_0`"]
167 #[inline(always)]
168 pub fn is_0(&self) -> bool {
169 *self == OAE_A::_0
170 }
171 #[doc = "Checks if the value of the field is `_1`"]
172 #[inline(always)]
173 pub fn is_1(&self) -> bool {
174 *self == OAE_A::_1
175 }
176}
177#[doc = "Field `OAE` writer - GTIOCnA Pin Output Enable"]
178pub type OAE_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OAE_A, O>;
179impl<'a, const O: u8> OAE_W<'a, O> {
180 #[doc = "Output is disabled"]
181 #[inline(always)]
182 pub fn _0(self) -> &'a mut W {
183 self.variant(OAE_A::_0)
184 }
185 #[doc = "Output is enabled"]
186 #[inline(always)]
187 pub fn _1(self) -> &'a mut W {
188 self.variant(OAE_A::_1)
189 }
190}
191#[doc = "Field `OADF` reader - GTIOCnA Pin Disable Value Setting"]
192pub type OADF_R = crate::FieldReader<u8, OADF_A>;
193#[doc = "GTIOCnA Pin Disable Value Setting\n\nValue on reset: 0"]
194#[derive(Clone, Copy, Debug, PartialEq, Eq)]
195#[repr(u8)]
196pub enum OADF_A {
197 #[doc = "0: None of the below options are specified"]
198 _00 = 0,
199 #[doc = "1: GTIOCnA pin is set to Hi-Z in response to controlling the output negation"]
200 _01 = 1,
201 #[doc = "2: GTIOCnA pin is set to 0 in response to controlling the output negation"]
202 _10 = 2,
203 #[doc = "3: GTIOCnA pin is set to 1 in response to controlling the output negation"]
204 _11 = 3,
205}
206impl From<OADF_A> for u8 {
207 #[inline(always)]
208 fn from(variant: OADF_A) -> Self {
209 variant as _
210 }
211}
212impl OADF_R {
213 #[doc = "Get enumerated values variant"]
214 #[inline(always)]
215 pub fn variant(&self) -> OADF_A {
216 match self.bits {
217 0 => OADF_A::_00,
218 1 => OADF_A::_01,
219 2 => OADF_A::_10,
220 3 => OADF_A::_11,
221 _ => unreachable!(),
222 }
223 }
224 #[doc = "Checks if the value of the field is `_00`"]
225 #[inline(always)]
226 pub fn is_00(&self) -> bool {
227 *self == OADF_A::_00
228 }
229 #[doc = "Checks if the value of the field is `_01`"]
230 #[inline(always)]
231 pub fn is_01(&self) -> bool {
232 *self == OADF_A::_01
233 }
234 #[doc = "Checks if the value of the field is `_10`"]
235 #[inline(always)]
236 pub fn is_10(&self) -> bool {
237 *self == OADF_A::_10
238 }
239 #[doc = "Checks if the value of the field is `_11`"]
240 #[inline(always)]
241 pub fn is_11(&self) -> bool {
242 *self == OADF_A::_11
243 }
244}
245#[doc = "Field `OADF` writer - GTIOCnA Pin Disable Value Setting"]
246pub type OADF_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTIOR_SPEC, u8, OADF_A, 2, O>;
247impl<'a, const O: u8> OADF_W<'a, O> {
248 #[doc = "None of the below options are specified"]
249 #[inline(always)]
250 pub fn _00(self) -> &'a mut W {
251 self.variant(OADF_A::_00)
252 }
253 #[doc = "GTIOCnA pin is set to Hi-Z in response to controlling the output negation"]
254 #[inline(always)]
255 pub fn _01(self) -> &'a mut W {
256 self.variant(OADF_A::_01)
257 }
258 #[doc = "GTIOCnA pin is set to 0 in response to controlling the output negation"]
259 #[inline(always)]
260 pub fn _10(self) -> &'a mut W {
261 self.variant(OADF_A::_10)
262 }
263 #[doc = "GTIOCnA pin is set to 1 in response to controlling the output negation"]
264 #[inline(always)]
265 pub fn _11(self) -> &'a mut W {
266 self.variant(OADF_A::_11)
267 }
268}
269#[doc = "Field `NFAEN` reader - Noise Filter A Enable"]
270pub type NFAEN_R = crate::BitReader<NFAEN_A>;
271#[doc = "Noise Filter A Enable\n\nValue on reset: 0"]
272#[derive(Clone, Copy, Debug, PartialEq, Eq)]
273pub enum NFAEN_A {
274 #[doc = "0: The noise filter for the GTIOCnA pin is disabled"]
275 _0 = 0,
276 #[doc = "1: The noise filter for the GTIOCnA pin is enabled"]
277 _1 = 1,
278}
279impl From<NFAEN_A> for bool {
280 #[inline(always)]
281 fn from(variant: NFAEN_A) -> Self {
282 variant as u8 != 0
283 }
284}
285impl NFAEN_R {
286 #[doc = "Get enumerated values variant"]
287 #[inline(always)]
288 pub fn variant(&self) -> NFAEN_A {
289 match self.bits {
290 false => NFAEN_A::_0,
291 true => NFAEN_A::_1,
292 }
293 }
294 #[doc = "Checks if the value of the field is `_0`"]
295 #[inline(always)]
296 pub fn is_0(&self) -> bool {
297 *self == NFAEN_A::_0
298 }
299 #[doc = "Checks if the value of the field is `_1`"]
300 #[inline(always)]
301 pub fn is_1(&self) -> bool {
302 *self == NFAEN_A::_1
303 }
304}
305#[doc = "Field `NFAEN` writer - Noise Filter A Enable"]
306pub type NFAEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, NFAEN_A, O>;
307impl<'a, const O: u8> NFAEN_W<'a, O> {
308 #[doc = "The noise filter for the GTIOCnA pin is disabled"]
309 #[inline(always)]
310 pub fn _0(self) -> &'a mut W {
311 self.variant(NFAEN_A::_0)
312 }
313 #[doc = "The noise filter for the GTIOCnA pin is enabled"]
314 #[inline(always)]
315 pub fn _1(self) -> &'a mut W {
316 self.variant(NFAEN_A::_1)
317 }
318}
319#[doc = "Field `NFCSA` reader - Noise Filter A Sampling Clock Select"]
320pub type NFCSA_R = crate::FieldReader<u8, NFCSA_A>;
321#[doc = "Noise Filter A Sampling Clock Select\n\nValue on reset: 0"]
322#[derive(Clone, Copy, Debug, PartialEq, Eq)]
323#[repr(u8)]
324pub enum NFCSA_A {
325 #[doc = "0: PCLKD/1"]
326 _00 = 0,
327 #[doc = "1: PCLKD/4"]
328 _01 = 1,
329 #[doc = "2: PCLKD/16"]
330 _10 = 2,
331 #[doc = "3: PCLKD/64"]
332 _11 = 3,
333}
334impl From<NFCSA_A> for u8 {
335 #[inline(always)]
336 fn from(variant: NFCSA_A) -> Self {
337 variant as _
338 }
339}
340impl NFCSA_R {
341 #[doc = "Get enumerated values variant"]
342 #[inline(always)]
343 pub fn variant(&self) -> NFCSA_A {
344 match self.bits {
345 0 => NFCSA_A::_00,
346 1 => NFCSA_A::_01,
347 2 => NFCSA_A::_10,
348 3 => NFCSA_A::_11,
349 _ => unreachable!(),
350 }
351 }
352 #[doc = "Checks if the value of the field is `_00`"]
353 #[inline(always)]
354 pub fn is_00(&self) -> bool {
355 *self == NFCSA_A::_00
356 }
357 #[doc = "Checks if the value of the field is `_01`"]
358 #[inline(always)]
359 pub fn is_01(&self) -> bool {
360 *self == NFCSA_A::_01
361 }
362 #[doc = "Checks if the value of the field is `_10`"]
363 #[inline(always)]
364 pub fn is_10(&self) -> bool {
365 *self == NFCSA_A::_10
366 }
367 #[doc = "Checks if the value of the field is `_11`"]
368 #[inline(always)]
369 pub fn is_11(&self) -> bool {
370 *self == NFCSA_A::_11
371 }
372}
373#[doc = "Field `NFCSA` writer - Noise Filter A Sampling Clock Select"]
374pub type NFCSA_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTIOR_SPEC, u8, NFCSA_A, 2, O>;
375impl<'a, const O: u8> NFCSA_W<'a, O> {
376 #[doc = "PCLKD/1"]
377 #[inline(always)]
378 pub fn _00(self) -> &'a mut W {
379 self.variant(NFCSA_A::_00)
380 }
381 #[doc = "PCLKD/4"]
382 #[inline(always)]
383 pub fn _01(self) -> &'a mut W {
384 self.variant(NFCSA_A::_01)
385 }
386 #[doc = "PCLKD/16"]
387 #[inline(always)]
388 pub fn _10(self) -> &'a mut W {
389 self.variant(NFCSA_A::_10)
390 }
391 #[doc = "PCLKD/64"]
392 #[inline(always)]
393 pub fn _11(self) -> &'a mut W {
394 self.variant(NFCSA_A::_11)
395 }
396}
397#[doc = "Field `GTIOB` reader - GTIOCnB Pin Function Select"]
398pub type GTIOB_R = crate::FieldReader<u8, u8>;
399#[doc = "Field `GTIOB` writer - GTIOCnB Pin Function Select"]
400pub type GTIOB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GTIOR_SPEC, u8, u8, 5, O>;
401#[doc = "Field `OBDFLT` reader - GTIOCnB Pin Output Value Setting at the Count Stop"]
402pub type OBDFLT_R = crate::BitReader<OBDFLT_A>;
403#[doc = "GTIOCnB Pin Output Value Setting at the Count Stop\n\nValue on reset: 0"]
404#[derive(Clone, Copy, Debug, PartialEq, Eq)]
405pub enum OBDFLT_A {
406 #[doc = "0: The GTIOCnB pin outputs low when counting stops"]
407 _0 = 0,
408 #[doc = "1: The GTIOCnB pin outputs high when counting stops"]
409 _1 = 1,
410}
411impl From<OBDFLT_A> for bool {
412 #[inline(always)]
413 fn from(variant: OBDFLT_A) -> Self {
414 variant as u8 != 0
415 }
416}
417impl OBDFLT_R {
418 #[doc = "Get enumerated values variant"]
419 #[inline(always)]
420 pub fn variant(&self) -> OBDFLT_A {
421 match self.bits {
422 false => OBDFLT_A::_0,
423 true => OBDFLT_A::_1,
424 }
425 }
426 #[doc = "Checks if the value of the field is `_0`"]
427 #[inline(always)]
428 pub fn is_0(&self) -> bool {
429 *self == OBDFLT_A::_0
430 }
431 #[doc = "Checks if the value of the field is `_1`"]
432 #[inline(always)]
433 pub fn is_1(&self) -> bool {
434 *self == OBDFLT_A::_1
435 }
436}
437#[doc = "Field `OBDFLT` writer - GTIOCnB Pin Output Value Setting at the Count Stop"]
438pub type OBDFLT_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OBDFLT_A, O>;
439impl<'a, const O: u8> OBDFLT_W<'a, O> {
440 #[doc = "The GTIOCnB pin outputs low when counting stops"]
441 #[inline(always)]
442 pub fn _0(self) -> &'a mut W {
443 self.variant(OBDFLT_A::_0)
444 }
445 #[doc = "The GTIOCnB pin outputs high when counting stops"]
446 #[inline(always)]
447 pub fn _1(self) -> &'a mut W {
448 self.variant(OBDFLT_A::_1)
449 }
450}
451#[doc = "Field `OBHLD` reader - GTIOCnB Pin Output Setting at the Start/Stop Count"]
452pub type OBHLD_R = crate::BitReader<OBHLD_A>;
453#[doc = "GTIOCnB Pin Output Setting at the Start/Stop Count\n\nValue on reset: 0"]
454#[derive(Clone, Copy, Debug, PartialEq, Eq)]
455pub enum OBHLD_A {
456 #[doc = "0: The GTIOCnB pin output level at the start/stop of counting depends on the register setting"]
457 _0 = 0,
458 #[doc = "1: The GTIOCnB pin output level is retained at the start/stop of counting"]
459 _1 = 1,
460}
461impl From<OBHLD_A> for bool {
462 #[inline(always)]
463 fn from(variant: OBHLD_A) -> Self {
464 variant as u8 != 0
465 }
466}
467impl OBHLD_R {
468 #[doc = "Get enumerated values variant"]
469 #[inline(always)]
470 pub fn variant(&self) -> OBHLD_A {
471 match self.bits {
472 false => OBHLD_A::_0,
473 true => OBHLD_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 == OBHLD_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 == OBHLD_A::_1
485 }
486}
487#[doc = "Field `OBHLD` writer - GTIOCnB Pin Output Setting at the Start/Stop Count"]
488pub type OBHLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OBHLD_A, O>;
489impl<'a, const O: u8> OBHLD_W<'a, O> {
490 #[doc = "The GTIOCnB pin output level at the start/stop of counting depends on the register setting"]
491 #[inline(always)]
492 pub fn _0(self) -> &'a mut W {
493 self.variant(OBHLD_A::_0)
494 }
495 #[doc = "The GTIOCnB pin output level is retained at the start/stop of counting"]
496 #[inline(always)]
497 pub fn _1(self) -> &'a mut W {
498 self.variant(OBHLD_A::_1)
499 }
500}
501#[doc = "Field `OBE` reader - GTIOCnB Pin Output Enable"]
502pub type OBE_R = crate::BitReader<OBE_A>;
503#[doc = "GTIOCnB Pin Output Enable\n\nValue on reset: 0"]
504#[derive(Clone, Copy, Debug, PartialEq, Eq)]
505pub enum OBE_A {
506 #[doc = "0: Output is disabled"]
507 _0 = 0,
508 #[doc = "1: Output is enabled"]
509 _1 = 1,
510}
511impl From<OBE_A> for bool {
512 #[inline(always)]
513 fn from(variant: OBE_A) -> Self {
514 variant as u8 != 0
515 }
516}
517impl OBE_R {
518 #[doc = "Get enumerated values variant"]
519 #[inline(always)]
520 pub fn variant(&self) -> OBE_A {
521 match self.bits {
522 false => OBE_A::_0,
523 true => OBE_A::_1,
524 }
525 }
526 #[doc = "Checks if the value of the field is `_0`"]
527 #[inline(always)]
528 pub fn is_0(&self) -> bool {
529 *self == OBE_A::_0
530 }
531 #[doc = "Checks if the value of the field is `_1`"]
532 #[inline(always)]
533 pub fn is_1(&self) -> bool {
534 *self == OBE_A::_1
535 }
536}
537#[doc = "Field `OBE` writer - GTIOCnB Pin Output Enable"]
538pub type OBE_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, OBE_A, O>;
539impl<'a, const O: u8> OBE_W<'a, O> {
540 #[doc = "Output is disabled"]
541 #[inline(always)]
542 pub fn _0(self) -> &'a mut W {
543 self.variant(OBE_A::_0)
544 }
545 #[doc = "Output is enabled"]
546 #[inline(always)]
547 pub fn _1(self) -> &'a mut W {
548 self.variant(OBE_A::_1)
549 }
550}
551#[doc = "Field `OBDF` reader - GTIOCnB Pin Disable Value Setting"]
552pub type OBDF_R = crate::FieldReader<u8, OBDF_A>;
553#[doc = "GTIOCnB Pin Disable Value Setting\n\nValue on reset: 0"]
554#[derive(Clone, Copy, Debug, PartialEq, Eq)]
555#[repr(u8)]
556pub enum OBDF_A {
557 #[doc = "0: None of the below options are specified"]
558 _00 = 0,
559 #[doc = "1: GTIOCnB pin is set to Hi-Z in response to controlling the output negation"]
560 _01 = 1,
561 #[doc = "2: GTIOCnB pin is set to 0 in response to controlling the output negation"]
562 _10 = 2,
563 #[doc = "3: GTIOCnB pin is set to 1 in response to controlling the output negation"]
564 _11 = 3,
565}
566impl From<OBDF_A> for u8 {
567 #[inline(always)]
568 fn from(variant: OBDF_A) -> Self {
569 variant as _
570 }
571}
572impl OBDF_R {
573 #[doc = "Get enumerated values variant"]
574 #[inline(always)]
575 pub fn variant(&self) -> OBDF_A {
576 match self.bits {
577 0 => OBDF_A::_00,
578 1 => OBDF_A::_01,
579 2 => OBDF_A::_10,
580 3 => OBDF_A::_11,
581 _ => unreachable!(),
582 }
583 }
584 #[doc = "Checks if the value of the field is `_00`"]
585 #[inline(always)]
586 pub fn is_00(&self) -> bool {
587 *self == OBDF_A::_00
588 }
589 #[doc = "Checks if the value of the field is `_01`"]
590 #[inline(always)]
591 pub fn is_01(&self) -> bool {
592 *self == OBDF_A::_01
593 }
594 #[doc = "Checks if the value of the field is `_10`"]
595 #[inline(always)]
596 pub fn is_10(&self) -> bool {
597 *self == OBDF_A::_10
598 }
599 #[doc = "Checks if the value of the field is `_11`"]
600 #[inline(always)]
601 pub fn is_11(&self) -> bool {
602 *self == OBDF_A::_11
603 }
604}
605#[doc = "Field `OBDF` writer - GTIOCnB Pin Disable Value Setting"]
606pub type OBDF_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTIOR_SPEC, u8, OBDF_A, 2, O>;
607impl<'a, const O: u8> OBDF_W<'a, O> {
608 #[doc = "None of the below options are specified"]
609 #[inline(always)]
610 pub fn _00(self) -> &'a mut W {
611 self.variant(OBDF_A::_00)
612 }
613 #[doc = "GTIOCnB pin is set to Hi-Z in response to controlling the output negation"]
614 #[inline(always)]
615 pub fn _01(self) -> &'a mut W {
616 self.variant(OBDF_A::_01)
617 }
618 #[doc = "GTIOCnB pin is set to 0 in response to controlling the output negation"]
619 #[inline(always)]
620 pub fn _10(self) -> &'a mut W {
621 self.variant(OBDF_A::_10)
622 }
623 #[doc = "GTIOCnB pin is set to 1 in response to controlling the output negation"]
624 #[inline(always)]
625 pub fn _11(self) -> &'a mut W {
626 self.variant(OBDF_A::_11)
627 }
628}
629#[doc = "Field `NFBEN` reader - Noise Filter B Enable"]
630pub type NFBEN_R = crate::BitReader<NFBEN_A>;
631#[doc = "Noise Filter B Enable\n\nValue on reset: 0"]
632#[derive(Clone, Copy, Debug, PartialEq, Eq)]
633pub enum NFBEN_A {
634 #[doc = "0: The noise filter for the GTIOCnB pin is disabled"]
635 _0 = 0,
636 #[doc = "1: The noise filter for the GTIOCnB pin is enabled"]
637 _1 = 1,
638}
639impl From<NFBEN_A> for bool {
640 #[inline(always)]
641 fn from(variant: NFBEN_A) -> Self {
642 variant as u8 != 0
643 }
644}
645impl NFBEN_R {
646 #[doc = "Get enumerated values variant"]
647 #[inline(always)]
648 pub fn variant(&self) -> NFBEN_A {
649 match self.bits {
650 false => NFBEN_A::_0,
651 true => NFBEN_A::_1,
652 }
653 }
654 #[doc = "Checks if the value of the field is `_0`"]
655 #[inline(always)]
656 pub fn is_0(&self) -> bool {
657 *self == NFBEN_A::_0
658 }
659 #[doc = "Checks if the value of the field is `_1`"]
660 #[inline(always)]
661 pub fn is_1(&self) -> bool {
662 *self == NFBEN_A::_1
663 }
664}
665#[doc = "Field `NFBEN` writer - Noise Filter B Enable"]
666pub type NFBEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GTIOR_SPEC, NFBEN_A, O>;
667impl<'a, const O: u8> NFBEN_W<'a, O> {
668 #[doc = "The noise filter for the GTIOCnB pin is disabled"]
669 #[inline(always)]
670 pub fn _0(self) -> &'a mut W {
671 self.variant(NFBEN_A::_0)
672 }
673 #[doc = "The noise filter for the GTIOCnB pin is enabled"]
674 #[inline(always)]
675 pub fn _1(self) -> &'a mut W {
676 self.variant(NFBEN_A::_1)
677 }
678}
679#[doc = "Field `NFCSB` reader - Noise Filter B Sampling Clock Select"]
680pub type NFCSB_R = crate::FieldReader<u8, NFCSB_A>;
681#[doc = "Noise Filter B Sampling Clock Select\n\nValue on reset: 0"]
682#[derive(Clone, Copy, Debug, PartialEq, Eq)]
683#[repr(u8)]
684pub enum NFCSB_A {
685 #[doc = "0: PCLKD/1"]
686 _00 = 0,
687 #[doc = "1: PCLKD/4"]
688 _01 = 1,
689 #[doc = "2: PCLKD/16"]
690 _10 = 2,
691 #[doc = "3: PCLKD/64"]
692 _11 = 3,
693}
694impl From<NFCSB_A> for u8 {
695 #[inline(always)]
696 fn from(variant: NFCSB_A) -> Self {
697 variant as _
698 }
699}
700impl NFCSB_R {
701 #[doc = "Get enumerated values variant"]
702 #[inline(always)]
703 pub fn variant(&self) -> NFCSB_A {
704 match self.bits {
705 0 => NFCSB_A::_00,
706 1 => NFCSB_A::_01,
707 2 => NFCSB_A::_10,
708 3 => NFCSB_A::_11,
709 _ => unreachable!(),
710 }
711 }
712 #[doc = "Checks if the value of the field is `_00`"]
713 #[inline(always)]
714 pub fn is_00(&self) -> bool {
715 *self == NFCSB_A::_00
716 }
717 #[doc = "Checks if the value of the field is `_01`"]
718 #[inline(always)]
719 pub fn is_01(&self) -> bool {
720 *self == NFCSB_A::_01
721 }
722 #[doc = "Checks if the value of the field is `_10`"]
723 #[inline(always)]
724 pub fn is_10(&self) -> bool {
725 *self == NFCSB_A::_10
726 }
727 #[doc = "Checks if the value of the field is `_11`"]
728 #[inline(always)]
729 pub fn is_11(&self) -> bool {
730 *self == NFCSB_A::_11
731 }
732}
733#[doc = "Field `NFCSB` writer - Noise Filter B Sampling Clock Select"]
734pub type NFCSB_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, GTIOR_SPEC, u8, NFCSB_A, 2, O>;
735impl<'a, const O: u8> NFCSB_W<'a, O> {
736 #[doc = "PCLKD/1"]
737 #[inline(always)]
738 pub fn _00(self) -> &'a mut W {
739 self.variant(NFCSB_A::_00)
740 }
741 #[doc = "PCLKD/4"]
742 #[inline(always)]
743 pub fn _01(self) -> &'a mut W {
744 self.variant(NFCSB_A::_01)
745 }
746 #[doc = "PCLKD/16"]
747 #[inline(always)]
748 pub fn _10(self) -> &'a mut W {
749 self.variant(NFCSB_A::_10)
750 }
751 #[doc = "PCLKD/64"]
752 #[inline(always)]
753 pub fn _11(self) -> &'a mut W {
754 self.variant(NFCSB_A::_11)
755 }
756}
757impl R {
758 #[doc = "Bits 0:4 - GTIOCnA Pin Function Select"]
759 #[inline(always)]
760 pub fn gtioa(&self) -> GTIOA_R {
761 GTIOA_R::new((self.bits & 0x1f) as u8)
762 }
763 #[doc = "Bit 6 - GTIOCnA Pin Output Value Setting at the Count Stop"]
764 #[inline(always)]
765 pub fn oadflt(&self) -> OADFLT_R {
766 OADFLT_R::new(((self.bits >> 6) & 1) != 0)
767 }
768 #[doc = "Bit 7 - GTIOCnA Pin Output Setting at the Start/Stop Count"]
769 #[inline(always)]
770 pub fn oahld(&self) -> OAHLD_R {
771 OAHLD_R::new(((self.bits >> 7) & 1) != 0)
772 }
773 #[doc = "Bit 8 - GTIOCnA Pin Output Enable"]
774 #[inline(always)]
775 pub fn oae(&self) -> OAE_R {
776 OAE_R::new(((self.bits >> 8) & 1) != 0)
777 }
778 #[doc = "Bits 9:10 - GTIOCnA Pin Disable Value Setting"]
779 #[inline(always)]
780 pub fn oadf(&self) -> OADF_R {
781 OADF_R::new(((self.bits >> 9) & 3) as u8)
782 }
783 #[doc = "Bit 13 - Noise Filter A Enable"]
784 #[inline(always)]
785 pub fn nfaen(&self) -> NFAEN_R {
786 NFAEN_R::new(((self.bits >> 13) & 1) != 0)
787 }
788 #[doc = "Bits 14:15 - Noise Filter A Sampling Clock Select"]
789 #[inline(always)]
790 pub fn nfcsa(&self) -> NFCSA_R {
791 NFCSA_R::new(((self.bits >> 14) & 3) as u8)
792 }
793 #[doc = "Bits 16:20 - GTIOCnB Pin Function Select"]
794 #[inline(always)]
795 pub fn gtiob(&self) -> GTIOB_R {
796 GTIOB_R::new(((self.bits >> 16) & 0x1f) as u8)
797 }
798 #[doc = "Bit 22 - GTIOCnB Pin Output Value Setting at the Count Stop"]
799 #[inline(always)]
800 pub fn obdflt(&self) -> OBDFLT_R {
801 OBDFLT_R::new(((self.bits >> 22) & 1) != 0)
802 }
803 #[doc = "Bit 23 - GTIOCnB Pin Output Setting at the Start/Stop Count"]
804 #[inline(always)]
805 pub fn obhld(&self) -> OBHLD_R {
806 OBHLD_R::new(((self.bits >> 23) & 1) != 0)
807 }
808 #[doc = "Bit 24 - GTIOCnB Pin Output Enable"]
809 #[inline(always)]
810 pub fn obe(&self) -> OBE_R {
811 OBE_R::new(((self.bits >> 24) & 1) != 0)
812 }
813 #[doc = "Bits 25:26 - GTIOCnB Pin Disable Value Setting"]
814 #[inline(always)]
815 pub fn obdf(&self) -> OBDF_R {
816 OBDF_R::new(((self.bits >> 25) & 3) as u8)
817 }
818 #[doc = "Bit 29 - Noise Filter B Enable"]
819 #[inline(always)]
820 pub fn nfben(&self) -> NFBEN_R {
821 NFBEN_R::new(((self.bits >> 29) & 1) != 0)
822 }
823 #[doc = "Bits 30:31 - Noise Filter B Sampling Clock Select"]
824 #[inline(always)]
825 pub fn nfcsb(&self) -> NFCSB_R {
826 NFCSB_R::new(((self.bits >> 30) & 3) as u8)
827 }
828}
829impl W {
830 #[doc = "Bits 0:4 - GTIOCnA Pin Function Select"]
831 #[inline(always)]
832 #[must_use]
833 pub fn gtioa(&mut self) -> GTIOA_W<0> {
834 GTIOA_W::new(self)
835 }
836 #[doc = "Bit 6 - GTIOCnA Pin Output Value Setting at the Count Stop"]
837 #[inline(always)]
838 #[must_use]
839 pub fn oadflt(&mut self) -> OADFLT_W<6> {
840 OADFLT_W::new(self)
841 }
842 #[doc = "Bit 7 - GTIOCnA Pin Output Setting at the Start/Stop Count"]
843 #[inline(always)]
844 #[must_use]
845 pub fn oahld(&mut self) -> OAHLD_W<7> {
846 OAHLD_W::new(self)
847 }
848 #[doc = "Bit 8 - GTIOCnA Pin Output Enable"]
849 #[inline(always)]
850 #[must_use]
851 pub fn oae(&mut self) -> OAE_W<8> {
852 OAE_W::new(self)
853 }
854 #[doc = "Bits 9:10 - GTIOCnA Pin Disable Value Setting"]
855 #[inline(always)]
856 #[must_use]
857 pub fn oadf(&mut self) -> OADF_W<9> {
858 OADF_W::new(self)
859 }
860 #[doc = "Bit 13 - Noise Filter A Enable"]
861 #[inline(always)]
862 #[must_use]
863 pub fn nfaen(&mut self) -> NFAEN_W<13> {
864 NFAEN_W::new(self)
865 }
866 #[doc = "Bits 14:15 - Noise Filter A Sampling Clock Select"]
867 #[inline(always)]
868 #[must_use]
869 pub fn nfcsa(&mut self) -> NFCSA_W<14> {
870 NFCSA_W::new(self)
871 }
872 #[doc = "Bits 16:20 - GTIOCnB Pin Function Select"]
873 #[inline(always)]
874 #[must_use]
875 pub fn gtiob(&mut self) -> GTIOB_W<16> {
876 GTIOB_W::new(self)
877 }
878 #[doc = "Bit 22 - GTIOCnB Pin Output Value Setting at the Count Stop"]
879 #[inline(always)]
880 #[must_use]
881 pub fn obdflt(&mut self) -> OBDFLT_W<22> {
882 OBDFLT_W::new(self)
883 }
884 #[doc = "Bit 23 - GTIOCnB Pin Output Setting at the Start/Stop Count"]
885 #[inline(always)]
886 #[must_use]
887 pub fn obhld(&mut self) -> OBHLD_W<23> {
888 OBHLD_W::new(self)
889 }
890 #[doc = "Bit 24 - GTIOCnB Pin Output Enable"]
891 #[inline(always)]
892 #[must_use]
893 pub fn obe(&mut self) -> OBE_W<24> {
894 OBE_W::new(self)
895 }
896 #[doc = "Bits 25:26 - GTIOCnB Pin Disable Value Setting"]
897 #[inline(always)]
898 #[must_use]
899 pub fn obdf(&mut self) -> OBDF_W<25> {
900 OBDF_W::new(self)
901 }
902 #[doc = "Bit 29 - Noise Filter B Enable"]
903 #[inline(always)]
904 #[must_use]
905 pub fn nfben(&mut self) -> NFBEN_W<29> {
906 NFBEN_W::new(self)
907 }
908 #[doc = "Bits 30:31 - Noise Filter B Sampling Clock Select"]
909 #[inline(always)]
910 #[must_use]
911 pub fn nfcsb(&mut self) -> NFCSB_W<30> {
912 NFCSB_W::new(self)
913 }
914 #[doc = "Writes raw bits to the register."]
915 #[inline(always)]
916 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
917 self.0.bits(bits);
918 self
919 }
920}
921#[doc = "General PWM Timer I/O 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 [gtior](index.html) module"]
922pub struct GTIOR_SPEC;
923impl crate::RegisterSpec for GTIOR_SPEC {
924 type Ux = u32;
925}
926#[doc = "`read()` method returns [gtior::R](R) reader structure"]
927impl crate::Readable for GTIOR_SPEC {
928 type Reader = R;
929}
930#[doc = "`write(|w| ..)` method takes [gtior::W](W) writer structure"]
931impl crate::Writable for GTIOR_SPEC {
932 type Writer = W;
933 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
934 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
935}
936#[doc = "`reset()` method sets GTIOR to value 0"]
937impl crate::Resettable for GTIOR_SPEC {
938 const RESET_VALUE: Self::Ux = 0;
939}