efm32gg_pac/efm32gg995/dma/
if_.rs

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 `CH8DONE` reader - DMA Channel 8 Complete Interrupt Flag"]
33pub type CH8DONE_R = crate::BitReader<bool>;
34#[doc = "Field `CH9DONE` reader - DMA Channel 9 Complete Interrupt Flag"]
35pub type CH9DONE_R = crate::BitReader<bool>;
36#[doc = "Field `CH10DONE` reader - DMA Channel 10 Complete Interrupt Flag"]
37pub type CH10DONE_R = crate::BitReader<bool>;
38#[doc = "Field `CH11DONE` reader - DMA Channel 11 Complete Interrupt Flag"]
39pub type CH11DONE_R = crate::BitReader<bool>;
40#[doc = "Field `ERR` reader - DMA Error Interrupt Flag"]
41pub type ERR_R = crate::BitReader<bool>;
42impl R {
43    #[doc = "Bit 0 - DMA Channel 0 Complete Interrupt Flag"]
44    #[inline(always)]
45    pub fn ch0done(&self) -> CH0DONE_R {
46        CH0DONE_R::new((self.bits & 1) != 0)
47    }
48    #[doc = "Bit 1 - DMA Channel 1 Complete Interrupt Flag"]
49    #[inline(always)]
50    pub fn ch1done(&self) -> CH1DONE_R {
51        CH1DONE_R::new(((self.bits >> 1) & 1) != 0)
52    }
53    #[doc = "Bit 2 - DMA Channel 2 Complete Interrupt Flag"]
54    #[inline(always)]
55    pub fn ch2done(&self) -> CH2DONE_R {
56        CH2DONE_R::new(((self.bits >> 2) & 1) != 0)
57    }
58    #[doc = "Bit 3 - DMA Channel 3 Complete Interrupt Flag"]
59    #[inline(always)]
60    pub fn ch3done(&self) -> CH3DONE_R {
61        CH3DONE_R::new(((self.bits >> 3) & 1) != 0)
62    }
63    #[doc = "Bit 4 - DMA Channel 4 Complete Interrupt Flag"]
64    #[inline(always)]
65    pub fn ch4done(&self) -> CH4DONE_R {
66        CH4DONE_R::new(((self.bits >> 4) & 1) != 0)
67    }
68    #[doc = "Bit 5 - DMA Channel 5 Complete Interrupt Flag"]
69    #[inline(always)]
70    pub fn ch5done(&self) -> CH5DONE_R {
71        CH5DONE_R::new(((self.bits >> 5) & 1) != 0)
72    }
73    #[doc = "Bit 6 - DMA Channel 6 Complete Interrupt Flag"]
74    #[inline(always)]
75    pub fn ch6done(&self) -> CH6DONE_R {
76        CH6DONE_R::new(((self.bits >> 6) & 1) != 0)
77    }
78    #[doc = "Bit 7 - DMA Channel 7 Complete Interrupt Flag"]
79    #[inline(always)]
80    pub fn ch7done(&self) -> CH7DONE_R {
81        CH7DONE_R::new(((self.bits >> 7) & 1) != 0)
82    }
83    #[doc = "Bit 8 - DMA Channel 8 Complete Interrupt Flag"]
84    #[inline(always)]
85    pub fn ch8done(&self) -> CH8DONE_R {
86        CH8DONE_R::new(((self.bits >> 8) & 1) != 0)
87    }
88    #[doc = "Bit 9 - DMA Channel 9 Complete Interrupt Flag"]
89    #[inline(always)]
90    pub fn ch9done(&self) -> CH9DONE_R {
91        CH9DONE_R::new(((self.bits >> 9) & 1) != 0)
92    }
93    #[doc = "Bit 10 - DMA Channel 10 Complete Interrupt Flag"]
94    #[inline(always)]
95    pub fn ch10done(&self) -> CH10DONE_R {
96        CH10DONE_R::new(((self.bits >> 10) & 1) != 0)
97    }
98    #[doc = "Bit 11 - DMA Channel 11 Complete Interrupt Flag"]
99    #[inline(always)]
100    pub fn ch11done(&self) -> CH11DONE_R {
101        CH11DONE_R::new(((self.bits >> 11) & 1) != 0)
102    }
103    #[doc = "Bit 31 - DMA Error Interrupt Flag"]
104    #[inline(always)]
105    pub fn err(&self) -> ERR_R {
106        ERR_R::new(((self.bits >> 31) & 1) != 0)
107    }
108}
109#[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"]
110pub struct IF_SPEC;
111impl crate::RegisterSpec for IF_SPEC {
112    type Ux = u32;
113}
114#[doc = "`read()` method returns [if_::R](R) reader structure"]
115impl crate::Readable for IF_SPEC {
116    type Reader = R;
117}
118#[doc = "`reset()` method sets IF to value 0"]
119impl crate::Resettable for IF_SPEC {
120    const RESET_VALUE: Self::Ux = 0;
121}