1pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16pub struct W(crate::W<SR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SR_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<SR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37pub type UIF_R = crate::BitReader<UIFR_A>;
39#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum UIFR_A {
44 Update = 1,
46}
47impl From<UIFR_A> for bool {
48 #[inline(always)]
49 fn from(variant: UIFR_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl UIF_R {
54 #[inline(always)]
56 pub fn variant(&self) -> Option<UIFR_A> {
57 match self.bits {
58 true => Some(UIFR_A::Update),
59 _ => None,
60 }
61 }
62 #[inline(always)]
64 pub fn is_update(&self) -> bool {
65 *self == UIFR_A::Update
66 }
67}
68#[derive(Clone, Copy, Debug, PartialEq, Eq)]
72pub enum UIFW_AW {
73 Clear = 0,
75}
76impl From<UIFW_AW> for bool {
77 #[inline(always)]
78 fn from(variant: UIFW_AW) -> Self {
79 variant as u8 != 0
80 }
81}
82pub type UIF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SR_SPEC, UIFW_AW, O>;
84impl<'a, const O: u8> UIF_W<'a, O> {
85 #[inline(always)]
87 pub fn clear(self) -> &'a mut W {
88 self.variant(UIFW_AW::Clear)
89 }
90}
91pub type CC1IF_R = crate::BitReader<CC1IFR_A>;
93#[derive(Clone, Copy, Debug, PartialEq, Eq)]
97pub enum CC1IFR_A {
98 Overcapture = 1,
100}
101impl From<CC1IFR_A> for bool {
102 #[inline(always)]
103 fn from(variant: CC1IFR_A) -> Self {
104 variant as u8 != 0
105 }
106}
107impl CC1IF_R {
108 #[inline(always)]
110 pub fn variant(&self) -> Option<CC1IFR_A> {
111 match self.bits {
112 true => Some(CC1IFR_A::Overcapture),
113 _ => None,
114 }
115 }
116 #[inline(always)]
118 pub fn is_overcapture(&self) -> bool {
119 *self == CC1IFR_A::Overcapture
120 }
121}
122#[derive(Clone, Copy, Debug, PartialEq, Eq)]
126pub enum CC1IFW_AW {
127 Clear = 0,
129}
130impl From<CC1IFW_AW> for bool {
131 #[inline(always)]
132 fn from(variant: CC1IFW_AW) -> Self {
133 variant as u8 != 0
134 }
135}
136pub type CC1IF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SR_SPEC, CC1IFW_AW, O>;
138impl<'a, const O: u8> CC1IF_W<'a, O> {
139 #[inline(always)]
141 pub fn clear(self) -> &'a mut W {
142 self.variant(CC1IFW_AW::Clear)
143 }
144}
145pub use CC1IF_R as CC2IF_R;
147pub use CC1IF_R as CC3IF_R;
149pub use CC1IF_R as CC4IF_R;
151pub use CC1IF_W as CC2IF_W;
153pub use CC1IF_W as CC3IF_W;
155pub use CC1IF_W as CC4IF_W;
157pub type COMIF_R = crate::BitReader<bool>;
159pub type COMIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
161pub type TIF_R = crate::BitReader<TIFR_A>;
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
167pub enum TIFR_A {
168 Triggered = 1,
170}
171impl From<TIFR_A> for bool {
172 #[inline(always)]
173 fn from(variant: TIFR_A) -> Self {
174 variant as u8 != 0
175 }
176}
177impl TIF_R {
178 #[inline(always)]
180 pub fn variant(&self) -> Option<TIFR_A> {
181 match self.bits {
182 true => Some(TIFR_A::Triggered),
183 _ => None,
184 }
185 }
186 #[inline(always)]
188 pub fn is_triggered(&self) -> bool {
189 *self == TIFR_A::Triggered
190 }
191}
192#[derive(Clone, Copy, Debug, PartialEq, Eq)]
196pub enum TIFW_AW {
197 Clear = 0,
199}
200impl From<TIFW_AW> for bool {
201 #[inline(always)]
202 fn from(variant: TIFW_AW) -> Self {
203 variant as u8 != 0
204 }
205}
206pub type TIF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SR_SPEC, TIFW_AW, O>;
208impl<'a, const O: u8> TIF_W<'a, O> {
209 #[inline(always)]
211 pub fn clear(self) -> &'a mut W {
212 self.variant(TIFW_AW::Clear)
213 }
214}
215pub type BIF_R = crate::BitReader<bool>;
217pub type BIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
219pub type CC1OF_R = crate::BitReader<CC1OFR_A>;
221#[derive(Clone, Copy, Debug, PartialEq, Eq)]
225pub enum CC1OFR_A {
226 Overcapture = 1,
228}
229impl From<CC1OFR_A> for bool {
230 #[inline(always)]
231 fn from(variant: CC1OFR_A) -> Self {
232 variant as u8 != 0
233 }
234}
235impl CC1OF_R {
236 #[inline(always)]
238 pub fn variant(&self) -> Option<CC1OFR_A> {
239 match self.bits {
240 true => Some(CC1OFR_A::Overcapture),
241 _ => None,
242 }
243 }
244 #[inline(always)]
246 pub fn is_overcapture(&self) -> bool {
247 *self == CC1OFR_A::Overcapture
248 }
249}
250#[derive(Clone, Copy, Debug, PartialEq, Eq)]
254pub enum CC1OFW_AW {
255 Clear = 0,
257}
258impl From<CC1OFW_AW> for bool {
259 #[inline(always)]
260 fn from(variant: CC1OFW_AW) -> Self {
261 variant as u8 != 0
262 }
263}
264pub type CC1OF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SR_SPEC, CC1OFW_AW, O>;
266impl<'a, const O: u8> CC1OF_W<'a, O> {
267 #[inline(always)]
269 pub fn clear(self) -> &'a mut W {
270 self.variant(CC1OFW_AW::Clear)
271 }
272}
273pub use CC1OF_R as CC2OF_R;
275pub use CC1OF_R as CC3OF_R;
277pub use CC1OF_R as CC4OF_R;
279pub use CC1OF_W as CC2OF_W;
281pub use CC1OF_W as CC3OF_W;
283pub use CC1OF_W as CC4OF_W;
285pub type IC1IR_R = crate::BitReader<bool>;
287pub type IC1IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
289pub type IC2IR_R = crate::BitReader<bool>;
291pub type IC2IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
293pub type IC3IR_R = crate::BitReader<bool>;
295pub type IC3IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
297pub type IC4IR_R = crate::BitReader<bool>;
299pub type IC4IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
301pub type IC1IF_R = crate::BitReader<bool>;
303pub type IC1IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
305pub type IC2IF_R = crate::BitReader<bool>;
307pub type IC2IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
309pub type IC3IF_R = crate::BitReader<bool>;
311pub type IC3IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
313pub type IC4IF_R = crate::BitReader<bool>;
315pub type IC4IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
317impl R {
318 #[inline(always)]
320 pub fn uif(&self) -> UIF_R {
321 UIF_R::new((self.bits & 1) != 0)
322 }
323 #[inline(always)]
325 pub fn cc1if(&self) -> CC1IF_R {
326 CC1IF_R::new(((self.bits >> 1) & 1) != 0)
327 }
328 #[inline(always)]
330 pub fn cc2if(&self) -> CC2IF_R {
331 CC2IF_R::new(((self.bits >> 2) & 1) != 0)
332 }
333 #[inline(always)]
335 pub fn cc3if(&self) -> CC3IF_R {
336 CC3IF_R::new(((self.bits >> 3) & 1) != 0)
337 }
338 #[inline(always)]
340 pub fn cc4if(&self) -> CC4IF_R {
341 CC4IF_R::new(((self.bits >> 4) & 1) != 0)
342 }
343 #[inline(always)]
345 pub fn comif(&self) -> COMIF_R {
346 COMIF_R::new(((self.bits >> 5) & 1) != 0)
347 }
348 #[inline(always)]
350 pub fn tif(&self) -> TIF_R {
351 TIF_R::new(((self.bits >> 6) & 1) != 0)
352 }
353 #[inline(always)]
355 pub fn bif(&self) -> BIF_R {
356 BIF_R::new(((self.bits >> 7) & 1) != 0)
357 }
358 #[inline(always)]
360 pub fn cc1of(&self) -> CC1OF_R {
361 CC1OF_R::new(((self.bits >> 9) & 1) != 0)
362 }
363 #[inline(always)]
365 pub fn cc2of(&self) -> CC2OF_R {
366 CC2OF_R::new(((self.bits >> 10) & 1) != 0)
367 }
368 #[inline(always)]
370 pub fn cc3of(&self) -> CC3OF_R {
371 CC3OF_R::new(((self.bits >> 11) & 1) != 0)
372 }
373 #[inline(always)]
375 pub fn cc4of(&self) -> CC4OF_R {
376 CC4OF_R::new(((self.bits >> 12) & 1) != 0)
377 }
378 #[inline(always)]
380 pub fn ic1ir(&self) -> IC1IR_R {
381 IC1IR_R::new(((self.bits >> 16) & 1) != 0)
382 }
383 #[inline(always)]
385 pub fn ic2ir(&self) -> IC2IR_R {
386 IC2IR_R::new(((self.bits >> 17) & 1) != 0)
387 }
388 #[inline(always)]
390 pub fn ic3ir(&self) -> IC3IR_R {
391 IC3IR_R::new(((self.bits >> 18) & 1) != 0)
392 }
393 #[inline(always)]
395 pub fn ic4ir(&self) -> IC4IR_R {
396 IC4IR_R::new(((self.bits >> 19) & 1) != 0)
397 }
398 #[inline(always)]
400 pub fn ic1if(&self) -> IC1IF_R {
401 IC1IF_R::new(((self.bits >> 20) & 1) != 0)
402 }
403 #[inline(always)]
405 pub fn ic2if(&self) -> IC2IF_R {
406 IC2IF_R::new(((self.bits >> 21) & 1) != 0)
407 }
408 #[inline(always)]
410 pub fn ic3if(&self) -> IC3IF_R {
411 IC3IF_R::new(((self.bits >> 22) & 1) != 0)
412 }
413 #[inline(always)]
415 pub fn ic4if(&self) -> IC4IF_R {
416 IC4IF_R::new(((self.bits >> 23) & 1) != 0)
417 }
418}
419impl W {
420 #[inline(always)]
422 #[must_use]
423 pub fn uif(&mut self) -> UIF_W<0> {
424 UIF_W::new(self)
425 }
426 #[inline(always)]
428 #[must_use]
429 pub fn cc1if(&mut self) -> CC1IF_W<1> {
430 CC1IF_W::new(self)
431 }
432 #[inline(always)]
434 #[must_use]
435 pub fn cc2if(&mut self) -> CC2IF_W<2> {
436 CC2IF_W::new(self)
437 }
438 #[inline(always)]
440 #[must_use]
441 pub fn cc3if(&mut self) -> CC3IF_W<3> {
442 CC3IF_W::new(self)
443 }
444 #[inline(always)]
446 #[must_use]
447 pub fn cc4if(&mut self) -> CC4IF_W<4> {
448 CC4IF_W::new(self)
449 }
450 #[inline(always)]
452 #[must_use]
453 pub fn comif(&mut self) -> COMIF_W<5> {
454 COMIF_W::new(self)
455 }
456 #[inline(always)]
458 #[must_use]
459 pub fn tif(&mut self) -> TIF_W<6> {
460 TIF_W::new(self)
461 }
462 #[inline(always)]
464 #[must_use]
465 pub fn bif(&mut self) -> BIF_W<7> {
466 BIF_W::new(self)
467 }
468 #[inline(always)]
470 #[must_use]
471 pub fn cc1of(&mut self) -> CC1OF_W<9> {
472 CC1OF_W::new(self)
473 }
474 #[inline(always)]
476 #[must_use]
477 pub fn cc2of(&mut self) -> CC2OF_W<10> {
478 CC2OF_W::new(self)
479 }
480 #[inline(always)]
482 #[must_use]
483 pub fn cc3of(&mut self) -> CC3OF_W<11> {
484 CC3OF_W::new(self)
485 }
486 #[inline(always)]
488 #[must_use]
489 pub fn cc4of(&mut self) -> CC4OF_W<12> {
490 CC4OF_W::new(self)
491 }
492 #[inline(always)]
494 #[must_use]
495 pub fn ic1ir(&mut self) -> IC1IR_W<16> {
496 IC1IR_W::new(self)
497 }
498 #[inline(always)]
500 #[must_use]
501 pub fn ic2ir(&mut self) -> IC2IR_W<17> {
502 IC2IR_W::new(self)
503 }
504 #[inline(always)]
506 #[must_use]
507 pub fn ic3ir(&mut self) -> IC3IR_W<18> {
508 IC3IR_W::new(self)
509 }
510 #[inline(always)]
512 #[must_use]
513 pub fn ic4ir(&mut self) -> IC4IR_W<19> {
514 IC4IR_W::new(self)
515 }
516 #[inline(always)]
518 #[must_use]
519 pub fn ic1if(&mut self) -> IC1IF_W<20> {
520 IC1IF_W::new(self)
521 }
522 #[inline(always)]
524 #[must_use]
525 pub fn ic2if(&mut self) -> IC2IF_W<21> {
526 IC2IF_W::new(self)
527 }
528 #[inline(always)]
530 #[must_use]
531 pub fn ic3if(&mut self) -> IC3IF_W<22> {
532 IC3IF_W::new(self)
533 }
534 #[inline(always)]
536 #[must_use]
537 pub fn ic4if(&mut self) -> IC4IF_W<23> {
538 IC4IF_W::new(self)
539 }
540 #[inline(always)]
542 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
543 self.0.bits(bits);
544 self
545 }
546}
547pub struct SR_SPEC;
553impl crate::RegisterSpec for SR_SPEC {
554 type Ux = u32;
555}
556impl crate::Readable for SR_SPEC {
558 type Reader = R;
559}
560impl crate::Writable for SR_SPEC {
562 type Writer = W;
563 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x1e5f;
564 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
565}
566impl crate::Resettable for SR_SPEC {
568 const RESET_VALUE: Self::Ux = 0;
569}