efm32zg210_pac/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 `ERR` reader - DMA Error Interrupt Flag"]
25pub type ERR_R = crate::BitReader<bool>;
26impl R {
27    #[doc = "Bit 0 - DMA Channel 0 Complete Interrupt Flag"]
28    #[inline(always)]
29    pub fn ch0done(&self) -> CH0DONE_R {
30        CH0DONE_R::new((self.bits & 1) != 0)
31    }
32    #[doc = "Bit 1 - DMA Channel 1 Complete Interrupt Flag"]
33    #[inline(always)]
34    pub fn ch1done(&self) -> CH1DONE_R {
35        CH1DONE_R::new(((self.bits >> 1) & 1) != 0)
36    }
37    #[doc = "Bit 2 - DMA Channel 2 Complete Interrupt Flag"]
38    #[inline(always)]
39    pub fn ch2done(&self) -> CH2DONE_R {
40        CH2DONE_R::new(((self.bits >> 2) & 1) != 0)
41    }
42    #[doc = "Bit 3 - DMA Channel 3 Complete Interrupt Flag"]
43    #[inline(always)]
44    pub fn ch3done(&self) -> CH3DONE_R {
45        CH3DONE_R::new(((self.bits >> 3) & 1) != 0)
46    }
47    #[doc = "Bit 31 - DMA Error Interrupt Flag"]
48    #[inline(always)]
49    pub fn err(&self) -> ERR_R {
50        ERR_R::new(((self.bits >> 31) & 1) != 0)
51    }
52}
53#[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"]
54pub struct IF_SPEC;
55impl crate::RegisterSpec for IF_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [if_::R](R) reader structure"]
59impl crate::Readable for IF_SPEC {
60    type Reader = R;
61}
62#[doc = "`reset()` method sets IF to value 0"]
63impl crate::Resettable for IF_SPEC {
64    #[inline(always)]
65    fn reset_value() -> Self::Ux {
66        0
67    }
68}