efm32wg230_pac/dac0/
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 `CH0` reader - Channel 0 Conversion Complete Interrupt Flag"]
17pub type CH0_R = crate::BitReader<bool>;
18#[doc = "Field `CH1` reader - Channel 1 Conversion Complete Interrupt Flag"]
19pub type CH1_R = crate::BitReader<bool>;
20#[doc = "Field `CH0UF` reader - Channel 0 Data Underflow Interrupt Flag"]
21pub type CH0UF_R = crate::BitReader<bool>;
22#[doc = "Field `CH1UF` reader - Channel 1 Data Underflow Interrupt Flag"]
23pub type CH1UF_R = crate::BitReader<bool>;
24impl R {
25    #[doc = "Bit 0 - Channel 0 Conversion Complete Interrupt Flag"]
26    #[inline(always)]
27    pub fn ch0(&self) -> CH0_R {
28        CH0_R::new((self.bits & 1) != 0)
29    }
30    #[doc = "Bit 1 - Channel 1 Conversion Complete Interrupt Flag"]
31    #[inline(always)]
32    pub fn ch1(&self) -> CH1_R {
33        CH1_R::new(((self.bits >> 1) & 1) != 0)
34    }
35    #[doc = "Bit 4 - Channel 0 Data Underflow Interrupt Flag"]
36    #[inline(always)]
37    pub fn ch0uf(&self) -> CH0UF_R {
38        CH0UF_R::new(((self.bits >> 4) & 1) != 0)
39    }
40    #[doc = "Bit 5 - Channel 1 Data Underflow Interrupt Flag"]
41    #[inline(always)]
42    pub fn ch1uf(&self) -> CH1UF_R {
43        CH1UF_R::new(((self.bits >> 5) & 1) != 0)
44    }
45}
46#[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"]
47pub struct IF_SPEC;
48impl crate::RegisterSpec for IF_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [if_::R](R) reader structure"]
52impl crate::Readable for IF_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets IF to value 0"]
56impl crate::Resettable for IF_SPEC {
57    #[inline(always)]
58    fn reset_value() -> Self::Ux {
59        0
60    }
61}