efm32wg330_pac/adc0/
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 `SINGLE` reader - Single Conversion Complete Interrupt Flag"]
17pub type SINGLE_R = crate::BitReader<bool>;
18#[doc = "Field `SCAN` reader - Scan Conversion Complete Interrupt Flag"]
19pub type SCAN_R = crate::BitReader<bool>;
20#[doc = "Field `SINGLEOF` reader - Single Result Overflow Interrupt Flag"]
21pub type SINGLEOF_R = crate::BitReader<bool>;
22#[doc = "Field `SCANOF` reader - Scan Result Overflow Interrupt Flag"]
23pub type SCANOF_R = crate::BitReader<bool>;
24impl R {
25    #[doc = "Bit 0 - Single Conversion Complete Interrupt Flag"]
26    #[inline(always)]
27    pub fn single(&self) -> SINGLE_R {
28        SINGLE_R::new((self.bits & 1) != 0)
29    }
30    #[doc = "Bit 1 - Scan Conversion Complete Interrupt Flag"]
31    #[inline(always)]
32    pub fn scan(&self) -> SCAN_R {
33        SCAN_R::new(((self.bits >> 1) & 1) != 0)
34    }
35    #[doc = "Bit 8 - Single Result Overflow Interrupt Flag"]
36    #[inline(always)]
37    pub fn singleof(&self) -> SINGLEOF_R {
38        SINGLEOF_R::new(((self.bits >> 8) & 1) != 0)
39    }
40    #[doc = "Bit 9 - Scan Result Overflow Interrupt Flag"]
41    #[inline(always)]
42    pub fn scanof(&self) -> SCANOF_R {
43        SCANOF_R::new(((self.bits >> 9) & 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}