1#[doc = "Register `IF` reader"]
2pub struct R(crate::R<IF_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<IF_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<IF_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<IF_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `CH0DONE` reader - DMA Channel 0 Complete Interrupt Flag"]
17pub type CH0DONE_R = crate::BitReader<bool>;
18#[doc = "Field `CH1DONE` reader - DMA Channel 1 Complete Interrupt Flag"]
19pub type CH1DONE_R = crate::BitReader<bool>;
20#[doc = "Field `CH2DONE` reader - DMA Channel 2 Complete Interrupt Flag"]
21pub type CH2DONE_R = crate::BitReader<bool>;
22#[doc = "Field `CH3DONE` reader - DMA Channel 3 Complete Interrupt Flag"]
23pub type CH3DONE_R = crate::BitReader<bool>;
24#[doc = "Field `CH4DONE` reader - DMA Channel 4 Complete Interrupt Flag"]
25pub type CH4DONE_R = crate::BitReader<bool>;
26#[doc = "Field `CH5DONE` reader - DMA Channel 5 Complete Interrupt Flag"]
27pub type CH5DONE_R = crate::BitReader<bool>;
28#[doc = "Field `CH6DONE` reader - DMA Channel 6 Complete Interrupt Flag"]
29pub type CH6DONE_R = crate::BitReader<bool>;
30#[doc = "Field `CH7DONE` reader - DMA Channel 7 Complete Interrupt Flag"]
31pub type CH7DONE_R = crate::BitReader<bool>;
32#[doc = "Field `ERR` reader - DMA Error Interrupt Flag"]
33pub type ERR_R = crate::BitReader<bool>;
34impl R {
35 #[doc = "Bit 0 - DMA Channel 0 Complete Interrupt Flag"]
36 #[inline(always)]
37 pub fn ch0done(&self) -> CH0DONE_R {
38 CH0DONE_R::new((self.bits & 1) != 0)
39 }
40 #[doc = "Bit 1 - DMA Channel 1 Complete Interrupt Flag"]
41 #[inline(always)]
42 pub fn ch1done(&self) -> CH1DONE_R {
43 CH1DONE_R::new(((self.bits >> 1) & 1) != 0)
44 }
45 #[doc = "Bit 2 - DMA Channel 2 Complete Interrupt Flag"]
46 #[inline(always)]
47 pub fn ch2done(&self) -> CH2DONE_R {
48 CH2DONE_R::new(((self.bits >> 2) & 1) != 0)
49 }
50 #[doc = "Bit 3 - DMA Channel 3 Complete Interrupt Flag"]
51 #[inline(always)]
52 pub fn ch3done(&self) -> CH3DONE_R {
53 CH3DONE_R::new(((self.bits >> 3) & 1) != 0)
54 }
55 #[doc = "Bit 4 - DMA Channel 4 Complete Interrupt Flag"]
56 #[inline(always)]
57 pub fn ch4done(&self) -> CH4DONE_R {
58 CH4DONE_R::new(((self.bits >> 4) & 1) != 0)
59 }
60 #[doc = "Bit 5 - DMA Channel 5 Complete Interrupt Flag"]
61 #[inline(always)]
62 pub fn ch5done(&self) -> CH5DONE_R {
63 CH5DONE_R::new(((self.bits >> 5) & 1) != 0)
64 }
65 #[doc = "Bit 6 - DMA Channel 6 Complete Interrupt Flag"]
66 #[inline(always)]
67 pub fn ch6done(&self) -> CH6DONE_R {
68 CH6DONE_R::new(((self.bits >> 6) & 1) != 0)
69 }
70 #[doc = "Bit 7 - DMA Channel 7 Complete Interrupt Flag"]
71 #[inline(always)]
72 pub fn ch7done(&self) -> CH7DONE_R {
73 CH7DONE_R::new(((self.bits >> 7) & 1) != 0)
74 }
75 #[doc = "Bit 31 - DMA Error Interrupt Flag"]
76 #[inline(always)]
77 pub fn err(&self) -> ERR_R {
78 ERR_R::new(((self.bits >> 31) & 1) != 0)
79 }
80}
81#[doc = "Interrupt Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [if_](index.html) module"]
82pub struct IF_SPEC;
83impl crate::RegisterSpec for IF_SPEC {
84 type Ux = u32;
85}
86#[doc = "`read()` method returns [if_::R](R) reader structure"]
87impl crate::Readable for IF_SPEC {
88 type Reader = R;
89}
90#[doc = "`reset()` method sets IF to value 0"]
91impl crate::Resettable for IF_SPEC {
92 #[inline(always)]
93 fn reset_value() -> Self::Ux {
94 0
95 }
96}